Results 1 to 8 of 8

Thread: Lebgitimate syntax for ExecStop

  1. #1

    Default Lebgitimate syntax for ExecStop

    I have modified /usr/lib/systemd/system/wicked.service at the ExecStop line to read:

    Code:
    ExecStop=/usr/bin/systemctl stop openvswitch.service; /usr/sbin/wicked --systemd ifdown all
    This does work, and does solve my problem. My question is:

    Is this a legitimate syntax (it obviously works) or is there a better approach to insure that the openvswitch.service stops before the interfaces are downed.

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Lebgitimate syntax for ExecStop

    Quote Originally Posted by d3vnull View Post
    I have modified /usr/lib/systemd/system/wicked.service at the ExecStop line to read:

    Code:
    ExecStop=/usr/bin/systemctl stop openvswitch.service; /usr/sbin/wicked --systemd ifdown all
    This does work, and does solve my problem. My question is:

    Is this a legitimate syntax (it obviously works) or is there a better approach to insure that the openvswitch.service stops before the interfaces are downed.
    AFAIK this should be triggered by Before= or After= statements. But, if this works now, I'd first do some serious studying on systemd, before changing it.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Sep 2012
    Posts
    7,090

    Default Re: Lebgitimate syntax for ExecStop

    Quote Originally Posted by d3vnull View Post
    Is this a legitimate syntax
    Yes. Although it means that you now have two services to stop instead of one, so timeouts systemd applies are wrong. Also any "systemctl daemon-reload" run concurrently (there are too many of them unfortunately) would terminate the first systemctl, thus it is open to race condition.
    or is there a better approach
    I already told you - use STARTMODE=nfsroot for your bridge.

    Actually I'd say it is a bug in wicked - it should not destroy interfaces that it did not create. I.e. your case should work by omitting OVS_* variables and treating OVS interfaces just like any other. Care to file bug report?

  4. #4

    Default Re: Lebgitimate syntax for ExecStop

    I must have missed the STARTMODE you suggested.

    I will also remove the OVS part.

    I am happy to file a bug report. I was still trying to determine if I had a bug, or if I was misunderstanding something.

    I will test your suggestions first.

    Thank you.

    Quote Originally Posted by arvidjaar View Post
    Yes. Although it means that you now have two services to stop instead of one, so timeouts systemd applies are wrong. Also any "systemctl daemon-reload" run concurrently (there are too many of them unfortunately) would terminate the first systemctl, thus it is open to race condition.

    I already told you - use STARTMODE=nfsroot for your bridge.

    Actually I'd say it is a bug in wicked - it should not destroy interfaces that it did not create. I.e. your case should work by omitting OVS_* variables and treating OVS interfaces just like any other. Care to file bug report?

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Lebgitimate syntax for ExecStop

    You might also want to read the Help and MAN documentation relating to "Requires =" and "Before =" and "After ="

    https://www.freedesktop.org/software...html#Requires=

    Usually people write these options to start, and pay less attention to stopping.
    You'll probably want to carefully pick through the info on this page to make sure very detail is covered.

    I'm guessing that properly <combining> Requires = and After = other referenced Unit files for those services should be the proper syntax.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  6. #6

    Default Re: Lebgitimate syntax for ExecStop

    Thank you for the link.I did read the manpages. I solved it a different way with arvidjarr's advice in the post below, and submitted a bug report as advised.

    https://forums.opensuse.org/showthre...tion-on-reboot

    I also informed the openvswitch discussion list, although they didn't seem to responsive to my minuscule issues

    Quote Originally Posted by tsu2 View Post
    You might also want to read the Help and MAN documentation relating to "Requires =" and "Before =" and "After ="

    https://www.freedesktop.org/software...html#Requires=

    Usually people write these options to start, and pay less attention to stopping.
    You'll probably want to carefully pick through the info on this page to make sure very detail is covered.

    I'm guessing that properly <combining> Requires = and After = other referenced Unit files for those services should be the proper syntax.

    TSU

  7. #7
    Join Date
    Sep 2012
    Posts
    7,090

    Default Re: Lebgitimate syntax for ExecStop

    Quote Originally Posted by d3vnull View Post
    I also informed the openvswitch discussion list
    There is nothing to be done from openswitch side here.

  8. #8

    Default Re: Lebgitimate syntax for ExecStop

    I agree. I only informed them to help anyone who runs across the same behavior. I didn't expect them to fix anything on their side.

    Quote Originally Posted by arvidjaar View Post
    There is nothing to be done from openswitch side here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •