Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Zypper restart for "in use" services

  1. #1
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,186

    Default Zypper restart for "in use" services

    Before I start working on one, does anyone know if there a reasonably intelligent script available that restarts all services that zypper ps shows as in having been updated or deleted?
    .: miuku @ #opensuse @ irc.libera.chat

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Zypper restart for "in use" services

    On 2013-12-17 23:16, Miuku wrote:
    >
    > Before I start working on one, does anyone know if there a reasonably
    > intelligent script available that restarts all services that zypper ps
    > shows as in having been updated or deleted?


    zypper does it, when it is reasonably possible to do automatically. What
    it doesn't, is because it is not that easy.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: Zypper restart for "in use" services

    And it would be very embarrassing for the clients when a service was stopped in the midst while serving them. A system manager will most probably only let this happen when (s)he aalows it.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,695
    Blog Entries
    1

    Default Re: Zypper restart for "in use" services

    Quote Originally Posted by hcvv View Post
    And it would be very embarrassing for the clients when a service was stopped in the midst while serving them. A system manager will most probably only let this happen when (s)he aalows it.
    Yes, some things are best left to human administrators

  5. #5
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,186

    Default Re: Zypper restart for "in use" services

    Quote Originally Posted by robin_listas
    zypper does it, when it is reasonably possible to do automatically. What
    it doesn't, is because it is not that easy.

    Unfortunately it doesn't seem to work for services like Apache at all so I'm left with a mess if there are large changes.

    Quote Originally Posted by hcvv View Post
    And it would be very embarrassing for the clients when a service was stopped in the midst while serving them. A system manager will most probably only let this happen when (s)he aalows it.
    Well it's somewhat related to it - I have a use-case where I need to update and restart services during the night when there is a minimum of usage on the system itself and I need to automate it to the maximum.

    So I was wondering if anyone had already done it but by the looks of it it's a no, so I'll start working on one myself.

    Cheers gents.
    .: miuku @ #opensuse @ irc.libera.chat

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: Zypper restart for "in use" services

    Quote Originally Posted by Miuku View Post
    [/COLOR]

    So I was wondering if anyone had already done it but by the looks of it it's a no, so I'll start working on one myself.

    Cheers gents.
    Did you check if
    Code:
    zypper ps
    can be of any use in writing a script?
    Henk van Velden

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Zypper restart for "in use" services

    On 2013-12-18 10:56, Miuku wrote:

    > So I was wondering if anyone had already done it but by the looks of it
    > it's a no, so I'll start working on one myself.


    It is not "no".

    Again, zypper does restart services that it updates.

    It does not reload services affected by a library update somewhere else,
    nor applications.

    This is done by the post-install scripts in the rpms, I believe.


    The only catch all solution is for a human to be present.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Zypper restart for "in use" services

    On 2013-12-18 13:53, Carlos E. R. wrote:
    > On 2013-12-18 10:56, Miuku wrote:
    >
    >> So I was wondering if anyone had already done it but by the looks of it
    >> it's a no, so I'll start working on one myself.

    >
    > It is not "no".
    >
    > Again, zypper does restart services that it updates.


    I have an update of rsyslog in the line. Lets see what happens.

    [...]

    Look in the log:


    Code:
    
    > 2013-12-18T13:59:00.577831+01:00 Eleanor4 systemd[1]: Stopping System Logging Service...
    > 2013-12-18T13:59:00.613317+01:00 Eleanor4 rsyslogd: [origin software="rsyslogd" swVersion="7.4.6" x-pid="832" x-info="http://www.rsyslog.com"] exiting on signal 15.
    > 2013-12-18T13:59:01.705538+01:00 Eleanor4 rsyslogd: [origin software="rsyslogd" swVersion="7.4.7" x-pid="59682" x-info="http://www.rsyslog.com"] start
    > 2013-12-18T13:59:00.659830+01:00 Eleanor4 systemd[1]: Starting System Logging Service...
    > 2013-12-18T13:59:01.706219+01:00 Eleanor4 systemd[1]: Started System Logging Service.
    > 2013-12-18T13:59:02.664821+01:00 Eleanor4 systemd[1]: Reloading.
    > 2013-12-18T13:59:02.806303+01:00 Eleanor4 systemd[1]: Reloading.
    > 2013-12-18T13:59:02.954822+01:00 Eleanor4 systemd[1]: Stopping Name Service Cache Daemon...
    > 2013-12-18T13:59:03.138898+01:00 Eleanor4 systemd[1]: Starting Name Service Cache Daemon...
    Do you see it? Syslog was restarted; notice the version change, proving
    it was updated. And nscd. I stopped looking there. Of course, if you
    look at "zypper ps" you see a thousand lines of things that have to be
    reloaded (libc was updated).

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

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

    Default Re: Zypper restart for "in use" services

    Quote Originally Posted by robin_listas View Post
    Again, zypper does restart services that it updates.
    Strictly speaking, it is done in RPM postinstall script. So it is up to each package(r) to implement. Most distributions including openSUSE provide set of macros that are used during RPM build and assist in doing standard tasks in uniform manner.

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Zypper restart for "in use" services

    On 2013-12-18 14:26, arvidjaar wrote:
    >
    > robin_listas;2609482 Wrote:
    >>
    >> Again, zypper does restart services that it updates.

    >
    > Strictly speaking, it is done in RPM postinstall script. So it is up to
    > each package(r) to implement. Most distributions including openSUSE
    > provide set of macros that are used during RPM build and assist in doing
    > standard tasks in uniform manner.


    Yes, I did mention it was those scripts, but your explanation is way
    more complete :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

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