Bug 821926 - nginx can no longer upgrade without downtime (after migration to systemd)
Summary: nginx can no longer upgrade without downtime (after migration to systemd)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nginx
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-15 18:56 UTC by Jamie Nguyen
Modified: 2020-11-05 10:05 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-26 08:06:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jamie Nguyen 2012-05-15 18:56:27 UTC
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 21:39:26 UTC
Thoughts:

"/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 21:33:39 UTC
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 21:39:26 UTC
nginx-1.0.15-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/nginx-1.0.15-4.fc17

Comment 4 Fedora Update System 2012-05-17 22:58:36 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2012-7989/nginx-1.0.15-4.fc17
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-05-26 08:06:04 UTC
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.