Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88151

Re: What is elegant way to do configuration on server app

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: What is elegant way to do configuration on server app
Date 2015-03-27 15:23 +0200
Organization A noiseless patient Spider
Message-ID <87384qmv5z.fsf@elektro.pacujo.net> (permalink)
References <CAEKwp_FsbbAOrBm1h-CE1PS358pJBadJqNDi1CN7upC_s3nqCw@mail.gmail.com> <mailman.189.1427360350.10327.python-list@python.org> <mf19qa$ii6$2@reader1.panix.com> <87h9t6n7wi.fsf@elektro.pacujo.net> <mailman.246.1427461945.10327.python-list@python.org>

Show all headers | View raw


Chris Angelico <rosuav@gmail.com>:

> The number of cases where this matters is fairly low. Doing the reload
> asynchronously is generally sufficient.

Not sure. Not sure at all. Issues like this occupy a great part of my
office hours.

> And even if you have something that waits for the reload to finish,
> you'll usually fire-and-forget that command anyway.

The command

   systemctl reload xyz.service

is supposed to return when the service is happily running with the
updated its configuration.

Any failures should be reported with a nonzero exit code from
"systemctl".

> For maximum portability, most programs are going to want to continue
> to respond to SIGHUP, even if they do a systemd-triggered reload some
> other way.

I disagree. You can't just assume you can send a SIGHUP to a daemon for
the LOLs. You must first discover the trick in the documentation.

The default reaction to SIGHUP is to crash. A daemon (which has detached
from the controlling terminal) is within its rights to do just that.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: What is elegant way to do configuration on server app Ben Finney <ben+python@benfinney.id.au> - 2015-03-26 19:59 +1100
  Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-26 15:49 +0000
    Re: What is elegant way to do configuration on server app Jerry OELoo <oyljerry@gmail.com> - 2015-03-27 16:28 +0800
      Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:28 +0000
        Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 03:36 +1100
          Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:44 +0000
    Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 10:47 +0200
      Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:12 +1100
        Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 15:23 +0200
          Re: What is elegant way to do configuration on server app Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:34 +1100
      Re: What is elegant way to do configuration on server app Grant Edwards <invalid@invalid.invalid> - 2015-03-27 16:30 +0000
        Re: What is elegant way to do configuration on server app Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 18:44 +0200

csiph-web