All of lore.kernel.org
 help / color / mirror / Atom feed
* How to change the soft link in target.requires or target.wants directory
@ 2019-12-26  7:17 zhang_cy1989
  2019-12-26  7:36 ` Lei YU
  0 siblings, 1 reply; 5+ messages in thread
From: zhang_cy1989 @ 2019-12-26  7:17 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

Dear All
   The target.requires or target.wants contains some soft link.
   Ex:
        /lib/systemd/system/obmc-host-startmin@0.target.requires

                   lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron@0.target -> ../obmc-chassis-poweron@.target
                   lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable@0.service -> ../op-occ-enable@.service
                   lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host@0.service -> ../start_host@.service

    

    Now, I want to add or delete soft link:op-occ-enable@0.service

    I can use "rm -rf ./op-occ-enable@0.service" to achieve the goal.
    But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.

  

    Are there other tools or formal methods to do this?


Best regards
Felix

[-- Attachment #2: Type: text/html, Size: 2222 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to change the soft link in target.requires or target.wants directory
  2019-12-26  7:17 How to change the soft link in target.requires or target.wants directory zhang_cy1989
@ 2019-12-26  7:36 ` Lei YU
  2019-12-26  7:46   ` CS20 CHLi30
  0 siblings, 1 reply; 5+ messages in thread
From: Lei YU @ 2019-12-26  7:36 UTC (permalink / raw)
  To: zhang_cy1989; +Cc: openbmc

On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <zhang_cy1989@163.com> wrote:
>
> Dear All
>    The target.requires or target.wants contains some soft link.
>    Ex:
>         /lib/systemd/system/obmc-host-startmin@0.target.requires
>                    lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron@0.target -> ../obmc-chassis-poweron@.target
>                    lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable@0.service -> ../op-occ-enable@.service
>                    lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host@0.service -> ../start_host@.service
>
>     Now, I want to add or delete soft link:op-occ-enable@0.service
>     I can use "rm -rf ./op-occ-enable@0.service" to achieve the goal.
>     But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.
>
>     Are there other tools or formal methods to do this?

These links are expected to be managed by systemd.
You could disable or mask the services by `systemctl [disable|mask]
<service>`. If you need them later, just enable or unmask them.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: How to change the soft link in target.requires or target.wants directory
  2019-12-26  7:36 ` Lei YU
@ 2019-12-26  7:46   ` CS20 CHLi30
  2019-12-26  8:38     ` zhang_cy1989
  0 siblings, 1 reply; 5+ messages in thread
From: CS20 CHLi30 @ 2019-12-26  7:46 UTC (permalink / raw)
  To: Lei YU, zhang_cy1989; +Cc: openbmc

Hi Felix,

If you need to add your .service unit file into .want or .requires folder, you can use systemd to do that in .bb file.

You can refer obmc-op-control-power_git.bb this file for example:

Install to .requires folder:
RESET_ON_TMPL = "op-reset-chassis-running@.service"
RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service"
RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"

Install to .want folder:
# Force the standby target to run the chassis reset check target
RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target"
SYSD_TGT = "multi-user.target"
RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target"
RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"

Sincerely,
Tim
-----Original Message-----
From: openbmc [mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org] On Behalf Of Lei YU
Sent: Thursday, December 26, 2019 3:37 PM
To: zhang_cy1989 <zhang_cy1989@163.com>
Cc: openbmc@lists.ozlabs.org
Subject: Re: How to change the soft link in target.requires or target.wants directory

On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <zhang_cy1989@163.com> wrote:
>
> Dear All
>    The target.requires or target.wants contains some soft link.
>    Ex:
>         /lib/systemd/system/obmc-host-startmin@0.target.requires
>                    lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron@0.target -> ../obmc-chassis-poweron@.target
>                    lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable@0.service -> ../op-occ-enable@.service
>                    lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host@0.service -> ../start_host@.service
>
>     Now, I want to add or delete soft link:op-occ-enable@0.service
>     I can use "rm -rf ./op-occ-enable@0.service" to achieve the goal.
>     But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.
>
>     Are there other tools or formal methods to do this?

These links are expected to be managed by systemd.
You could disable or mask the services by `systemctl [disable|mask] <service>`. If you need them later, just enable or unmask them.
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re:RE: How to change the soft link in target.requires or target.wants directory
  2019-12-26  7:46   ` CS20 CHLi30
@ 2019-12-26  8:38     ` zhang_cy1989
  2019-12-26  8:53       ` CS20 CHLi30
  0 siblings, 1 reply; 5+ messages in thread
From: zhang_cy1989 @ 2019-12-26  8:38 UTC (permalink / raw)
  To: CS20 CHLi30; +Cc: Lei YU, openbmc

[-- Attachment #1: Type: text/plain, Size: 4063 bytes --]

Dear Tim
   It's exactly what I wanted.
   You are wonderful.
 
   I remember you.

   You taught me a lot.


   Following your seggestions, I can power on the chassis by ipmitool.
   But there is still a bit prolems:
             When I do the action: ipmitool -I lanplus -H 192.168.0.1 -U root -P 0penBmc power on.
             Right after, the chassis  is power up.
             Waiting for about 4 seconds,the chassis is power off again.
           

  I guess this is because the power up pin keeps active for a long time.
  when power up pin keeping active for 4 seconds,the chassis power will lost again.

            

  I will debug this problem. If you have more suggestions, welcome to teach me.
 

  And,Could you show me the dependencies of "obmc-host-shutdown@0.target"?
  (power off, still on x86 motherboard and use romulus receipes).


 Looking forward for your reply.


Best Regards
Felix

 



At 2019-12-26 15:46:13, "CS20 CHLi30" <CHLI30@nuvoton.com> wrote:
>Hi Felix,
>
>If you need to add your .service unit file into .want or .requires folder, you can use systemd to do that in .bb file.
>
>You can refer obmc-op-control-power_git.bb this file for example:
>
>Install to .requires folder:
>RESET_ON_TMPL = "op-reset-chassis-running@.service"
>RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service"
>RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"
>
>Install to .want folder:
># Force the standby target to run the chassis reset check target
>RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target"
>SYSD_TGT = "multi-user.target"
>RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target"
>RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"
>SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"
>
>Sincerely,
>Tim
>-----Original Message-----
>From: openbmc [mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org] On Behalf Of Lei YU
>Sent: Thursday, December 26, 2019 3:37 PM
>To: zhang_cy1989 <zhang_cy1989@163.com>
>Cc: openbmc@lists.ozlabs.org
>Subject: Re: How to change the soft link in target.requires or target.wants directory
>
>On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <zhang_cy1989@163.com> wrote:
>>
>> Dear All
>>    The target.requires or target.wants contains some soft link.
>>    Ex:
>>         /lib/systemd/system/obmc-host-startmin@0.target.requires
>>                    lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron@0.target -> ../obmc-chassis-poweron@.target
>>                    lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable@0.service -> ../op-occ-enable@.service
>>                    lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host@0.service -> ../start_host@.service
>>
>>     Now, I want to add or delete soft link:op-occ-enable@0.service
>>     I can use "rm -rf ./op-occ-enable@0.service" to achieve the goal.
>>     But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.
>>
>>     Are there other tools or formal methods to do this?
>
>These links are expected to be managed by systemd.
>You could disable or mask the services by `systemctl [disable|mask] <service>`. If you need them later, just enable or unmask them.
>________________________________
>________________________________
> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

[-- Attachment #2: Type: text/html, Size: 5378 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Re:RE: How to change the soft link in target.requires or target.wants directory
  2019-12-26  8:38     ` zhang_cy1989
@ 2019-12-26  8:53       ` CS20 CHLi30
  0 siblings, 0 replies; 5+ messages in thread
From: CS20 CHLi30 @ 2019-12-26  8:53 UTC (permalink / raw)
  To: zhang_cy1989; +Cc: Lei YU, openbmc

[-- Attachment #1: Type: text/plain, Size: 6585 bytes --]

Hi Felix,

I'm glad to hear your problem was solved partially.
I think that your guess might be right, you should check your power pin ON sequences behavior. (High->Sleep xxx ms->Low or opposite)
It's depend on your H/W platform.

systemctl list-dependencies obmc-host-shutdown@0.target
obmc-host-shutdown@0.target (Olderly shutdown)

-> xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
-> obmc-chassis-poweroff@0.target
     -> mapper-wait@-xyz-openbmc_project-state-chassis0.service
     -> op-power-stop@0.service
     -> op-powered-off@0.service
     -> op-wait-power-off@0.service
     -> obmc-host-stop@0.target
          -> mapper-wait@-org-openbmc-control-chassis0.service

Best regards,
Tim
From: zhang_cy1989 [mailto:zhang_cy1989@163.com]
Sent: Thursday, December 26, 2019 4:38 PM
To: CS20 CHLi30 <CHLI30@nuvoton.com>
Cc: Lei YU <mine260309@gmail.com>; openbmc@lists.ozlabs.org
Subject: Re:RE: How to change the soft link in target.requires or target.wants directory

Dear Tim
   It's exactly what I wanted.
   You are wonderful.

   I remember you.
   You taught me a lot.

   Following your seggestions, I can power on the chassis by ipmitool.
   But there is still a bit prolems:
             When I do the action: ipmitool -I lanplus -H 192.168.0.1 -U root -P 0penBmc power on.
             Right after, the chassis  is power up.
             Waiting for about 4 seconds,the chassis is power off again.

  I guess this is because the power up pin keeps active for a long time.
  when power up pin keeping active for 4 seconds,the chassis power will lost again.

  I will debug this problem. If you have more suggestions, welcome to teach me.

  And,Could you show me the dependencies of "obmc-host-shutdown@0.target<mailto:obmc-host-shutdown@0.target>"?
  (power off, still on x86 motherboard and use romulus receipes).

 Looking forward for your reply.

Best Regards
Felix



At 2019-12-26 15:46:13, "CS20 CHLi30" <CHLI30@nuvoton.com<mailto:CHLI30@nuvoton.com>> wrote:

>Hi Felix,

>

>If you need to add your .service unit file into .want or .requires folder, you can use systemd to do that in .bb file.

>

>You can refer obmc-op-control-power_git.bb this file for example:

>

>Install to .requires folder:

>RESET_ON_TMPL = "op-reset-chassis-running@.service<mailto:op-reset-chassis-running@.service>"

>RESET_ON_INSTFMT = "op-reset-chassis-running@{0}.service<mailto:op-reset-chassis-running@%7b0%7d.service>"

>RESET_ON_FMT = "../${RESET_ON_TMPL}:${RESET_TGTFMT}.requires/${RESET_ON_INSTFMT}"

>

>Install to .want folder:

># Force the standby target to run the chassis reset check target

>RESET_TMPL_CTRL = "obmc-chassis-powerreset@.target<mailto:obmc-chassis-powerreset@.target>"

>SYSD_TGT = "multi-user.target"

>RESET_INSTFMT_CTRL = "obmc-chassis-powerreset@{0}.target<mailto:obmc-chassis-powerreset@%7b0%7d.target>"

>RESET_FMT_CTRL = "../${RESET_TMPL_CTRL}:${SYSD_TGT}.wants/${RESET_INSTFMT_CTRL}"

>SYSTEMD_LINK_${PN} += "${@compose_list_zip(d, 'RESET_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES')}"

>

>Sincerely,

>Tim

>-----Original Message-----

>From: openbmc [mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org] On Behalf Of Lei YU

>Sent: Thursday, December 26, 2019 3:37 PM

>To: zhang_cy1989 <zhang_cy1989@163.com<mailto:zhang_cy1989@163.com>>

>Cc: openbmc@lists.ozlabs.org<mailto:openbmc@lists.ozlabs.org>

>Subject: Re: How to change the soft link in target.requires or target.wants directory

>

>On Thu, Dec 26, 2019 at 3:18 PM zhang_cy1989 <zhang_cy1989@163.com<mailto:zhang_cy1989@163.com>> wrote:

>>

>> Dear All

>>    The target.requires or target.wants contains some soft link.

>>    Ex:

>>         /lib/systemd/system/obmc-host-startmin@0.target.requires<mailto:/lib/systemd/system/obmc-host-startmin@0.target.requires>

>>                    lrwxrwxrwx    1 root     root            31 Nov 29  2019 obmc-chassis-poweron@0.target<mailto:obmc-chassis-poweron@0.target> -> ../obmc-chassis-poweron@.target<mailto:../obmc-chassis-poweron@.target>

>>                    lrwxrwxrwx    1 root     root            25 Nov 28 09:51 op-occ-enable@0.service<mailto:op-occ-enable@0.service> -> ../op-occ-enable@.service<mailto:../op-occ-enable@.service>

>>                    lrwxrwxrwx    1 root     root            22 Nov 28 09:57 start_host@0.service<mailto:start_host@0.service> -> ../start_host@.service<mailto:../start_host@.service>

>>

>>     Now, I want to add or delete soft link:op-occ-enable@0.service

>>     I can use "rm -rf ./op-occ-enable@0.service<mailto:./op-occ-enable@0.service>" to achieve the goal.

>>     But,I'm not exactly sure this is formal operation. And I'm afraid this will be side effect.

>>

>>     Are there other tools or formal methods to do this?

>

>These links are expected to be managed by systemd.

>You could disable or mask the services by `systemctl [disable|mask] <service>`. If you need them later, just enable or unmask them.

>________________________________

>________________________________

> The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.




________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

[-- Attachment #2: Type: text/html, Size: 23116 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-26  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26  7:17 How to change the soft link in target.requires or target.wants directory zhang_cy1989
2019-12-26  7:36 ` Lei YU
2019-12-26  7:46   ` CS20 CHLi30
2019-12-26  8:38     ` zhang_cy1989
2019-12-26  8:53       ` CS20 CHLi30

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.