Bug 821926 - nginx can no longer upgrade without downtime (after migration to systemd)
nginx can no longer upgrade without downtime (after migration to systemd)
Product: Fedora
Classification: Fedora
Component: nginx (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jamie Nguyen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-05-15 14:56 EDT by Jamie Nguyen
Modified: 2012-05-26 04:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-05-26 04:06:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jamie Nguyen 2012-05-15 14:56:27 EDT
Bug opened to track progress.

This was caused by my own oversight when migrating nginx to systemd.

Prior to f17, the following command could be performed:

    /etc/init.d/nginx upgrade

This uses an nginx built-in feature to update nginx without any downtime. nginx responds to a "kill -USR2" by launching a new process using the new binary, before phasing out the old nginx process. The old process can then be gracefully phased out using the WINCH signal (or stopped using QUIT).
Comment 1 Jamie Nguyen 2012-05-15 17:39:26 EDT

"/etc/init.d/nginx upgrade" has always been a manual thing, but there isn't a way to implement something similar in systemd. It would have to either be in %post or live in a separate script.

If in %post, a zero-downtime upgrade would happen automatically after every "yum update". I believe this is what Debian do.

If in a separate script, the zero-downtime upgrade would have to be done manually following a "yum update". nginx also offers the possibility to "rollback" to the old binary following a zero-downtime upgrade, but this is not currently implemented in /etc/inid.d/nginx. This would be a nice feature to have if re-implementing in a separate script.

I'm currently leaning towards a separate script for rollback functionality. Our httpd package doesn't do any automatic zero-downtime upgrade following a package update. Probably better to take the safer approach for nginx rather than doing anything automatically.

Info: http://wiki.nginx.org/CommandLine#Upgrading_To_a_New_Binary_On_The_Fly
Comment 2 Jamie Nguyen 2012-05-16 17:33:39 EDT
Decided to write a simple non-interactive script without "rollback" feature. This matches the old initscript in function (but not implementation), so there is no change for users other than running "/usr/bin/nginx-upgrade" instead of "/etc/init.d/nginx upgrade".
Comment 3 Fedora Update System 2012-05-16 17:39:26 EDT
nginx-1.0.15-4.fc17 has been submitted as an update for Fedora 17.
Comment 4 Fedora Update System 2012-05-17 18:58:36 EDT
Package nginx-1.0.15-4.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nginx-1.0.15-4.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-05-26 04:06:04 EDT
nginx-1.0.15-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.