)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9682ec05220674f0229df58b6d7f11bd89ad1344","unresolved":true,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":"\u003e It is strongly recommended to set ExecReload\u003d to a command that"},{"line_number":18,"context_line":"\u003e not only triggers a configuration reload of the daemon, but also"},{"line_number":19,"context_line":"\u003e synchronously waits for it to complete."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"which *neither* ExecReload would do."},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"c46da42e_29df9303","line":19,"updated":"2022-03-24 17:48:02.000000000","message":"Tim says this was from here:\n\nhttps://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecReload\u003d","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"089ebfd0d6a1389123e66356bb657a84ec68acf7","unresolved":true,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"As a result, WSGI server systemd unit files can now use something like"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"   ExecReload\u003dswift-reload $MAINPID"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"to follow systemd recommendations."},{"line_number":37,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"0f724454_9739bbf1","line":34,"range":{"start_line":34,"start_character":14,"end_line":34,"end_character":26},"updated":"2023-07-10 22:16:33.000000000","message":"I wonder if this should be more like `swift-signal reload` to leave space for a `swift-signal stop` subcommand, too. I don\u0027t *like* that I\u0027ve got a line in my units like\n```\nExecStop\u003dbash -c \"kill -HUP $MAINPID \u0026\u0026 tail -f /dev/null --pid $MAINPID\"\n```\nAlso: we should probably add some in-tree systemd unit recommendations. Pretty sure we\u0027re all using systemd at this point; it\u0027s just a question of whether we\u0027re rolling our own or using something provided by a distro -- either way, I think it behooves us to express *an* opinion upstream.\n\nNot that there has to be *one answer* -- I\u0027m not opposed to having a couple different trees of units, like\n\n- one set for simple deployments; no replication servers\n- another set for those *with* a separate replication network\n- yet another for containerized deployments\n\n...and operators shouldn\u0027t feel like they *have* to use them as-is; they should be more inspirations you could take and adapt to your deployment...","commit_id":"5bfeafa7db8e091ea98b656d26b73090b97aa8f3"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9682ec05220674f0229df58b6d7f11bd89ad1344","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"64137eb4_56b23ec7","updated":"2022-03-24 17:48:02.000000000","message":"I talked with Tim more about this and I\u0027d like to understand what we should be doing better","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3d203f933360a30209119f1cc6313b7afe6f32f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"70b7b917_56e30a35","updated":"2022-03-25 12:16:20.000000000","message":"no tests 😊","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7263de307574c370f5c250ad18226aa38949dfc5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d7acf523_84027169","in_reply_to":"70b7b917_56e30a35","updated":"2022-03-25 16:34:46.000000000","message":"Wanted to get some amount of buy-in before shoring it up with tests ;-)","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"688b32ff5a0c4c8d39dd1ec2ccd0093d927b1e22","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2a626601_cfa41410","updated":"2022-04-11 23:23:02.000000000","message":"I think there might be some advantage to having the \"wait to restart\" tool be stand-alone\n\n    ExecReload\u003d... --check-config\n    ExecReload\u003dkill -USR1 $pid\n    ExecReload\u003dswift-wait-for-restart $pid\n\nor even just making it\n\n    swift-safe-reloader --any-arbitrary-arg-gets-passed-through\n\nor maybe more flexible\n\n    ExecReload\u003dswift-reloader --signal\u003dUSR1 --check-config $pid\n\n... i don\u0027t know\n","commit_id":"4a68bb2bf731f6947d5d268475df06724ddb377c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d7fa257be9bf742b76e5f32c4f51fc831f2c38d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"2d070d28_42878d2d","updated":"2022-05-09 19:55:05.000000000","message":"apparently we\u0027ve been running this in prod","commit_id":"796335ea0ef5a9d69d30ee888f479ca1a3f35a3e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2d9a60024b5ef923112d14df1bf0e554a447fdf0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bc842b04_c5d58096","updated":"2022-04-21 18:05:22.000000000","message":"recheck","commit_id":"796335ea0ef5a9d69d30ee888f479ca1a3f35a3e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"08fafee0e9ba9d6cca4cbeda2767e0250722bcf5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6f5d11f7_0715e49d","in_reply_to":"2d070d28_42878d2d","updated":"2022-06-01 00:43:24.000000000","message":"Eh, but we\u0027re still not using the actual swift-reload command yet. I\u0027d still like some buy-in that this feels like the right tool before I write tests, and we\u0027ll need tests before merging. It\u0027s also worth looking at the alternate is-the-reload-done implementation at https://review.opendev.org/c/openstack/swift/+/837641 -- I\u0027d be happy to juggle the chain a bit so we don\u0027t have to touch manager.py","commit_id":"796335ea0ef5a9d69d30ee888f479ca1a3f35a3e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"73e02d02fc39909d6e92f2d693f6f99349636f75","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"10a93b4c_58d76f81","updated":"2022-07-05 06:29:08.000000000","message":"forgot the vote. -1 to fix the return codes, and change the last return so the EXIT_RELOAD_FAILED would actaully be used.","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2948235f484240350783945cb67b4bae593a119e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d335813b_f5dc039b","updated":"2022-10-28 14:53:21.000000000","message":"we\u0027re using this in prod - I don\u0027t think there\u0027s any serious reservations at this point.  It would be nice if adding a syntax error to swift/cli/reload.py would trip a unittest failure - but i guess we\u0027ll at least have flake8.","commit_id":"1f568fd7d9d2b9fcad273dac35734938583c2926"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a46005bbe079364d748c37303ff1f4ed72200ce2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"0540985e_fa02ffd0","updated":"2023-03-01 22:33:44.000000000","message":"recheck\n\nA 503 and a bunch of `umount: /mnt/sdb1: target is busy` errors; pretty sure it\u0027s transient.","commit_id":"ffce82c1e47b5a3b5b5ebac97b2f624d62b4e36b"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6af6a6b3c7bf0196def36aa8d6d49bdc95e509d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"42c1beaf_1d2d6cf4","updated":"2023-10-17 00:41:25.000000000","message":"This is still awesome. We\u0027ve been carrying it in prod for like a year and it\u0027s been solid.\nI do wonder if rather then running ps commands we start using something like psutil in python or something.. but I already have a follow up looking at that, so that doesn\u0027t need to be answered here.\n\nThis deserves to land. There are already follow ups, and continue to improve this as we need.","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"e0f52a055721ef664b29918c102f78a06ee05770","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"9edf6292_e019d845","updated":"2023-10-17 00:41:51.000000000","message":"just doing a recheck before I land it.","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"fc0bc6d118adc6b2bebf83f6d90526fc477c6e6f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"a3454d60_bc967e15","updated":"2023-10-17 00:41:33.000000000","message":"recheck","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"b8d930cf17c0f5103315120d508aba1b0c946dd3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"2b6c3a28_59081e3e","updated":"2023-10-17 02:05:10.000000000","message":"yup all good, zuul likes it too, let\u0027s land this one!","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c9bba2f0e456aeeecaec031dc94bf8dba341680f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"7d790b11_f25f1fa7","in_reply_to":"42c1beaf_1d2d6cf4","updated":"2023-10-17 17:10:37.000000000","message":"\u003e rather then running ps commands\n\nFurther down the chain, I start using a notify socket similar to what systemd does which removes the need for the process-tree polling. There was renewed interest in that when we started running into issues sometimes where the re-exec happened so quickly that polling didn\u0027t catch the caretaker process that would wait for new workers to come up then close the old sockets.","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"85e4ccc31e4e61291bc43a24ad1a61ff7914b407","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"cd9eb2bb_a3661e06","in_reply_to":"7d790b11_f25f1fa7","updated":"2023-10-18 21:39:21.000000000","message":"oh yes of course! I didn\u0027t consider that, nice!","commit_id":"212525118c520606ba94895c522ba21ed0373d2f"}],"swift/cli/reload.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6fadfbb685d61b96c36c6b8fbacf203dc57fb4c0","unresolved":true,"context_lines":[{"line_number":19,"context_line":"   * validating that the process is a Swift WSGI server manager,"},{"line_number":20,"context_line":"   * checking that the configuration file used is valid,"},{"line_number":21,"context_line":"   * sending the \"seamless reload\" signal, and"},{"line_number":22,"context_line":"   * waiting for the reload to complete."},{"line_number":23,"context_line":"\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from __future__ import print_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"f0d49248_4c20a8d4","line":22,"updated":"2022-03-10 20:40:43.000000000","message":"Maybe make this step optional? With a --no-wait option or something.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f88fff6d9f1076c50cdba4ba9772a90126aa17ea","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   * validating that the process is a Swift WSGI server manager,"},{"line_number":20,"context_line":"   * checking that the configuration file used is valid,"},{"line_number":21,"context_line":"   * sending the \"seamless reload\" signal, and"},{"line_number":22,"context_line":"   * waiting for the reload to complete."},{"line_number":23,"context_line":"\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from __future__ import print_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"4f578cdf_f26b3f7c","line":22,"in_reply_to":"e9b8503e_3200cdfb","updated":"2023-02-16 22:59:23.000000000","message":"Done","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"acaf807b01869803c542423711bbf08abb22a8fe","unresolved":true,"context_lines":[{"line_number":19,"context_line":"   * validating that the process is a Swift WSGI server manager,"},{"line_number":20,"context_line":"   * checking that the configuration file used is valid,"},{"line_number":21,"context_line":"   * sending the \"seamless reload\" signal, and"},{"line_number":22,"context_line":"   * waiting for the reload to complete."},{"line_number":23,"context_line":"\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from __future__ import print_function"}],"source_content_type":"text/x-python","patch_set":1,"id":"e9b8503e_3200cdfb","line":22,"in_reply_to":"f0d49248_4c20a8d4","updated":"2022-07-05 06:27:36.000000000","message":"Sounds reasonable, we do have a --no-wait option in swift-init to seems to match. Just check config and issue the reload.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3d203f933360a30209119f1cc6313b7afe6f32f6","unresolved":true,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    cmd, script \u003d validate_manager_pid(args.pid)"},{"line_number":87,"context_line":"    if script not in {\"swift-proxy-server\", \"swift-account-server\","},{"line_number":88,"context_line":"                      \"swift-container-server\", \"swift-object-server\"}:"},{"line_number":89,"context_line":"        print(\"Process does not support config checks: %s\" % script,"},{"line_number":90,"context_line":"              file\u003dsys.stderr)"},{"line_number":91,"context_line":"        exit(EXIT_BAD_PID)"}],"source_content_type":"text/x-python","patch_set":1,"id":"cb2e353f_ff76a98f","line":88,"updated":"2022-03-25 12:16:20.000000000","message":"this is a bit brittle/maintenance burden: perhaps just try the --check_config and inspect the return code? parser failure returns 2 IIRC","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"688b32ff5a0c4c8d39dd1ec2ccd0093d927b1e22","unresolved":true,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    cmd, script \u003d validate_manager_pid(args.pid)"},{"line_number":87,"context_line":"    if script not in {\"swift-proxy-server\", \"swift-account-server\","},{"line_number":88,"context_line":"                      \"swift-container-server\", \"swift-object-server\"}:"},{"line_number":89,"context_line":"        print(\"Process does not support config checks: %s\" % script,"},{"line_number":90,"context_line":"              file\u003dsys.stderr)"},{"line_number":91,"context_line":"        exit(EXIT_BAD_PID)"}],"source_content_type":"text/x-python","patch_set":1,"id":"02219dbd_8324d3e4","line":88,"in_reply_to":"71a1aa99_f639bf87","updated":"2022-04-11 23:23:02.000000000","message":"that makes it even easier, run with --check-config and cross your fingers","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7263de307574c370f5c250ad18226aa38949dfc5","unresolved":true,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    cmd, script \u003d validate_manager_pid(args.pid)"},{"line_number":87,"context_line":"    if script not in {\"swift-proxy-server\", \"swift-account-server\","},{"line_number":88,"context_line":"                      \"swift-container-server\", \"swift-object-server\"}:"},{"line_number":89,"context_line":"        print(\"Process does not support config checks: %s\" % script,"},{"line_number":90,"context_line":"              file\u003dsys.stderr)"},{"line_number":91,"context_line":"        exit(EXIT_BAD_PID)"}],"source_content_type":"text/x-python","patch_set":1,"id":"71a1aa99_f639bf87","line":88,"in_reply_to":"cb2e353f_ff76a98f","updated":"2022-03-25 16:34:46.000000000","message":"We\u0027re not always great about bombing out on unknown options, though. swift-ring-builder, for example, allows you to do something like\n\n vagrant@saio:~$ swift-ring-builder foo create 8 3 0 --check-config\n vagrant@saio:~$ echo $?\n 0\n\nno problem.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3d203f933360a30209119f1cc6313b7afe6f32f6","unresolved":true,"context_lines":[{"line_number":95,"context_line":"    try:"},{"line_number":96,"context_line":"        subprocess.check_call(cmd.split() + [\"--check-config\"])"},{"line_number":97,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":98,"context_line":"        print(\"Failed to validate config\", file\u003dsys.stderr)"},{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"980a59ab_20ca8d5c","line":98,"updated":"2022-03-25 12:16:20.000000000","message":"including some context from the CalledProcessError might be useful","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7263de307574c370f5c250ad18226aa38949dfc5","unresolved":true,"context_lines":[{"line_number":95,"context_line":"    try:"},{"line_number":96,"context_line":"        subprocess.check_call(cmd.split() + [\"--check-config\"])"},{"line_number":97,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":98,"context_line":"        print(\"Failed to validate config\", file\u003dsys.stderr)"},{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"2f4f80b1_996f65cc","line":98,"in_reply_to":"980a59ab_20ca8d5c","updated":"2022-03-25 16:34:46.000000000","message":"The subprocess\u0027s stderr goes to *our* stderr -- about the only extra bit of context we could hope for would be the return code. I guess that might be useful -- but for the most part, I don\u0027t care whether it exited 1 or 2 or whatever.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6fadfbb685d61b96c36c6b8fbacf203dc57fb4c0","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        original_children \u003d get_child_pids(args.pid)"},{"line_number":103,"context_line":"        children_since_reload \u003d set()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if args.verbose:"}],"source_content_type":"text/x-python","patch_set":1,"id":"d8ba62f4_87c9879f","line":102,"updated":"2022-03-10 20:40:43.000000000","message":"Maybe abort if this comes back empty? Would indicate that it was previously started with workers\u003d0, and can\u0027t reload...","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4a7ef039aad21d4463ab3167f1401b25aa86fb9f","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        original_children \u003d get_child_pids(args.pid)"},{"line_number":103,"context_line":"        children_since_reload \u003d set()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if args.verbose:"}],"source_content_type":"text/x-python","patch_set":1,"id":"d5f04d88_8a08f945","line":102,"in_reply_to":"904b3b05_a2961275","updated":"2022-04-12 22:47:37.000000000","message":"Yup -- otherwise, you risk sampling after the little caretaker process starts up. I\u0027ve got an idea now, though... I\u0027ll put it up as a couple follow-ups.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2d9a60024b5ef923112d14df1bf0e554a447fdf0","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        original_children \u003d get_child_pids(args.pid)"},{"line_number":103,"context_line":"        children_since_reload \u003d set()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if args.verbose:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f5405ed3_e563aed4","line":102,"in_reply_to":"d5f04d88_8a08f945","updated":"2022-04-21 18:05:22.000000000","message":"We can steal some ideas from systemd: https://review.opendev.org/c/openstack/swift/+/837641","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"688b32ff5a0c4c8d39dd1ec2ccd0093d927b1e22","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        exit(EXIT_BAD_CONFIG)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    try:"},{"line_number":102,"context_line":"        original_children \u003d get_child_pids(args.pid)"},{"line_number":103,"context_line":"        children_since_reload \u003d set()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        if args.verbose:"}],"source_content_type":"text/x-python","patch_set":1,"id":"904b3b05_a2961275","line":102,"in_reply_to":"d8ba62f4_87c9879f","updated":"2022-04-11 23:23:02.000000000","message":"hrm, so we have to sample the children before send USR1?","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3d203f933360a30209119f1cc6313b7afe6f32f6","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                # the temporary child waiting to shutdown sockets"},{"line_number":121,"context_line":"                break"},{"line_number":122,"context_line":"            # We want this to be fairly low, since the temporary child"},{"line_number":123,"context_line":"            # may not hang around very long"},{"line_number":124,"context_line":"            time.sleep(0.1)"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e8f1e5c8_975ae0c2","line":123,"updated":"2022-03-25 12:16:20.000000000","message":"so if we miss capturing the child that is expected to die, the reload will report failure?\n\nwhat if a new child dies *unexpectedly*? that could lead to success being reported? shouldn\u0027t we wait for more confidence that the expected number of children are running?","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7263de307574c370f5c250ad18226aa38949dfc5","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                # the temporary child waiting to shutdown sockets"},{"line_number":121,"context_line":"                break"},{"line_number":122,"context_line":"            # We want this to be fairly low, since the temporary child"},{"line_number":123,"context_line":"            # may not hang around very long"},{"line_number":124,"context_line":"            time.sleep(0.1)"},{"line_number":125,"context_line":"        else:"},{"line_number":126,"context_line":"            print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5c8624e6_ed362616","line":123,"in_reply_to":"e8f1e5c8_975ae0c2","updated":"2022-03-25 16:34:46.000000000","message":"\u003e so if we miss capturing the child that is expected to die, the reload will report failure?\n\nYeah, the \"poll and try to track state\" isn\u0027t great. I\u0027d love it if we made better use of the systemd notify socket. OTOH, this ought to work well enough -- I\u0027d be shocked if we could get server start-up times under 100ms.\n\n\u003e what if a new child dies *unexpectedly*? that could lead to success being reported?\n\nThe most common way I\u0027ve seen the temporary child die unexpectedly is when the re-exec\u0027d process dies unexpectedly (so the pipe closes without the main process notifying the temp child). In that case, the `ps -p $MAINPID` will throw a CalledProcessError.\n\nWay I see it, there are currently three main buckets for the way this thing can exit:\n\n- The pre-flight checks failed, so we\u0027re exiting without sending any signal.\n- We sent the signal, and it looks like the config change has been effected.\n- We sent the signal, and had to give up waiting for the reload to complete.\n\nSure, it\u0027d be nice to detect \"ended in a known-good running state\". OTOH, we expect ops to still have some kind of alerting/monitoring backstop that will notice the failed daemon and bring it to someone\u0027s attention. In light of that, I\u0027m willing to put \"the reload killed everybody\" into that middle bucket, at least for now. It\u0027d be great if we could separate those out a little more, but even the current level of detection feels way more complicated and fragile than I\u0027d like.","commit_id":"290c2d0e1ee2772e436b24d3f392fedc93c5ca37"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"acaf807b01869803c542423711bbf08abb22a8fe","unresolved":true,"context_lines":[{"line_number":41,"context_line":"EXIT_BAD_PID \u003d 2"},{"line_number":42,"context_line":"EXIT_BAD_CONFIG \u003d 1"},{"line_number":43,"context_line":"EXIT_RELOAD_FAILED \u003d 1"},{"line_number":44,"context_line":"EXIT_RELOAD_TIMEOUT \u003d 128 + errno.ETIMEDOUT"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def validate_manager_pid(pid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"db5b21ee_114a40c2","line":44,"updated":"2022-07-05 06:27:36.000000000","message":"Hmm can\u0027t really land this until we get the exit codes undercontrol.\nI dont even see EXIT_RELOAD_FAILED being returned.\n\nJust giving them a different +ve return value would be a start:\n\n  EXIT_BAD_PID \u003d 1\n  EXIT_BAD_CONFIG \u003d 2\n  EXIT_RELOAD_FAILED \u003d 3\n  EXIT_RELOAD_TIMEOUT \u003d 128 + errno.ETIMEDOUT","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"a468d9db72f76c65dfcf9fef05e938aa0e0cc52a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"EXIT_BAD_PID \u003d 2"},{"line_number":42,"context_line":"EXIT_BAD_CONFIG \u003d 1"},{"line_number":43,"context_line":"EXIT_RELOAD_FAILED \u003d 1"},{"line_number":44,"context_line":"EXIT_RELOAD_TIMEOUT \u003d 128 + errno.ETIMEDOUT"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def validate_manager_pid(pid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"52c8894f_222d8d2e","line":44,"in_reply_to":"db5b21ee_114a40c2","updated":"2023-06-19 05:01:11.000000000","message":"Done","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"acaf807b01869803c542423711bbf08abb22a8fe","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        info \u003d subprocess.check_output(["},{"line_number":53,"context_line":"            \"ps\", \"-p\", str(pid), \"--no-headers\", \"-o\", \"sid,ppid,pid,cmd\""},{"line_number":54,"context_line":"        ], **kwargs)"},{"line_number":55,"context_line":"        sid, ppid, pid, cmd \u003d info.strip().split(None, 3)"},{"line_number":56,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":57,"context_line":"        print(\"Failed to get process information for %s\" % pid,"},{"line_number":58,"context_line":"              file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"349cae16_0699ccc0","line":55,"updated":"2022-07-05 06:27:36.000000000","message":"Hrm, is it just me, or does a bunch of subprocessing out to ps commands seem a little non portable, brittle and non pythony?\n\nWhat if we just used psutils or something, seems to be cross platform and rather mature. Although it\u0027ll have to be added as a project dependency, although making this reloading a first class feature I think makes it worth it. Something like https://review.opendev.org/c/openstack/swift/+/848691","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f88fff6d9f1076c50cdba4ba9772a90126aa17ea","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        info \u003d subprocess.check_output(["},{"line_number":53,"context_line":"            \"ps\", \"-p\", str(pid), \"--no-headers\", \"-o\", \"sid,ppid,pid,cmd\""},{"line_number":54,"context_line":"        ], **kwargs)"},{"line_number":55,"context_line":"        sid, ppid, pid, cmd \u003d info.strip().split(None, 3)"},{"line_number":56,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":57,"context_line":"        print(\"Failed to get process information for %s\" % pid,"},{"line_number":58,"context_line":"              file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"a1245e40_6bacd372","line":55,"in_reply_to":"349cae16_0699ccc0","updated":"2023-02-16 22:59:23.000000000","message":"I forgot about `os.getsid()` -- `cmd` is the only other bit I really care about, so may as well just read that out of `/proc` like we already do in swift/common/manager.py","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6af6a6b3c7bf0196def36aa8d6d49bdc95e509d7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        info \u003d subprocess.check_output(["},{"line_number":53,"context_line":"            \"ps\", \"-p\", str(pid), \"--no-headers\", \"-o\", \"sid,ppid,pid,cmd\""},{"line_number":54,"context_line":"        ], **kwargs)"},{"line_number":55,"context_line":"        sid, ppid, pid, cmd \u003d info.strip().split(None, 3)"},{"line_number":56,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":57,"context_line":"        print(\"Failed to get process information for %s\" % pid,"},{"line_number":58,"context_line":"              file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":4,"id":"93d34b70_3bc3954d","line":55,"in_reply_to":"a1245e40_6bacd372","updated":"2023-10-17 00:41:25.000000000","message":"Ack","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"acaf807b01869803c542423711bbf08abb22a8fe","unresolved":true,"context_lines":[{"line_number":129,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":130,"context_line":"        # This could pop during any of the calls to get_child_pids"},{"line_number":131,"context_line":"        print(\"Process seems to have died!\", file\u003dsys.stderr)"},{"line_number":132,"context_line":"        exit(EXIT_RELOAD_TIMEOUT)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    print(\"Reloaded %s\" % script)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ef12f2d0_8308efc6","line":132,"range":{"start_line":132,"start_character":13,"end_line":132,"end_character":32},"updated":"2022-07-05 06:27:36.000000000","message":"This should be the EXIT_RELOAD_FAILED I suspect.","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"ed9ca8eb11ac9d40a692c00aab7c3f069fc3f1cc","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":130,"context_line":"        # This could pop during any of the calls to get_child_pids"},{"line_number":131,"context_line":"        print(\"Process seems to have died!\", file\u003dsys.stderr)"},{"line_number":132,"context_line":"        exit(EXIT_RELOAD_TIMEOUT)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    print(\"Reloaded %s\" % script)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"6534ade0_57cb2ffb","line":132,"range":{"start_line":132,"start_character":13,"end_line":132,"end_character":32},"in_reply_to":"09e9d8c7_c547f3bd","updated":"2023-08-17 16:14:37.000000000","message":"Done","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"16a5d8c055087f9e69381500ac8d29ebae0e8048","unresolved":true,"context_lines":[{"line_number":129,"context_line":"    except subprocess.CalledProcessError:"},{"line_number":130,"context_line":"        # This could pop during any of the calls to get_child_pids"},{"line_number":131,"context_line":"        print(\"Process seems to have died!\", file\u003dsys.stderr)"},{"line_number":132,"context_line":"        exit(EXIT_RELOAD_TIMEOUT)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    print(\"Reloaded %s\" % script)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"09e9d8c7_c547f3bd","line":132,"range":{"start_line":132,"start_character":13,"end_line":132,"end_character":32},"in_reply_to":"ef12f2d0_8308efc6","updated":"2022-07-18 19:38:06.000000000","message":"Whoops! Good catch.\n\nI think the difference between EXIT_BAD_CONFIG and EXIT_RELOAD_FAILED is actually pretty small, though -- I think that\u0027s part of why I moved toward having them match.","commit_id":"3ba4d53afcf5b3bb817f901001e24c33eb2f365a"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"4c665dae00163e24782f6ceebf6904aa6a40f5d3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    parser \u003d argparse.ArgumentParser(__doc__)"},{"line_number":76,"context_line":"    parser.add_argument(\"pid\", type\u003dint,"},{"line_number":77,"context_line":"                        help\u003d\"server PID which should be reloaded\")"},{"line_number":78,"context_line":"    parser.add_argument(\"-t\", \"--timeout\", type\u003dfloat, default\u003d300.0,"},{"line_number":79,"context_line":"                        help\u003d\"max time to wait for reload to complete\")"},{"line_number":80,"context_line":"    parser.add_argument(\"-v\", \"--verbose\", action\u003d\"store_true\","},{"line_number":81,"context_line":"                        help\u003d\"display more information as the process reloads\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"a78e7297_acf2936e","line":78,"updated":"2022-10-07 16:28:29.000000000","message":"LGTM, the default value has been chosen since SRE had to override the default value in production for swift-reload with 5 mins","commit_id":"1f568fd7d9d2b9fcad273dac35734938583c2926"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c5ca9de0874b679ad1245d3a908f793fad969795","unresolved":true,"context_lines":[{"line_number":111,"context_line":"            if new_children:"},{"line_number":112,"context_line":"                if args.verbose:"},{"line_number":113,"context_line":"                    print(\"Found new children: %s\" % \", \".join("},{"line_number":114,"context_line":"                        str(pid) for pid in new_children))"},{"line_number":115,"context_line":"                children_since_reload |\u003d new_children"},{"line_number":116,"context_line":"            if children_since_reload - children:"},{"line_number":117,"context_line":"                # At least one new child exited; presumably, it was"}],"source_content_type":"text/x-python","patch_set":6,"id":"d66e3b5b_a8b74303","line":114,"updated":"2022-10-27 19:16:44.000000000","message":"Interesting... running this verbosely in prod, there\u0027s a noticeable a second or two gap between each newly-found child -- you can see it pretty clearly in the etimes following a reload:\n\n $ ps --sid 11235 -o pid,etime \n    PID     ELAPSED\n  11235 56-17:47:12\n 275850       05:41\n 275859       05:40\n 275873       05:39\n 275899       05:37\n 275944       05:36\n 275957       05:34\n 275965       05:33\n 275974       05:32\n 275986       05:31\n 275996       05:29\n 276009       05:28\n 276049       05:26\n 276063       05:24\n 276073       05:23\n 276084       05:22\n 276100       05:20\n 276110       05:19\n 276126       05:17\n 276140       05:15\n 276149       05:14\n 276165       05:12\n 276186       05:11\n 276196       05:10\n 276205       05:08\n 276214       05:07\n 276269       05:05\n 276282       05:04\n 276397       05:02\n 276588       05:00\n 276651       04:58\n 276671       04:57\n 276840       04:55\n 276950       04:53\n 277075       04:52\n 277105       04:50\n 277147       04:49\n 277157       04:47\n 277170       04:46\n 277179       04:45\n 277199       04:43\n 277212       04:41\n 277230       04:40\n 277239       04:39\n 277248       04:37\n 277259       04:36\n 277269       04:35\n 277325       04:34\n 277341       04:32","commit_id":"1f568fd7d9d2b9fcad273dac35734938583c2926"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f88fff6d9f1076c50cdba4ba9772a90126aa17ea","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            if new_children:"},{"line_number":112,"context_line":"                if args.verbose:"},{"line_number":113,"context_line":"                    print(\"Found new children: %s\" % \", \".join("},{"line_number":114,"context_line":"                        str(pid) for pid in new_children))"},{"line_number":115,"context_line":"                children_since_reload |\u003d new_children"},{"line_number":116,"context_line":"            if children_since_reload - children:"},{"line_number":117,"context_line":"                # At least one new child exited; presumably, it was"}],"source_content_type":"text/x-python","patch_set":6,"id":"49c103b0_45d92506","line":114,"in_reply_to":"d66e3b5b_a8b74303","updated":"2023-02-16 22:59:23.000000000","message":"See https://review.opendev.org/c/openstack/swift/+/862843 -- shouldn\u0027t be such an issue now.","commit_id":"1f568fd7d9d2b9fcad273dac35734938583c2926"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f88fff6d9f1076c50cdba4ba9772a90126aa17ea","unresolved":true,"context_lines":[{"line_number":75,"context_line":"    parser \u003d argparse.ArgumentParser(__doc__)"},{"line_number":76,"context_line":"    parser.add_argument(\"pid\", type\u003dint,"},{"line_number":77,"context_line":"                        help\u003d\"server PID which should be reloaded\")"},{"line_number":78,"context_line":"    parser.add_argument(\"-t\", \"--timeout\", type\u003dfloat, default\u003d300.0,"},{"line_number":79,"context_line":"                        help\u003d\"max time to wait for reload to complete\")"},{"line_number":80,"context_line":"    parser.add_argument(\"-v\", \"--verbose\", action\u003d\"store_true\","},{"line_number":81,"context_line":"                        help\u003d\"display more information as the process reloads\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"ca4be93b_4bc421ea","line":78,"range":{"start_line":78,"start_character":63,"end_line":78,"end_character":68},"updated":"2023-02-16 22:59:23.000000000","message":"We could probably drop this back down to 30s now that https://review.opendev.org/c/openstack/swift/+/862843 has landed.","commit_id":"7341982ca36c74541317f40c9075accfa673e647"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1ad62dd56d1f332744db6d864a28be0040fbf4c1","unresolved":true,"context_lines":[{"line_number":75,"context_line":"    parser \u003d argparse.ArgumentParser(__doc__)"},{"line_number":76,"context_line":"    parser.add_argument(\"pid\", type\u003dint,"},{"line_number":77,"context_line":"                        help\u003d\"server PID which should be reloaded\")"},{"line_number":78,"context_line":"    parser.add_argument(\"-t\", \"--timeout\", type\u003dfloat, default\u003d300.0,"},{"line_number":79,"context_line":"                        help\u003d\"max time to wait for reload to complete\")"},{"line_number":80,"context_line":"    parser.add_argument(\"-v\", \"--verbose\", action\u003d\"store_true\","},{"line_number":81,"context_line":"                        help\u003d\"display more information as the process reloads\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"045a4dc7_49bdd540","line":78,"range":{"start_line":78,"start_character":63,"end_line":78,"end_character":68},"in_reply_to":"ca4be93b_4bc421ea","updated":"2023-03-01 17:04:44.000000000","message":"Nope -- 30s is still too short. Need to run down *why*, though.","commit_id":"7341982ca36c74541317f40c9075accfa673e647"}],"swift/common/manager.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2948235f484240350783945cb67b4bae593a119e","unresolved":true,"context_lines":[{"line_number":699,"context_line":"                continue"},{"line_number":700,"context_line":"            ps_cmd \u003d [\u0027ps\u0027, \u0027--ppid\u0027, str(pid), \u0027--no-headers\u0027, \u0027-o\u0027, \u0027pid\u0027]"},{"line_number":701,"context_line":"            for pid in subprocess.check_output(ps_cmd).split():"},{"line_number":702,"context_line":"                pid \u003d int(pid)"},{"line_number":703,"context_line":"                if self._signal_pid(sig, pid, pid_file, kwargs.get(\u0027verbose\u0027)):"},{"line_number":704,"context_line":"                    pids[pid] \u003d pid_file"},{"line_number":705,"context_line":"        return pids"}],"source_content_type":"text/x-python","patch_set":6,"id":"2296cb6a_f731f5d7","side":"PARENT","line":702,"updated":"2022-10-28 14:53:21.000000000","message":"this looks like a straight up unrelated refactor - am i missing something?","commit_id":"d6c1782fe5b3d9858c6e237db549dfd3c1625c67"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d36c6493a44c3768a6005cdf6c398c8418db8ec","unresolved":true,"context_lines":[{"line_number":699,"context_line":"                continue"},{"line_number":700,"context_line":"            ps_cmd \u003d [\u0027ps\u0027, \u0027--ppid\u0027, str(pid), \u0027--no-headers\u0027, \u0027-o\u0027, \u0027pid\u0027]"},{"line_number":701,"context_line":"            for pid in subprocess.check_output(ps_cmd).split():"},{"line_number":702,"context_line":"                pid \u003d int(pid)"},{"line_number":703,"context_line":"                if self._signal_pid(sig, pid, pid_file, kwargs.get(\u0027verbose\u0027)):"},{"line_number":704,"context_line":"                    pids[pid] \u003d pid_file"},{"line_number":705,"context_line":"        return pids"}],"source_content_type":"text/x-python","patch_set":6,"id":"bcb3e419_085a7fa8","side":"PARENT","line":702,"in_reply_to":"2296cb6a_f731f5d7","updated":"2022-10-28 16:04:56.000000000","message":"The refactored code gets imported in the new module: https://review.opendev.org/c/openstack/swift/+/833174/6/swift/cli/reload.py#37\n\nIf we like the direction of https://review.opendev.org/c/openstack/swift/+/837641, though, it won\u0027t be necessary.","commit_id":"d6c1782fe5b3d9858c6e237db549dfd3c1625c67"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"089ebfd0d6a1389123e66356bb657a84ec68acf7","unresolved":true,"context_lines":[{"line_number":699,"context_line":"                continue"},{"line_number":700,"context_line":"            ps_cmd \u003d [\u0027ps\u0027, \u0027--ppid\u0027, str(pid), \u0027--no-headers\u0027, \u0027-o\u0027, \u0027pid\u0027]"},{"line_number":701,"context_line":"            for pid in subprocess.check_output(ps_cmd).split():"},{"line_number":702,"context_line":"                pid \u003d int(pid)"},{"line_number":703,"context_line":"                if self._signal_pid(sig, pid, pid_file, kwargs.get(\u0027verbose\u0027)):"},{"line_number":704,"context_line":"                    pids[pid] \u003d pid_file"},{"line_number":705,"context_line":"        return pids"}],"source_content_type":"text/x-python","patch_set":6,"id":"a8edbf1b_5400dfd7","side":"PARENT","line":702,"in_reply_to":"bcb3e419_085a7fa8","updated":"2023-07-10 22:16:33.000000000","message":"We\u0027ve been seeing some practical advantages to https://review.opendev.org/c/openstack/swift/+/837641 -- should I restack these patches to get rid of the process-tree polling (and this refactor) all together?","commit_id":"d6c1782fe5b3d9858c6e237db549dfd3c1625c67"}]}
