Join the community today
Register Now

Beta Branch backport nginx upgrade snapshot rollback and nginx -t restart gate to…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Nov 24, 2026 at 6:04 PM.

  1. eva2000

    eva2000 Administrator Staff Member

    60,620
    12,635
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,302
    Local Time:
    8:44 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    backport nginx upgrade snapshot rollback and nginx -t restart gate to menu 4 in 140.00beta01


    A failed menu 4 run could leave a half-installed nginx, a config that
    references modules that are not installed, both masters running after a
    live upgrade, or sites on the maintenance page. Restarts also ran without
    an nginx -t check. Ported from 141.00beta01.

    Changes:
    - nginx_upgrade.inc: reject invalid nginx versions and archives, and check
    staged DESTDIR installs
    - snapshot the nginx binary, conf and modules to
    /usr/local/nginxbackup/upgrade-snapshot before the first live config edit
    - funct_nginxupgrade() wraps nginx_upgrade_main(); on failure it reports the
    stage, restores the previous build and makes sure nginx is serving
    - run nginx -t before restarting, and wait for a working master after a
    restart or USR2 binary swap
    - live upgrade: NGINX_ZERODT_DRAIN_TIMEOUT (default 300s) for old workers to
    drain; wait for the new master to exit before restoring pid files
    - enter opt-in maintenance after the build succeeds and leave it once the new
    nginx is verified
    - a failed zlib build now fails the upgrade
    - sitestatus.sh: reload nginx instead of restarting it, and return failures
    - cpcheck.inc: refresh /usr/bin/sitestatus when it differs, by rename

    Continue reading...

    140.00beta01 branch