Skip to content

[2.4.x] Merge changes to mod_systemd - #773

Open
notroj wants to merge 13 commits into
apache:2.4.xfrom
notroj:2.4.x-mod_systemd
Open

notroj wants to merge 13 commits into
apache:2.4.xfrom
notroj:2.4.x-mod_systemd

Conversation

@notroj

@notroj notroj commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Merge r1928356, r1937596, r1937597, r1937598, r1937599, r1937600, r1937601, r1937602, r1937635, r1937644, r1937646, r1937647 from trunk:

The .github/workflows/linux.yml change from r1937596 is not included: 2.4.x CI has no reduced-exports job and no pytest target selection for it to hook into, so the new test/modules/arch/linux suite is not run by CI here.

mod_systemd: add missing space

Submitted by: Christian Hesse
Github: closes #557

  • test/modules/arch/linux/: New test suite.

  • test/pyhttpd/env.py (HttpdTestEnv.set_httpd_env, _clean_path_env):
    Allow a suite to add variables to the environment httpd is started
    with.

  • test/pyhttpd/conf/stop.conf.template: Set DefaultRuntimeDir and
    PidFile to match httpd.conf, so that "apachectl -k stop" finds the
    running server.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #723

  • modules/arch/unix/mod_systemd.c (systemd_monitor): Avoid dividing by a
    zero uptime, and report the idle and busy figures as percentages.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #723

  • modules/arch/unix/mod_systemd.c (ap_systemd_listen_fds,
    ap_find_systemd_socket): Remember the number of sockets passed, so a
    graceful restart of a socket-activated server works. Drop the
    unchecked getenv("LISTEN_FDS").

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #723

  • modules/arch/unix/mod_systemd.c (monotonic_usec, systemd_pre_config):
    Send MONOTONIC_USEC with RELOADING=1.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #723

  • modules/arch/unix/mod_systemd.c (systemd_stopping,
    systemd_post_config): Notify STOPPING=1 on shutdown.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #723

  • docs/manual/mod/mod_systemd.xml: Socket activation is supported.
    Generated HTML not rebuilt.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: closes #723

  • test/modules/arch/: Add missing init.py
    files lost in translation from the PR.

Fixes: 4abdd20 (r1937596)

  • test/pyhttpd/env.py (HttpdTestEnv.apache_hard_restart, read_pid_file):
    Moved here from the mod_systemd tests, for use by other suites. [skip ci]

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #727

mod_systemd: Implement watchdog support:

  • modules/arch/unix/mod_systemd.c (watchdog_ping): New.
    (systemd_pre_config, systemd_post_config, systemd_monitor): Send the
    watchdog keep-alive, and warn (AH10621) if WatchdogSec is too short
    to be met.

  • docs/manual/mod/mod_systemd.xml: Document watchdog support.

  • test/modules/arch/linux/test_006_watchdog.py: New test suite.

  • test/modules/arch/linux/env.py (ForegroundServer): New, running httpd
    in the foreground so $WATCHDOG_PID can name it.
    (TransientService): Take extra unit properties.

  • test/modules/arch/linux/test_001_notify.py
    (test_systemd_001_09_watchdog): No longer xfail; use a WatchdogSec
    which does not draw AH10621.

  • test/modules/arch/linux/README: Describe the watchdog tests.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: closes #728

  • docs/manual/mod/mod_systemd.xml: Document Type=notify-reload,
    ReloadSignal= and ExecReload=.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #729

  • test/modules/arch/linux/test_007_notify_reload.py: New test suite for
    Type=notify-reload.

  • test/modules/arch/linux/env.py (TransientService): Take the service
    type and whether to configure ExecReload=.
    (TransientService.systemctl): Take a timeout.
    (TransientService.reload, TransientService.rewrite_conf,
    error_log_size, error_log_since, systemd_version): New.

  • test/modules/arch/linux/README: Describe the new suite.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
GitHub: PR #729

🤖 Generated with Claude Code

notroj and others added 13 commits September 28, 2026 14:52
Submitted by: Christian Hesse <mail eworm.de>
Github: closes apache#557

Merge r1928356 from trunk.
(cherry picked from commit 9cd6c92)
* test/pyhttpd/env.py (HttpdTestEnv.set_httpd_env, _clean_path_env):
  Allow a suite to add variables to the environment httpd is started
  with.

* test/pyhttpd/conf/stop.conf.template: Set DefaultRuntimeDir and
  PidFile to match httpd.conf, so that "apachectl -k stop" finds the
  running server.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#723

Merge r1937596 from trunk.
(cherry picked from commit 4abdd20)
  zero uptime, and report the idle and busy figures as percentages.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#723

Merge r1937597 from trunk.
(cherry picked from commit f9ebab5)
  ap_find_systemd_socket): Remember the number of sockets passed, so a
  graceful restart of a socket-activated server works.  Drop the
  unchecked getenv("LISTEN_FDS").

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#723

Merge r1937598 from trunk.
(cherry picked from commit 3e26a67)
  Send MONOTONIC_USEC with RELOADING=1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#723

Merge r1937599 from trunk.
(cherry picked from commit 651b6a9)
  systemd_post_config): Notify STOPPING=1 on shutdown.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#723

Merge r1937600 from trunk.
(cherry picked from commit 75d0e8c)
  Generated HTML not rebuilt.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes apache#723

Merge r1937601 from trunk.
(cherry picked from commit 7bbc2b3)
  files lost in translation from the PR.

Fixes: 4abdd20 (r1937596)

Merge r1937602 from trunk.
(cherry picked from commit 4fe1b8a)
  Moved here from the mod_systemd tests, for use by other suites. [skip ci]

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#727

Merge r1937635 from trunk.
(cherry picked from commit 31d91bb)
* modules/arch/unix/mod_systemd.c (watchdog_ping): New.
  (systemd_pre_config, systemd_post_config, systemd_monitor): Send the
  watchdog keep-alive, and warn (AH10621) if WatchdogSec is too short
  to be met.

* docs/manual/mod/mod_systemd.xml: Document watchdog support.

* test/modules/arch/linux/test_006_watchdog.py: New test suite.

* test/modules/arch/linux/env.py (ForegroundServer): New, running httpd
  in the foreground so $WATCHDOG_PID can name it.
  (TransientService): Take extra unit properties.

* test/modules/arch/linux/test_001_notify.py
  (test_systemd_001_09_watchdog): No longer xfail; use a WatchdogSec
  which does not draw AH10621.

* test/modules/arch/linux/README: Describe the watchdog tests.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: closes apache#728

Merge r1937644 from trunk.
(cherry picked from commit 06c0a97)
  ReloadSignal= and ExecReload=.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#729

Merge r1937646 from trunk.
(cherry picked from commit 4a71f72)
  Type=notify-reload.

* test/modules/arch/linux/env.py (TransientService): Take the service
  type and whether to configure ExecReload=.
  (TransientService.systemctl): Take a timeout.
  (TransientService.reload, TransientService.rewrite_conf,
  error_log_size, error_log_since, systemd_version): New.

* test/modules/arch/linux/README: Describe the new suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#729

Merge r1937647 from trunk.
(cherry picked from commit be7efad)
  PidFile.

Merge the test/pyhttpd/conf/httpd.conf.template part of r1909769 from trunk.
(cherry picked from commit bdd49d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants