swift/test/unit/cli
Tim Burke 212525118c Add a swift-reload command
Previously, WSGI server systemd unit files might have used something like

   ExecReload=kill -USR1 $MAINPID

This was risky; in the related change, reloads were made safer, but
required more than one ExecReload line. Meanwhile, systemd docs
(https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecReload=)
say

> It is strongly recommended to set ExecReload= to a command that
> not only triggers a configuration reload of the daemon, but also
> synchronously waits for it to complete.

which *neither* set of ExecReloads would do.

Now, add a new swift-reload command which, given a pid,

   * validates that the PID seems to belong to a Swift WSGI server
     manager process,
   * checks that the config used by that PID is still valid,
   * signals the PID to perform a seamless reload, and
   * waits for the reload to complete by monitoring the PID's children.

As a result, WSGI server systemd unit files can now use something like

   ExecReload=swift-reload $MAINPID

to follow systemd recommendations.

Change-Id: Ifcadd2f8427f107aae1921cdd311f7973b0312e1
Related-Change: I9e5e158ce8be92535430b9cabf040063f5188bf4
2023-10-16 15:44:06 -07:00
..
__init__.py Add some tests for bin/swift-recon 2014-01-31 15:34:37 +00:00
test_container_deleter.py Modify log_name in internal clients' pipeline configs 2022-01-12 11:07:25 +00:00
test_default_output.stub Add Composite Ring Functionality 2017-05-15 16:42:00 -07:00
test_default_output_id_assigned.stub Add Composite Ring Functionality 2017-05-15 16:42:00 -07:00
test_default_sorted_output.stub Order devices in the output of swift-ring-builder 2017-06-22 16:06:48 -07:00
test_dispersion_report.py Test placeholder for dispersion_report module 2017-09-13 16:49:00 -06:00
test_form_signature.py pep8: Turn on E305 2020-04-03 21:22:38 +02:00
test_info.py Properly format meta and sysmeta in db info cli tools 2023-07-03 17:49:44 +00:00
test_ipv6_output.stub ring-builder: Better format large weights 2022-08-02 14:29:16 -07:00
test_manage_shard_ranges.py Merge "sharder: update own_sr stats explicitly" 2022-12-09 22:13:44 +00:00
test_recon.py Add and pipe reconstructor stats through recon 2021-08-20 00:03:40 +00:00
test_recon_cron.py Fix repeated unnecessarily 'os.makedirs()' in test_recon_cron.py 2023-09-23 23:32:09 +09:00
test_relinker.py Remove support for --link-check-limit 2021-07-14 14:57:11 -07:00
test_reload.py Add a swift-reload command 2023-10-16 15:44:06 -07:00
test_ring_builder_analyzer.py Use more specific asserts in test/unit/cli tests 2016-08-03 12:19:40 +00:00
test_ringbuilder.py ring-builder: Better format large weights 2022-08-02 14:29:16 -07:00
test_ringcomposer.py Py3: Port test/unit/test_ringcomposer.py 2018-12-01 03:28:52 +01:00