)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f35a8874d32e5fb31c1292250562c6ef3c343146","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"91ec8885_ab1905e9","line":16,"updated":"2022-05-31 18:02:47.000000000","message":"UpgradeImpact:\n\n\u003e Initial reload after upgrading will time out waiting for the reload to complete, since the old code will not be notifying the abstract socket.","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5947bfbe_61df31c4","line":16,"in_reply_to":"0405c487_d4f8a48a","updated":"2023-12-04 23:22:05.000000000","message":"confirmed; swift-reload sends SIGUSR1 and the new exec\u0027d manager send the READY\u003d1 notification to both servers, but no \"RELOADING\" message is sent from the old manager code, and the old systemd_notify only sends the message to systemd.","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"0178918a_b0d96931","line":16,"in_reply_to":"5947bfbe_61df31c4","updated":"2025-02-13 20:33:47.000000000","message":"Done","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"0405c487_d4f8a48a","line":16,"in_reply_to":"91ec8885_ab1905e9","updated":"2022-10-28 17:50:20.000000000","message":"Actually... we might be good. We won\u0027t get the RELOADING notification, but w/e","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5a235655_ec229667","line":16,"updated":"2022-10-28 16:30:09.000000000","message":"Is the idea that polling is slower?  The locking behavior sounds good.  The UpgradeImpact doesn\u0027t sound very good.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"90258b8a_fbda765f","line":16,"in_reply_to":"5a235655_ec229667","updated":"2022-10-28 17:50:20.000000000","message":"Polling seems brittle -- from Alistair\u0027s comments on https://review.opendev.org/c/openstack/swift/+/833174\n\n\u003e so if we miss capturing the child that is expected to die, the reload will report failure?\n\u003e \n\u003e what 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?\n\nThe notify socket is positive signal that, yep, this process says it\u0027s ready.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Related-Change: Ib2dd9513d3bb7c7686e6fa35485317bbad915876"},{"line_number":19,"context_line":"Change-Id: I5f36aba583650bddddff5e55ac557302d023ea1b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"6b99b738_6e93f54f","line":16,"in_reply_to":"90258b8a_fbda765f","updated":"2023-12-04 23:22:05.000000000","message":"Acknowledged","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add abstract sockets for process notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"These are similar to systemd\u0027s notify sockets, but notifiers use a"},{"line_number":10,"context_line":"PID-specific name from a well-known namespace and listeners are assumed"},{"line_number":11,"context_line":"to be ephemeral."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"94f34d38_53321852","line":10,"updated":"2023-12-04 23:22:05.000000000","message":"the \"PID-specific\" part of the \"well-known\" name seems mostly to support `swift-reload \u003cswift WSGI server manager pid\u003e\" being run for two services at once.\n\nI think systemd takes a different approach, since all process on the system send messages to the same place:\n\n\n    [root@ip-192-168-19-206 ~]# cat /proc/26875/environ | strings | grep -i notify\n    NOTIFY_SOCKET\u003d/run/systemd/notify\n\n^ I added Type\u003dnotify and restarted a proxy on demo, 26875 is my new manager\n\n... that\u0027s probably why the need the pid ancdata","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":11,"context_line":"to be ephemeral."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"f26330a1_7607b05c","line":14,"updated":"2023-12-04 23:22:05.000000000","message":"Is the expected \"bonus\" that you get a traceback to indicate another swift-reload is already running?\n\n    Traceback (most recent call last):\n      File \"/usr/local/bin/swift-reload\", line 10, in \u003cmodule\u003e\n        sys.exit(main())\n      File \"/vagrant/swift/swift/cli/reload.py\", line 114, in main\n        with notification_server:\n      File \"/vagrant/swift/swift/common/utils/__init__.py\", line 6340, in __enter__\n        self.start()\n      File \"/vagrant/swift/swift/common/utils/__init__.py\", line 6328, in start\n        self.sock.bind(get_pid_notify_socket(self.pid))\n    OSError: [Errno 98] Address already in use","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to be ephemeral."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"de456cb0_d4d5d41a","line":14,"in_reply_to":"c7dd1f54_27e3ba6b","updated":"2024-12-04 01:17:33.000000000","message":"Was a regression when I pulled the binding to `start()/__enter__()` instead of `__init__()` going from PS 8-\u003e9. Fixed; now I get\n```\nvagrant@saio:~/swift$ swift-reload 3300988 \u0026 swift-reload 3300988 ; wait\n[1] 3304499\nCould not bind notification socket: [Errno 98] Address already in use\nReloaded swift-proxy-server\n[1]+  Exit 1                  swift-reload 3300988\n```","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0b2d147fb0e7e9daeb95e2472c20915ca2b7bcbe","unresolved":true,"context_lines":[{"line_number":11,"context_line":"to be ephemeral."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Update swift-reload to use these instead of polling child processes to"},{"line_number":14,"context_line":"determine when a server reload has completed.  Bonus: it also acts as a"},{"line_number":15,"context_line":"non-blocking lock to prevent two swift-reload commands from reloading a"},{"line_number":16,"context_line":"process at the same time."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"c7dd1f54_27e3ba6b","line":14,"in_reply_to":"f26330a1_7607b05c","updated":"2024-01-23 18:13:04.000000000","message":"Yup -- ergonomics could stand to be improved, I suppose.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Tim Burke \u003ctim.burke@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2025-01-16 10:14:19 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add abstract sockets for process notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"These are similar to systemd\u0027s notify sockets, but notifiers use a"},{"line_number":10,"context_line":"PID-specific name from a well-known namespace and listeners are assumed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"d6c3a127_70e00cf9","line":7,"updated":"2025-02-13 20:33:47.000000000","message":"maybe part of my hang up is just this title!?  It sounds like a feature - and because it says \"abstract\" I immediately don\u0027t like it!\n\n\u003e The annoying problem is that swift-reload as written today could in theory miss the socket-closer, who\u0027s disappearance is how it decides the re-exec\u0027d manager must be done starting workers (i.e. it send b\u0027ready\u0027 over the pipe). This is definately worth addressing\n\nThis problem exists for all swift operators that use swift-reload right?  Do we not have a bug report?  Like what does the problem look like; is it easy to functionally reproduce and verify this change fixes it?  How are the operators not beating down our door to fix this?  Are they ALL carrying this patch!?\n\nI think the race was actually pretty small, but it did exist:\n\nhttps://bugs.launchpad.net/swift/+bug/2098405\n\n... we\u0027ve been carrying this for so long it\u0027s hard to say how much of a problem it was vs. how little other deployers use swift-reload ???  Either way this moves us into a better state and in the right direction; moreover having lived with this code for a while now... it hasn\u0027t been a big source of problems so hopefully the maintenance burden continues to be light.","commit_id":"fa6c72ffaef10abe59bb0ad50993fef718ba3d48"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e5bf0eb0_45f60d34","updated":"2022-10-28 16:30:09.000000000","message":"this might be an ok idea, mainly for the swift-reload locking?  since it\u0027s a new primative I think some testing would be helpful to understand the required behaviors we want to maintain.  I\u0027m not familiar with domain sockets - and espeically not the conventions of the PASSCRD options.  ","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0ddd1c5d_2a21a729","updated":"2023-06-21 20:47:06.000000000","message":"All those py2 notes were actually moot -- py2 doesn\u0027t have `socket.recvmsg`, so it\u0027s not getting the pid-checking anyway.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7058da5466248d5976ea5245654a09a2de89e8d3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"db205991_75502edc","updated":"2023-06-09 07:22:49.000000000","message":"Cool, I think I grok this. Swift-reload will start getting the systemd notifications and can use it as it\u0027s own state machine. Love this idea!\n\nWorked through the hold chain, grokked it into head. And I think it all looks good. But need to test it. Will get to that ASAP. But I think its good if we want to carry and try it in our downstream demo or staging.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"894a18d8dbfa8d01978b7916991d3ed1086f03bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"36a41293_4d627cc4","updated":"2023-11-06 18:01:01.000000000","message":"recheck","commit_id":"17ba70cb33f0ce78ebc0563ec51ec00ccc25af73"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"4c205e8e_3bcb02bd","updated":"2023-12-04 23:22:05.000000000","message":"Reviewing this change was an interesting mix of low level socket details, systemd man page exploration and consideration of high level design for a annoying problem.\n\nThe annoying problem is that swift-reload as written today could in theory miss the socket-closer, who\u0027s disappearance is how it decides the re-exec\u0027d manager must be done starting workers (i.e. it send b\u0027ready\u0027 over the pipe).  This is definately worth addressing - my values would steer me towards the cheapest/most-obvious solution; perhaps this is that.  But...\n\nAt first glance I don\u0027t understand why we couple the fix with systemd notifications?\n\nBut at deeper glance I\u0027d wonder if we shouldn\u0027t try and actually *use* Type\u003dnotify with systemd and have our ExecReload script just poll systemd (at least until we get a systemd that supports Type\u003dnotify-reload https://github.com/systemd/systemd/pull/25916)\n\nThe change itself probably has a few quirks worth addressing:\n\n * bufsize/self.RECV_SIZE\n * CMSG_SPACE/CMSG_LEN\n * why do need ancdata to capture source pid if we only ever expect processes to write to their own-pid notification socket?\n * conversly if we didn\u0027t use an anonymous socket could we just have swift always send to /var/run/swift.notifications and multiple listeners could come and go picking out the messages from the pids they want?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e34edfcbf52b03b5d1aadbcf266203ba84803bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"b005ebf9_72df5197","updated":"2023-12-04 06:18:19.000000000","message":"This looks awesome Tim. I learnt alot about acillary data in sockets. I think it\u0027s good to have that as a sanity check. And I like how it all piggy backs on systemd\u0027s notification system/state machine.\n\nI think I\u0027m also ok with the direction of 900957, being more explicit about the old workers and listening sockets (and keeping them over to be closed after reexec (being inherited)) is pretty clever.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"d8d7a290_6ef27657","in_reply_to":"4c205e8e_3bcb02bd","updated":"2024-12-04 01:17:33.000000000","message":"\u003e At first glance I don\u0027t understand why we couple the fix with systemd notifications?\n\nBecause the systemd folk have already spent plenty of time thinking about *exactly* the problem we want to solve; why wouldn\u0027t we want to borrow the same message format, especially when we\u0027ve already learned to send it?\n\n\u003e *use* Type\u003dnotify with systemd and have our ExecReload script just poll systemd\n\nSo... *even stronger* systemd coupling? I rather hate it -- say what you may about the coupling here, but this doesn\u0027t actually **require** systemd at all.\n\n\u003e at least until we get a systemd that supports Type\u003dnotify-reload\n\nI mean, if `Type\u003dnotify-reload` were a thing before all this started, I\u0027d certainly be tempted to piggy-back off it. But that landed in Jan \u002723, while `swift-reload` was first proposed in Mar \u002722 -- I think there was a real and demonstrable need for similar functionality ahead of full systemd support.\n\n\u003e * why do need ancdata to capture source pid if we only ever expect processes to write to their own-pid notification socket?\n\nBelt \u0026 bracers. I can just drop the PID-verification, if you really don\u0027t want it...\n\n\u003e * conversly if we didn\u0027t use an anonymous socket could we just have swift always send to /var/run/swift.notifications and multiple listeners could come and go picking out the messages from the pids they want?\n\nNot gonna work -- even with `REUSEADDR` and `REUSEPORT`, trying to have a second socket `bind()` raises `OSError: [Errno 98] Address already in use`. I suppose the *one* way you might get multiple listeners is to `fork` after `bind`... but even then, it\u0027s not like the messages would get duplicated to the two servers -- each would only see a fraction of the messages.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":12,"id":"cf6d10d2_48f4c70b","in_reply_to":"d8d7a290_6ef27657","updated":"2025-02-13 20:33:47.000000000","message":"\u003e Because the systemd folk have already spent plenty of time thinking about exactly the problem we want to solve; why wouldn\u0027t we want to borrow the same message format, especially when we\u0027ve already learned to send it?\n\n\u003e So... even stronger systemd coupling? I rather hate it\n\nThese statements don\u0027t paint a clear picture of your opinion on how deeply swift upstream should invest in support for systemd integration?  It reads like \"copy is ok, depend on for functionality is bad\" - am I getting that signal correct?\n\nI sort of think, \"reimplement/fork/parallel-develpoment\" is probably a smell; while \"achieve greatness by standing on the shoulders of giants to enable functionality we don\u0027t want to maintain\" is brilliant! - so to the extent that is *necessary* yes, let\u0027s embrace and extend systemd notify to meet the needs of swift deployers when systemd doesn\u0027t meet their needs but ONLY to the mininimum extent necessary and make sure we\u0027re TRYING to get deployers (and our own deployments!) onto a standard interface that we can depend on so we don\u0027t have to maintain all the complexity of how to solve all the tricky problems in that domain.  (we have our own problems to solve)","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"e21f912f_cfbae4f5","updated":"2025-02-13 20:33:47.000000000","message":"I was able to duplicate the existing failure with swift-reload on master as reported in the lp bug:\n\nswift-reload returns exit code 238 Timed out reloading swift-xxx-server even on success - https://bugs.launchpad.net/swift/+bug/2098405\n\nWith this change, when I break my swift-reload like:\n\n```\ndiff --git a/swift/cli/reload.py b/swift/cli/reload.py\nindex cecf26a3c..d439c2a0f 100755\n--- a/swift/cli/reload.py\n+++ b/swift/cli/reload.py\n@@ -31,6 +31,7 @@ import signal\n import socket\n import subprocess\n import sys\n+import time\n \n from swift.common.utils import NotificationServer\n \n@@ -101,6 +102,7 @@ def main(args\u003dNone):\n                 if args.verbose:\n                     print(\"Sending USR1 signal\")\n                 os.kill(args.pid, signal.SIGUSR1)\n+                time.sleep(10)\n \n                 try:\n                     ready \u003d False\n```\n\nI can fire off a swift-reload and watch the abstract socket polling wait for the consumer:\n\n```\nvagrant@saio:~$ while true; do ss -a | grep swift | sed \u0027s/@/\\\\0/g\u0027; sleep 1.0; done\nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \nu_dgr ESTAB  11     0                                  \\0swift-notifications\\018817 235299                                    * 0                \n```\n\nAnd my swift-reload command still, correctly, reports the successful reload:\n\n```\nvagrant@saio:~$ time swift-reload 18817 --timeout 30\nReloaded swift-object-server\n\nreal\t0m10.716s\nuser\t0m0.401s\nsys\t0m0.235s\n```\n\nAs described in the commit message as a bonus, the notification server does prevent two copies of swift-reload sending SIGUSR1 in quick succession:\n\n```\nvagrant@saio:~$ swift-reload 18817 --timeout 30\nCould not bind notification socket: [Errno 98] Address already in use\n```\n\nI don\u0027t think that\u0027s a problem tho.  Users can still configure their systemd unit files to send `kill -SIGUSR1 $MAINPID` directly instead of using `swift-reload` if they think they have some need to manage this reload process on their own w/o upstream tooling support.","commit_id":"313fab5f5fad335a73a1f550edb847447ae44135"}],"swift/cli/reload.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":103,"context_line":"        sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":104,"context_line":"        sock.bind(SWIFT_NOTIFY_SOCKET)"},{"line_number":105,"context_line":"        sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":106,"context_line":"        # TODO: set timeout"},{"line_number":107,"context_line":"    except OSError as e:"},{"line_number":108,"context_line":"        print(\"Could not bind notification socket: %s\" % e, file\u003dsys.stderr)"},{"line_number":109,"context_line":"        exit(EXIT_RELOAD_FAILED)"}],"source_content_type":"text/x-python","patch_set":1,"id":"eb4a7bdd_91c4164a","line":106,"updated":"2022-04-13 05:25:49.000000000","message":"*ahem*\n\nAlso, this should probably be some helper in utils.","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab14709cf8c0f653cf34f4798cdd44e8ca50f726","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":104,"context_line":"        sock.bind(SWIFT_NOTIFY_SOCKET)"},{"line_number":105,"context_line":"        sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":106,"context_line":"        # TODO: set timeout"},{"line_number":107,"context_line":"    except OSError as e:"},{"line_number":108,"context_line":"        print(\"Could not bind notification socket: %s\" % e, file\u003dsys.stderr)"},{"line_number":109,"context_line":"        exit(EXIT_RELOAD_FAILED)"}],"source_content_type":"text/x-python","patch_set":1,"id":"afb53507_7764482b","line":106,"in_reply_to":"eb4a7bdd_91c4164a","updated":"2022-04-13 20:48:24.000000000","message":"Done","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":112,"context_line":"        print(\"Sending USR1 signal\")"},{"line_number":113,"context_line":"    os.kill(args.pid, signal.SIGUSR1)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        ready \u003d False"},{"line_number":117,"context_line":"        while not ready:"},{"line_number":118,"context_line":"            data, ancdata, flags, addr \u003d sock.recvmsg("}],"source_content_type":"text/x-python","patch_set":1,"id":"af8e28be_5be8f379","line":115,"updated":"2022-04-13 05:25:49.000000000","message":"This needs a\n\n finally:\n     sock.close()","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab14709cf8c0f653cf34f4798cdd44e8ca50f726","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        print(\"Sending USR1 signal\")"},{"line_number":113,"context_line":"    os.kill(args.pid, signal.SIGUSR1)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    try:"},{"line_number":116,"context_line":"        ready \u003d False"},{"line_number":117,"context_line":"        while not ready:"},{"line_number":118,"context_line":"            data, ancdata, flags, addr \u003d sock.recvmsg("}],"source_content_type":"text/x-python","patch_set":1,"id":"8d3b7351_b70db301","line":115,"in_reply_to":"af8e28be_5be8f379","updated":"2022-04-13 20:48:24.000000000","message":"Done","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":130,"context_line":"                      \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":131,"context_line":"                      file\u003dsys.stderr)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":134,"context_line":"            if pid !\u003d args.pid:"},{"line_number":135,"context_line":"                print(\"Discarding notification %r from pid %d \""},{"line_number":136,"context_line":"                      \"(expected pid %d)\" % (data, pid, args.pid),"}],"source_content_type":"text/x-python","patch_set":1,"id":"4d6b2b32_2921bb18","line":133,"updated":"2022-04-13 05:25:49.000000000","message":"The call to recvmsg() through here should probably be in some helper, too.","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab14709cf8c0f653cf34f4798cdd44e8ca50f726","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                      \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":131,"context_line":"                      file\u003dsys.stderr)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":134,"context_line":"            if pid !\u003d args.pid:"},{"line_number":135,"context_line":"                print(\"Discarding notification %r from pid %d \""},{"line_number":136,"context_line":"                      \"(expected pid %d)\" % (data, pid, args.pid),"}],"source_content_type":"text/x-python","patch_set":1,"id":"63e3a9a1_594024de","line":133,"in_reply_to":"4d6b2b32_2921bb18","updated":"2022-04-13 20:48:24.000000000","message":"Done","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"                if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":148,"context_line":"                    ready \u003d True"},{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":151,"context_line":"            exit(EXIT_RELOAD_TIMEOUT)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e05f754a_7418f31c","line":149,"updated":"2022-04-13 05:25:49.000000000","message":"Gah -- I mean\n\n except TimeoutError:\n\nor something...","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab14709cf8c0f653cf34f4798cdd44e8ca50f726","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"                if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":148,"context_line":"                    ready \u003d True"},{"line_number":149,"context_line":"        else:"},{"line_number":150,"context_line":"            print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":151,"context_line":"            exit(EXIT_RELOAD_TIMEOUT)"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"11801c32_c3e62837","line":149,"in_reply_to":"e05f754a_7418f31c","updated":"2022-04-13 20:48:24.000000000","message":"Done","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":99,"context_line":"    def discard_handler(data, ancdata, flags, addr):"},{"line_number":100,"context_line":"        print(\"Discarding notification with unexpected ancillary \""},{"line_number":101,"context_line":"              \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":102,"context_line":"              file\u003dsys.stderr)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    try:"},{"line_number":105,"context_line":"        notification_server \u003d NotificationServer("}],"source_content_type":"text/x-python","patch_set":4,"id":"2581aa35_05114c91","line":102,"updated":"2022-10-28 16:30:09.000000000","message":"why are we *injecting* this?  do we have a use-case for a *different* ancdata handler?","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":99,"context_line":"    def discard_handler(data, ancdata, flags, addr):"},{"line_number":100,"context_line":"        print(\"Discarding notification with unexpected ancillary \""},{"line_number":101,"context_line":"              \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":102,"context_line":"              file\u003dsys.stderr)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    try:"},{"line_number":105,"context_line":"        notification_server \u003d NotificationServer("}],"source_content_type":"text/x-python","patch_set":4,"id":"507c5331_39efd83a","line":102,"in_reply_to":"2581aa35_05114c91","updated":"2022-10-28 17:50:20.000000000","message":"IDK -- maybe we should just always ignore unexpected stuff. I wanted a way to explore it a little more, anyway.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    def discard_handler(data, ancdata, flags, addr):"},{"line_number":100,"context_line":"        print(\"Discarding notification with unexpected ancillary \""},{"line_number":101,"context_line":"              \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":102,"context_line":"              file\u003dsys.stderr)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    try:"},{"line_number":105,"context_line":"        notification_server \u003d NotificationServer("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1ee4c8_ad7a7c51","line":102,"in_reply_to":"507c5331_39efd83a","updated":"2023-12-04 23:22:05.000000000","message":"Done","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","},{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7c798286_1902b45d","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":49},"updated":"2023-06-20 15:55:22.000000000","message":"So we don\u0027t *currently* emit multiple lines during a notification, but it\u0027s something *possible* under systemd: https://github.com/systemd/systemd/blob/4dad6101fdad2c404b0cda5248b692bfeca0f05b/src/journal-remote/journal-upload.c#L856-L857","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","},{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"d3042ea6_35c41614","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":49},"in_reply_to":"7c798286_1902b45d","updated":"2023-12-04 23:22:05.000000000","message":"I think this is pointing to a coupling that we don\u0027t strictly need.  Maybe if there\u0027s not already a good interface for sniffing systemd notifications adopting that format in NotificationListener will allow us to debug systemd events more easily.\n\n... but I actually had pretty good luck seeing the NOTIFY_SOCKET messages with:\n\n    terminal 1$ socat unix-recv:/tmp/test.sock STDOUT\n    terminal 2$ NOTIFY_SOCKET\u003d/tmp/test.sock swift-init start object\n\n... so I\u0027m not sure I 100% understand the justification for the coupling.  \"Do invent something new if we don\u0027t have to\" seems reasonable, but why assume the systemd-notify interface is exactly what we want?  We don\u0027t even set Type\u003dnotify under Service in prod - we don\u0027t even USE this interface we\u0027re borrowing?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","},{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"32b076af_3d1ffba5","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":49},"in_reply_to":"7dfb3145_ccbd15d3","updated":"2025-02-13 20:33:47.000000000","message":"\u003e There\u0027s a reason OVH wanted to be able to use Type\u003dnotify years ago in\n\nwait wait wait; openstack-swift doesn\u0027t *already* support Type\u003dreload via systemd_notify?  How is this systemd_notify existing code then?\n\n\u003e That mainly seems to indicate that we\u0027re using systemd wrong\n\nif you\u0027re saying deployers like you and I should prioritize and invest in migrating their systemd units to use Type\u003dnotify for the best results when using systemd to manage swift - I think I totally agree!?  Are you just like... waiting for this to merge before you prioritize that?\n\n\u003e if we tried to find a way to provide our own, non-systemd NOTIFY_SOCKET, it would prevent us from being able to use Type\u003dnotify (or Type\u003dnotify-reload) in the unit.\n\nRight, if we can only ever send to one socket (nice in theory from a complexity PoV because maintainers only have to understand one thing and it\u0027s clear that thing is a broadly adopted standard) - but it means we can\u0027t send to two.\n\nI think the desire of this change to send systemd notifications to TWO sockets (only one of which is systemd and other is our own server we launch from a cli script) is somehow suggesting the situation we\u0027re in is \"we don\u0027t have access to a systemd that meets our needs\".  \n\nhttps://github.com/systemd/systemd/issues/6162\n\nOTOH, if systemd *can* do what the operator wants we should *try to learn* how to let them use the standard systemd interface to do what they want.  It\u0027s hard for ME to accept that swift is such a special unicorn that systemd really can\u0027t do what operators need their swift\u0027s process reloading to do; but if we NEED to work around systemd bugs or deficiencies by maintaining a tee\u0027d/parallel notify socket and a mirror implementation of systemd\u0027s notify listener protocol parsing: so be it!\n\nhttps://github.com/systemd/systemd/releases/tag/v253\n\nFWIW 24.04 has systemd-255, and rocky 8 has systemd-239","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0b2d147fb0e7e9daeb95e2472c20915ca2b7bcbe","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","},{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"f1087c2d_416b808f","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":49},"in_reply_to":"d3042ea6_35c41614","updated":"2024-01-23 18:13:04.000000000","message":"\u003e \"Do[n\u0027t] invent something new if we don\u0027t have to\" seems reasonable,\n\n(I\u0027m assuming that\u0027s what you meant.) Yeah, that was the main idea.\n\n\u003e but why assume the systemd-notify interface is exactly what we want?\n\nIt covers most everything I want? It may or may not be _exactly_ what we want, but I don\u0027t see anything I definitely **don\u0027t** want (aside from the added maintenance burden of this code, granted), and systemd seems to have a fairly thriving community with interests that largely overlap ours (ie, wanting to be able to smoothly run/reload services while minimizing downtime). Your find regarding `Type\u003dnotify-reload` seems to confirm that pretty well -- if we were on a newer systemd, I might have abandoned the `swift-reload` patch well before it merged.\n\n\u003e We don\u0027t even set Type\u003dnotify under Service in prod - we don\u0027t even USE this interface we\u0027re borrowing?\n\nThat mainly seems to indicate that we\u0027re using systemd wrong -- we aren\u0027t setting `Type\u003d` at all, but from [systemd\u0027s docs](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Type\u003d):\n\n\u003e - If set to `simple` (the default if `ExecStart\u003d` is specified but neither `Type\u003d` nor `BusName\u003d` are), the service manager will consider the unit started immediately after the main service process has been forked off (i.e. immediately after `fork()`, and before various process attributes have been configured and in particular before the new process has called `execve()` to invoke the actual service binary). Typically, `Type\u003dexec` is the better choice, see below.\n\u003e \n\u003e   It is expected that the process configured with `ExecStart\u003d` is the main process of the service. In this mode, if the process offers functionality to other processes on the system, its communication channels should be installed before the service is started up (e.g. sockets set up by systemd, via socket activation), as the service manager will immediately proceed starting follow-up units, right after creating the main service process, and before executing the service\u0027s binary. Note that this means **systemctl start** command lines for `simple` services will report success even if the service\u0027s binary cannot be invoked successfully (for example because the selected `User\u003d` doesn\u0027t exist, or the service binary is missing).\n\u003e \n\u003e - The `exec` type is similar to simple, but the service manager will consider the unit started immediately after the main service binary has been executed. The service manager will delay starting of follow-up units until that point. (Or in other words: `simple` proceeds with further jobs right after `fork()` returns, while `exec` will not proceed before both `fork()` and `execve()` in the service process succeeded.) Note that this means **systemctl start** command lines for `exec` services will report failure when the service\u0027s binary cannot be invoked successfully (for example because the selected `User\u003d` doesn\u0027t exist, or the service binary is missing).\n\nNeither of those descriptions is right for us -- the unit should only be considered started once we\u0027ve actually gotten listen sockets up and able to handle client requests! There\u0027s a reason OVH wanted to be able to use `Type\u003dnotify` years ago in https://review.opendev.org/c/openstack/swift/+/715576","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":true,"context_lines":[{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","},{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7dfb3145_ccbd15d3","line":123,"range":{"start_line":123,"start_character":36,"end_line":123,"end_character":49},"in_reply_to":"f1087c2d_416b808f","updated":"2024-12-04 01:17:33.000000000","message":"Also it\u0027s worth noting that if we tried to find a way to provide our own, non-systemd `NOTIFY_SOCKET`, it would prevent us from being able to use `Type\u003dnotify` (or `Type\u003dnotify-reload`) in the unit.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"},{"line_number":127,"context_line":"                                print(\"Process is %s\" %"},{"line_number":128,"context_line":"                                      data.decode(\"ascii\")[:-2])"},{"line_number":129,"context_line":"                            else:"},{"line_number":130,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"6ec06196_034d294c","line":129,"updated":"2023-06-20 15:55:22.000000000","message":"Couldn\u0027t hurt to also recognize `STATUS\u003d` lines.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                        b\"STOPPING\u003d1\"):"},{"line_number":127,"context_line":"                                print(\"Process is %s\" %"},{"line_number":128,"context_line":"                                      data.decode(\"ascii\")[:-2])"},{"line_number":129,"context_line":"                            else:"},{"line_number":130,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"}],"source_content_type":"text/x-python","patch_set":8,"id":"41dda757_ed0ab7a9","line":129,"in_reply_to":"6ec06196_034d294c","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4bf08d2f6d421256ba4588762997d58e08c60db0","unresolved":true,"context_lines":[{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":136,"context_line":"                            ready \u003d True"},{"line_number":137,"context_line":"            except socket.timeout:"},{"line_number":138,"context_line":"                print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":139,"context_line":"                exit(EXIT_RELOAD_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab264bb_a38809fe","line":136,"updated":"2023-11-09 19:08:20.000000000","message":"There\u0027s a subtle change in behavior here: With the process-tree polling, we would wait to exit until after the socket-closer process ended (i.e., after the old listen sockets are closed), but now we exit as soon as the new workers are ready.\n\nThis allows a chance that a new connection established after `swift-reload` completes will still be handled by old code... not sure how much it matters, though.","commit_id":"17ba70cb33f0ce78ebc0563ec51ec00ccc25af73"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":136,"context_line":"                            ready \u003d True"},{"line_number":137,"context_line":"            except socket.timeout:"},{"line_number":138,"context_line":"                print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":139,"context_line":"                exit(EXIT_RELOAD_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ad372a5d_fddce587","line":136,"in_reply_to":"4a4dd0ed_aa3cd10c","updated":"2024-12-04 01:17:33.000000000","message":"Or we get things to a point that we don\u0027t need the separate socket-closer! I\u0027d love it if we could get to that point, so much the better! See https://review.opendev.org/c/openstack/swift/+/900957","commit_id":"17ba70cb33f0ce78ebc0563ec51ec00ccc25af73"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68138ca9155800231c2523cdb4ad0a66bcc46f30","unresolved":true,"context_lines":[{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":136,"context_line":"                            ready \u003d True"},{"line_number":137,"context_line":"            except socket.timeout:"},{"line_number":138,"context_line":"                print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":139,"context_line":"                exit(EXIT_RELOAD_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":11,"id":"d10afa86_272d452c","line":136,"in_reply_to":"bab264bb_a38809fe","updated":"2023-11-30 18:12:44.000000000","message":"Note that https://review.opendev.org/c/openstack/swift/+/900957 would take us back to having \"reload complete\" mean \"new workers are ready **and** old listen sockets are closed\".","commit_id":"17ba70cb33f0ce78ebc0563ec51ec00ccc25af73"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"                        if data \u003d\u003d b\"READY\u003d1\":"},{"line_number":136,"context_line":"                            ready \u003d True"},{"line_number":137,"context_line":"            except socket.timeout:"},{"line_number":138,"context_line":"                print(\"Timed out reloading %s\" % script, file\u003dsys.stderr)"},{"line_number":139,"context_line":"                exit(EXIT_RELOAD_TIMEOUT)"}],"source_content_type":"text/x-python","patch_set":11,"id":"4a4dd0ed_aa3cd10c","line":136,"in_reply_to":"d10afa86_272d452c","updated":"2023-12-04 23:22:05.000000000","message":"thanks for calling that out.  IIUC it\u0027s nearly equivilent.  The socket closer will close the old accept socket and immediately exit as soon as the new manager alerts all workers have been finsihed getting forked off.","commit_id":"17ba70cb33f0ce78ebc0563ec51ec00ccc25af73"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"class ReloadNotificationServer(NotificationServer):"},{"line_number":75,"context_line":"    def discard_handler(self, data, ancdata, flags, addr):"},{"line_number":76,"context_line":"        print(\"Discarding notification with unexpected ancillary \""},{"line_number":77,"context_line":"              \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":78,"context_line":"              file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"c75de998_7680ce76","line":75,"updated":"2023-12-04 23:22:05.000000000","message":"I think this overridden print statement is un-tested","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"class ReloadNotificationServer(NotificationServer):"},{"line_number":75,"context_line":"    def discard_handler(self, data, ancdata, flags, addr):"},{"line_number":76,"context_line":"        print(\"Discarding notification with unexpected ancillary \""},{"line_number":77,"context_line":"              \"data: %r, %r, %r, %r\" % (data, ancdata, flags, addr),"},{"line_number":78,"context_line":"              file\u003dsys.stderr)"}],"source_content_type":"text/x-python","patch_set":12,"id":"4d1cc033_348f60cb","line":75,"in_reply_to":"c75de998_7680ce76","updated":"2024-12-04 01:17:33.000000000","message":"Mooted.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e34edfcbf52b03b5d1aadbcf266203ba84803bb","unresolved":true,"context_lines":[{"line_number":119,"context_line":"            try:"},{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","}],"source_content_type":"text/x-python","patch_set":12,"id":"2800c2c1_3845ffc2","line":122,"range":{"start_line":122,"start_character":61,"end_line":122,"end_character":65},"updated":"2023-12-04 06:18:19.000000000","message":"I guess everything should fit in to 1024 bytes, so I guess we don\u0027t have to worry abount appending the to last data (if there was any) incase it was split part way through the boundry.\n\nWhy 1024, it seems to be the same as NotificationServer.RECV_SIZE, is this just coincidence or shold be just use the same constant?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            try:"},{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","}],"source_content_type":"text/x-python","patch_set":12,"id":"8d419abc_2ac31ddf","line":122,"range":{"start_line":122,"start_character":61,"end_line":122,"end_character":65},"in_reply_to":"17288e1e_10b1718e","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":119,"context_line":"            try:"},{"line_number":120,"context_line":"                ready \u003d False"},{"line_number":121,"context_line":"                while not ready:"},{"line_number":122,"context_line":"                    data \u003d notification_server.recv_from_pid(1024)"},{"line_number":123,"context_line":"                    for data in data.split(b\"\\n\"):"},{"line_number":124,"context_line":"                        if args.verbose:"},{"line_number":125,"context_line":"                            if data in (b\"READY\u003d1\", b\"RELOADING\u003d1\","}],"source_content_type":"text/x-python","patch_set":12,"id":"17288e1e_10b1718e","line":122,"range":{"start_line":122,"start_character":61,"end_line":122,"end_character":65},"in_reply_to":"2800c2c1_3845ffc2","updated":"2023-12-04 23:22:05.000000000","message":"I think the interface got refactored, bufsize is class attribute now and the paramter should be removed.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":128,"context_line":"                                      data.decode(\"ascii\")[:-2])"},{"line_number":129,"context_line":"                            elif data.startswith(b\"STATUS\u003d\"):"},{"line_number":130,"context_line":"                                print(\"Status: %s\" %"},{"line_number":131,"context_line":"                                      data.decode(\"utf8\").partition(\"\u003d\")[-1])"},{"line_number":132,"context_line":"                            else:"},{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ea9e81b3_44f1d6ff","line":131,"updated":"2023-12-04 23:22:05.000000000","message":"this is a good example of extra code we get to write for systemd interfaces we don\u0027t use","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fc60ae03a4a47661b8444fc30de108a95f35c25c","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                      data.decode(\"ascii\")[:-2])"},{"line_number":129,"context_line":"                            elif data.startswith(b\"STATUS\u003d\"):"},{"line_number":130,"context_line":"                                print(\"Status: %s\" %"},{"line_number":131,"context_line":"                                      data.decode(\"utf8\").partition(\"\u003d\")[-1])"},{"line_number":132,"context_line":"                            else:"},{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"df89e524_f6546aab","line":131,"in_reply_to":"177fd002_82449f1d","updated":"2025-02-13 01:03:33.000000000","message":"Done","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":true,"context_lines":[{"line_number":128,"context_line":"                                      data.decode(\"ascii\")[:-2])"},{"line_number":129,"context_line":"                            elif data.startswith(b\"STATUS\u003d\"):"},{"line_number":130,"context_line":"                                print(\"Status: %s\" %"},{"line_number":131,"context_line":"                                      data.decode(\"utf8\").partition(\"\u003d\")[-1])"},{"line_number":132,"context_line":"                            else:"},{"line_number":133,"context_line":"                                print(\"Received notification %r\" % data)"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"177fd002_82449f1d","line":131,"in_reply_to":"ea9e81b3_44f1d6ff","updated":"2024-12-04 01:17:33.000000000","message":"It\u0027s three pretty straight-forward lines for a feature I could absolutely see myself using. w/e, I\u0027ll delete it until I actually write the patch to have us emit statuses like\n```\nListening on port X with Y workers\n```","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dde235516b7c149dec1fa9a64f5a2ff2e187ad0d","unresolved":true,"context_lines":[{"line_number":32,"context_line":"import sys"},{"line_number":33,"context_line":"import time"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from swift.common.manager import get_child_pids"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"EXIT_BAD_PID \u003d 2  # similar to argparse exiting 2 on an unknown arg"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f00e84d_2c772616","side":"PARENT","line":35,"range":{"start_line":35,"start_character":33,"end_line":35,"end_character":47},"updated":"2024-12-12 21:36:08.000000000","message":"Oh, we could probably get rid of this whole function now...","commit_id":"2dad4dcbbd71191d3ec014f93eeefd4d2013d293"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fc60ae03a4a47661b8444fc30de108a95f35c25c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"import sys"},{"line_number":33,"context_line":"import time"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from swift.common.manager import get_child_pids"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"EXIT_BAD_PID \u003d 2  # similar to argparse exiting 2 on an unknown arg"}],"source_content_type":"text/x-python","patch_set":13,"id":"4d3d229f_e6774330","side":"PARENT","line":35,"range":{"start_line":35,"start_character":33,"end_line":35,"end_character":47},"in_reply_to":"5f00e84d_2c772616","updated":"2025-02-13 01:03:33.000000000","message":"Done","commit_id":"2dad4dcbbd71191d3ec014f93eeefd4d2013d293"}],"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":107,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"SWIFT_NOTIFY_SOCKET \u003d \u0027\\0swift-notifications\u0027"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# These are lazily pulled from libc elsewhere"},{"line_number":112,"context_line":"_sys_fallocate \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"d251ebeb_320ca346","line":109,"updated":"2022-04-13 05:25:49.000000000","message":"I wonder if we ought to do something more like\n\n \\0swift-notifications/\u003cservice name\u003e\n\nor even\n\n \\0swift-notifications\\0\u003cfull script path\u003e\\0\u003cconf file\u003e\n\nto reduce the EADDRINUSE likelihood...","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f35a8874d32e5fb31c1292250562c6ef3c343146","unresolved":false,"context_lines":[{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":107,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"SWIFT_NOTIFY_SOCKET \u003d \u0027\\0swift-notifications\u0027"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# These are lazily pulled from libc elsewhere"},{"line_number":112,"context_line":"_sys_fallocate \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5d0ef7cf_7b8323f6","line":109,"in_reply_to":"7b88cc56_d18c478d","updated":"2022-05-31 18:02:47.000000000","message":"Done","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"ab14709cf8c0f653cf34f4798cdd44e8ca50f726","unresolved":true,"context_lines":[{"line_number":106,"context_line":"logging.addLevelName(NOTICE, \u0027NOTICE\u0027)"},{"line_number":107,"context_line":"SysLogHandler.priority_map[\u0027NOTICE\u0027] \u003d \u0027notice\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"SWIFT_NOTIFY_SOCKET \u003d \u0027\\0swift-notifications\u0027"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"# These are lazily pulled from libc elsewhere"},{"line_number":112,"context_line":"_sys_fallocate \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b88cc56_d18c478d","line":109,"in_reply_to":"d251ebeb_320ca346","updated":"2022-04-13 20:48:24.000000000","message":"Oh! Or\n\n \\0swift-notifications\\0\u003cpid\u003e\n\n?","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fdc8b2ef5407ce783cf36da432b3ae789d22dff","unresolved":true,"context_lines":[{"line_number":6434,"context_line":"            except EnvironmentError as e:"},{"line_number":6435,"context_line":"                if logger and not (notify_socket \u003d\u003d SWIFT_NOTIFY_SOCKET and"},{"line_number":6436,"context_line":"                                   e.errno \u003d\u003d errno.ECONNREFUSED):"},{"line_number":6437,"context_line":"                    logger.debug(\"Systemd notification failed\", exc_info\u003dTrue)"},{"line_number":6438,"context_line":""},{"line_number":6439,"context_line":""},{"line_number":6440,"context_line":"class Watchdog(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"943eb5d0_cb43f136","line":6437,"range":{"start_line":6437,"start_character":64,"end_line":6437,"end_character":77},"updated":"2022-04-13 05:25:49.000000000","message":"Off-topic: This almost certainly doesn\u0027t need a traceback. Only halfway valuable thing is whether we hit the error in connect() or sendall(), and we could resolve that with separate try blocks (and log messages) for each.","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"894a18d8dbfa8d01978b7916991d3ed1086f03bd","unresolved":false,"context_lines":[{"line_number":6434,"context_line":"            except EnvironmentError as e:"},{"line_number":6435,"context_line":"                if logger and not (notify_socket \u003d\u003d SWIFT_NOTIFY_SOCKET and"},{"line_number":6436,"context_line":"                                   e.errno \u003d\u003d errno.ECONNREFUSED):"},{"line_number":6437,"context_line":"                    logger.debug(\"Systemd notification failed\", exc_info\u003dTrue)"},{"line_number":6438,"context_line":""},{"line_number":6439,"context_line":""},{"line_number":6440,"context_line":"class Watchdog(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"25d2842e_42918201","line":6437,"range":{"start_line":6437,"start_character":64,"end_line":6437,"end_character":77},"in_reply_to":"943eb5d0_cb43f136","updated":"2023-11-06 18:01:01.000000000","message":"https://review.opendev.org/c/openstack/swift/+/898472","commit_id":"49d698ecb34b1e651d49ab9e5af1d96456075cfb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f35a8874d32e5fb31c1292250562c6ef3c343146","unresolved":true,"context_lines":[{"line_number":6457,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6458,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6459,"context_line":"            except OSError as e:"},{"line_number":6460,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6461,"context_line":"                    time.sleep(0.1)"},{"line_number":6462,"context_line":"                    continue"},{"line_number":6463,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"6e54ae74_f4a52601","line":6460,"updated":"2022-05-31 18:02:47.000000000","message":"Note that since socket is actually eventlet.green.socket, we\u0027ve gotta handle this ourselves.","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c6880b3aa83c47f6b99f534b34a530f1ef2ea1f3","unresolved":true,"context_lines":[{"line_number":6457,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6458,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6459,"context_line":"            except OSError as e:"},{"line_number":6460,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6461,"context_line":"                    time.sleep(0.1)"},{"line_number":6462,"context_line":"                    continue"},{"line_number":6463,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"8fc44fd5_cd5e326d","line":6460,"in_reply_to":"6e54ae74_f4a52601","updated":"2023-02-16 23:01:54.000000000","message":"Oh, but it also means we need to pop the TimeoutError ourselves...","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6457,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6458,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6459,"context_line":"            except OSError as e:"},{"line_number":6460,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6461,"context_line":"                    time.sleep(0.1)"},{"line_number":6462,"context_line":"                    continue"},{"line_number":6463,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"f254cb14_2a8ba57e","line":6460,"in_reply_to":"8fc44fd5_cd5e326d","updated":"2023-12-04 23:22:05.000000000","message":"I don\u0027t understand why eventlet wouldn\u0027t hide an EAGAIN.\n\nOr why the sock.settimeout would be needed if we\u0027d used an eventlet.Timeout","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6457,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6458,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6459,"context_line":"            except OSError as e:"},{"line_number":6460,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6461,"context_line":"                    time.sleep(0.1)"},{"line_number":6462,"context_line":"                    continue"},{"line_number":6463,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":3,"id":"028a3633_95731b7b","line":6460,"in_reply_to":"f254cb14_2a8ba57e","updated":"2024-12-04 01:17:33.000000000","message":"I don\u0027t remember why I thought this was necessary; probably just a relic of some earlier version, but I swear it *did* seem necessary at the time.\n\nw/e, it\u0027s all gone now anyway.","commit_id":"4f6a1c6f11b9b148b28bb2fc50fb59622a2cc18d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6567,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":6568,"context_line":""},{"line_number":6569,"context_line":""},{"line_number":6570,"context_line":"class NotificationServer(object):"},{"line_number":6571,"context_line":"    def __init__(self, pid, read_timeout, discard_handler\u003dNone):"},{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"}],"source_content_type":"text/x-python","patch_set":4,"id":"264cb74e_805a3071","line":6570,"updated":"2022-10-28 16:30:09.000000000","message":"I think it would look fine to have this in swift.cli.reload module.  Do you have any plans to re-use this thing outside of the swift-reload command?","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":6567,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":6568,"context_line":""},{"line_number":6569,"context_line":""},{"line_number":6570,"context_line":"class NotificationServer(object):"},{"line_number":6571,"context_line":"    def __init__(self, pid, read_timeout, discard_handler\u003dNone):"},{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"}],"source_content_type":"text/x-python","patch_set":4,"id":"54bafb3d_1dc66d34","line":6570,"in_reply_to":"264cb74e_805a3071","updated":"2022-10-28 17:50:20.000000000","message":"I was actually just thinking today that we might be able use this instead of the existing os.pipe() worker-ready checks...\n\nMight be tricky, though; won\u0027t have the pid already in hand to bind before forking, leaving a chance for a missed message if the child starts up and notifies quickly.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":6567,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":6568,"context_line":""},{"line_number":6569,"context_line":""},{"line_number":6570,"context_line":"class NotificationServer(object):"},{"line_number":6571,"context_line":"    def __init__(self, pid, read_timeout, discard_handler\u003dNone):"},{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ec319eab_34ae96fd","line":6570,"in_reply_to":"54bafb3d_1dc66d34","updated":"2023-12-04 23:22:05.000000000","message":"Acknowledged","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"}],"source_content_type":"text/x-python","patch_set":4,"id":"b0aae0ad_c3948bbe","line":6575,"updated":"2022-10-28 16:30:09.000000000","message":"i\u0027m not familiar with this naming convention - do you have any docs to link on notificatoin domain sockets?","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"}],"source_content_type":"text/x-python","patch_set":4,"id":"8f019fbe_00b62c5b","line":6575,"in_reply_to":"9b2a8538_b69bab03","updated":"2023-12-04 23:22:05.000000000","message":"Thanks!\n\n\u003e But I don\u0027t think any of us are comfortable saying we really \"support\" Swift on BSD...\n\nI forget who the big non-linux deployment was; someone in AU maybe?  I guess we\u0027ll see if anyone tries to upgrade and use swift-reload\n\nhttps://unix.stackexchange.com/questions/496577/different-order-for-getsockopt-so-peercred-in-linux-and-openbsd","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":6572,"context_line":"        self.pid \u003d pid"},{"line_number":6573,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9b2a8538_b69bab03","line":6575,"in_reply_to":"b0aae0ad_c3948bbe","updated":"2022-10-28 17:50:20.000000000","message":"The null-namespace thing? Search for \"abstract\" in https://www.man7.org/linux/man-pages/man7/unix.7.html\n\n\u003e an abstract socket address is distinguished (from a pathname socket) by the fact that sun_path[0] is a null byte (\u0027\\0\u0027).\n\n\u003e The name has no connection with filesystem pathnames.\n\n\u003e Abstract sockets automatically disappear when all open references to the socket are closed.\n\nThat last one is particularly useful; I didn\u0027t want to leave any dangling domain sockets on the filesystem. There is a caveat, though:\n\n\u003e The abstract socket namespace is a nonportable Linux extension.\n\nBut I don\u0027t think any of us are comfortable saying we really \"support\" Swift on BSD...","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"6a8f200d_0c2fcb31","line":6577,"updated":"2022-10-28 16:30:09.000000000","message":"what is PASSCRED - did you crib this from somewhere?","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"a1da9df1_89e6e125","line":6577,"in_reply_to":"6a8f200d_0c2fcb31","updated":"2022-10-28 17:50:20.000000000","message":"It\u0027s what lets us get that ancillary data, so we can make sure that the message came from the pid we thought it came from. I needed to read up on it a bit, for sure; I forget exactly where I got all this. I maybe looked at systemd\u0027s source? manager_setup_notify and manager_dispatch_notify_fd in https://github.com/systemd/systemd/blob/main/src/core/manager.c and to a lesser degree service_notify_message_authorized in https://github.com/systemd/systemd/blob/main/src/core/service.c#L4055 seem instructive.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"        try:"},{"line_number":6575,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6576,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":4,"id":"5572ff02_bf9a32c3","line":6577,"in_reply_to":"a1da9df1_89e6e125","updated":"2023-12-04 23:22:05.000000000","message":"Thanks!","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"},{"line_number":6581,"context_line":"        self.discard_handler \u003d discard_handler"},{"line_number":6582,"context_line":""},{"line_number":6583,"context_line":"    def recv_from_pid(self, bufsize):"}],"source_content_type":"text/x-python","patch_set":4,"id":"6ccb04e2_4dfa900a","line":6580,"updated":"2022-10-28 16:30:09.000000000","message":"If you moved the socket setup into __enter__ would we only have to close in __exit__?","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"},{"line_number":6581,"context_line":"        self.discard_handler \u003d discard_handler"},{"line_number":6582,"context_line":""},{"line_number":6583,"context_line":"    def recv_from_pid(self, bufsize):"}],"source_content_type":"text/x-python","patch_set":4,"id":"15ef0420_7664fb17","line":6580,"in_reply_to":"64e5b206_dccf1a53","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":6577,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6578,"context_line":"        except BaseException:"},{"line_number":6579,"context_line":"            self.sock.close()"},{"line_number":6580,"context_line":"            raise"},{"line_number":6581,"context_line":"        self.discard_handler \u003d discard_handler"},{"line_number":6582,"context_line":""},{"line_number":6583,"context_line":"    def recv_from_pid(self, bufsize):"}],"source_content_type":"text/x-python","patch_set":4,"id":"64e5b206_dccf1a53","line":6580,"in_reply_to":"6ccb04e2_4dfa900a","updated":"2022-10-28 17:50:20.000000000","message":"I wanted to be able to scope the connect well, so we can have a reasonably clean failure on EADDRINUSE. I could try rewording some things in reload.py -- gotta be a little careful on exception handling order, though, since socket.timeout inherits from OSError on py3.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6607,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6608,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6609,"context_line":"                if self.discard_handler:"},{"line_number":6610,"context_line":"                    self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6611,"context_line":"                continue"},{"line_number":6612,"context_line":""},{"line_number":6613,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"6da955cb_4d3217ac","line":6610,"updated":"2022-10-28 16:30:09.000000000","message":"instead of if self.discard_handler - can we define a default noop?  It would be a pretty familiar OOO pattern for a new usecase to subclass.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74b3bc06cc189e3c931319ae09a0f6d27e7d4a75","unresolved":true,"context_lines":[{"line_number":6607,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6608,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6609,"context_line":"                if self.discard_handler:"},{"line_number":6610,"context_line":"                    self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6611,"context_line":"                continue"},{"line_number":6612,"context_line":""},{"line_number":6613,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"be50b097_28fd868a","line":6610,"in_reply_to":"6da955cb_4d3217ac","updated":"2022-10-28 17:50:20.000000000","message":"Yeah, sure. Then in __init__,\n\n self.discard_handler \u003d discard_handler or self.default_discard_handler","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6607,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6608,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6609,"context_line":"                if self.discard_handler:"},{"line_number":6610,"context_line":"                    self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6611,"context_line":"                continue"},{"line_number":6612,"context_line":""},{"line_number":6613,"context_line":"            return data"}],"source_content_type":"text/x-python","patch_set":4,"id":"055b7b04_5116c19d","line":6610,"in_reply_to":"be50b097_28fd868a","updated":"2024-12-04 01:17:33.000000000","message":"Mooted.","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"df0c2ecb16832351957938591f91dde8227874a8","unresolved":true,"context_lines":[{"line_number":6647,"context_line":"        sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6648,"context_line":"        with closing(sock):"},{"line_number":6649,"context_line":"            try:"},{"line_number":6650,"context_line":"                sock.connect(notify_socket)"},{"line_number":6651,"context_line":"                sock.sendall(msg)"},{"line_number":6652,"context_line":"            except EnvironmentError as e:"},{"line_number":6653,"context_line":"                if logger and not (notify_socket \u003d\u003d notify_sockets[0] and"}],"source_content_type":"text/x-python","patch_set":4,"id":"03c1020c_025af756","line":6650,"updated":"2022-10-28 16:30:09.000000000","message":"oic, this is where we connect by name - we\u0027re piggy backing on the systemd notification","commit_id":"cef11a1e0e513057b7f75dd2ad1bb2da7e9b15a7"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0f7fcd34e7d37e193005ac4327b4a171b0503ae9","unresolved":true,"context_lines":[{"line_number":6938,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":6939,"context_line":""},{"line_number":6940,"context_line":""},{"line_number":6941,"context_line":"class NotificationServer(object):"},{"line_number":6942,"context_line":"    def __init__(self, pid, read_timeout):"},{"line_number":6943,"context_line":"        self.pid \u003d pid"},{"line_number":6944,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f6d9ab9a_f6311c97","line":6941,"updated":"2023-06-14 11:04:10.000000000","message":"there doesn\u0027t seem to be any test coverage for this class\n\n```\ndiff --git a/swift/common/utils/__init__.py b/swift/common/utils/__init__.py\nindex d09f8da26..c5f61f1fe 100644\n--- a/swift/common/utils/__init__.py\n+++ b/swift/common/utils/__init__.py\n@@ -6940,6 +6940,7 @@ def get_pid_notify_socket(pid\u003dNone):\n\n class NotificationServer(object):\n     def __init__(self, pid, read_timeout):\n+        BOOM\n         self.pid \u003d pid\n         self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)\n         try:\n```\n\nand I get:\n\n```\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 8428 passed, 1 skipped, 18 warnings in 220.06s (0:03:40) \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n_______________________________________________________________________________ summary ________________________________________________________________________________\n  py38: commands succeeded\n  congratulations :)\n```","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6938,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":6939,"context_line":""},{"line_number":6940,"context_line":""},{"line_number":6941,"context_line":"class NotificationServer(object):"},{"line_number":6942,"context_line":"    def __init__(self, pid, read_timeout):"},{"line_number":6943,"context_line":"        self.pid \u003d pid"},{"line_number":6944,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"}],"source_content_type":"text/x-python","patch_set":8,"id":"0ea195e7_d40abe63","line":6941,"in_reply_to":"f6d9ab9a_f6311c97","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6943,"context_line":"        self.pid \u003d pid"},{"line_number":6944,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6945,"context_line":"        try:"},{"line_number":6946,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6947,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6948,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6949,"context_line":"        except BaseException:"}],"source_content_type":"text/x-python","patch_set":8,"id":"931ae7d6_21a19ac8","line":6946,"updated":"2023-06-20 15:55:22.000000000","message":"Ergonomics are off -- this ought to move into `__enter__` (possibly by way of a new `start` method).","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":6943,"context_line":"        self.pid \u003d pid"},{"line_number":6944,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":6945,"context_line":"        try:"},{"line_number":6946,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6947,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6948,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6949,"context_line":"        except BaseException:"}],"source_content_type":"text/x-python","patch_set":8,"id":"8c59e312_d9f7bf8b","line":6946,"in_reply_to":"931ae7d6_21a19ac8","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6945,"context_line":"        try:"},{"line_number":6946,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6947,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6948,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6949,"context_line":"        except BaseException:"},{"line_number":6950,"context_line":"            self.sock.close()"},{"line_number":6951,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"d40c9238_b2d4439b","line":6948,"range":{"start_line":6948,"start_character":59,"end_line":6948,"end_character":70},"updated":"2023-06-20 15:55:22.000000000","message":"This isn\u0027t available on py2 -- maybe use `getattr(socket, \u0027SO_PASSCRED\u0027, 16)`?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":6945,"context_line":"        try:"},{"line_number":6946,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":6947,"context_line":"            self.sock.settimeout(read_timeout)"},{"line_number":6948,"context_line":"            self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_PASSCRED, 1)"},{"line_number":6949,"context_line":"        except BaseException:"},{"line_number":6950,"context_line":"            self.sock.close()"},{"line_number":6951,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"70839bbc_7794fd89","line":6948,"range":{"start_line":6948,"start_character":59,"end_line":6948,"end_character":70},"in_reply_to":"d40c9238_b2d4439b","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6963,"context_line":"                raise socket.timeout"},{"line_number":6964,"context_line":"            try:"},{"line_number":6965,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6966,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6967,"context_line":"            except OSError as e:"},{"line_number":6968,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6969,"context_line":"                    time.sleep(0.1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"dc278bf0_1d0cec27","line":6966,"range":{"start_line":6966,"start_character":33,"end_line":6966,"end_character":41},"updated":"2023-06-20 15:55:22.000000000","message":"Also not available on py2 -- I guess you can sub `lambda x: x + 12`?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":6963,"context_line":"                raise socket.timeout"},{"line_number":6964,"context_line":"            try:"},{"line_number":6965,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6966,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6967,"context_line":"            except OSError as e:"},{"line_number":6968,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6969,"context_line":"                    time.sleep(0.1)"}],"source_content_type":"text/x-python","patch_set":8,"id":"b9f14294_c151adca","line":6966,"range":{"start_line":6966,"start_character":33,"end_line":6966,"end_character":41},"in_reply_to":"dc278bf0_1d0cec27","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6966,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6967,"context_line":"            except OSError as e:"},{"line_number":6968,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6969,"context_line":"                    time.sleep(0.1)"},{"line_number":6970,"context_line":"                    continue"},{"line_number":6971,"context_line":"                raise"},{"line_number":6972,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"13b69f8e_a948cc4b","line":6969,"updated":"2023-06-20 15:55:22.000000000","message":"This sleep is a little weird -- maybe it\u0027d be better to use an unpatched socket and let stdlib handle popping the timeout?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6966,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6967,"context_line":"            except OSError as e:"},{"line_number":6968,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6969,"context_line":"                    time.sleep(0.1)"},{"line_number":6970,"context_line":"                    continue"},{"line_number":6971,"context_line":"                raise"},{"line_number":6972,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3351a3b1_92f78437","line":6969,"in_reply_to":"13b69f8e_a948cc4b","updated":"2023-12-04 23:22:05.000000000","message":"heh, I think do_test_real_socket in the unittests are using a real socket?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6966,"context_line":"                    1024, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6967,"context_line":"            except OSError as e:"},{"line_number":6968,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6969,"context_line":"                    time.sleep(0.1)"},{"line_number":6970,"context_line":"                    continue"},{"line_number":6971,"context_line":"                raise"},{"line_number":6972,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"24e351e0_1c18b074","line":6969,"in_reply_to":"3351a3b1_92f78437","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6976,"context_line":""},{"line_number":6977,"context_line":"            cmsg_level, cmsg_type, cmsg_data \u003d ancdata[0]"},{"line_number":6978,"context_line":"            if (cmsg_level, cmsg_type, len(cmsg_data)) !\u003d ("},{"line_number":6979,"context_line":"                    socket.SOL_SOCKET, socket.SCM_CREDENTIALS,"},{"line_number":6980,"context_line":"                    struct.calcsize(\"3i\")):"},{"line_number":6981,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6982,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"8c9ab837_66ff0b80","line":6979,"range":{"start_line":6979,"start_character":39,"end_line":6979,"end_character":61},"updated":"2023-06-20 15:55:22.000000000","message":"Also not available on py2; sub 2?","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":6976,"context_line":""},{"line_number":6977,"context_line":"            cmsg_level, cmsg_type, cmsg_data \u003d ancdata[0]"},{"line_number":6978,"context_line":"            if (cmsg_level, cmsg_type, len(cmsg_data)) !\u003d ("},{"line_number":6979,"context_line":"                    socket.SOL_SOCKET, socket.SCM_CREDENTIALS,"},{"line_number":6980,"context_line":"                    struct.calcsize(\"3i\")):"},{"line_number":6981,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6982,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"622de255_684fc5a0","line":6979,"range":{"start_line":6979,"start_character":39,"end_line":6979,"end_character":61},"in_reply_to":"8c9ab837_66ff0b80","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":6982,"context_line":"                continue"},{"line_number":6983,"context_line":""},{"line_number":6984,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6985,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6986,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6987,"context_line":"                continue"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"b26f5a9f_75966f19","line":6985,"updated":"2023-06-20 15:55:22.000000000","message":"It\u0027s probably not strictly necessary, but this cross-check seemed like it\u0027d be good to include. If we *did* drop it, I think we can get rid of all the ancillary data / discard handler stuff...","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6982,"context_line":"                continue"},{"line_number":6983,"context_line":""},{"line_number":6984,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6985,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6986,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6987,"context_line":"                continue"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"016c9967_feb94f9b","line":6985,"in_reply_to":"723f8577_2bd278ec","updated":"2024-12-04 01:17:33.000000000","message":"Mooted.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e34edfcbf52b03b5d1aadbcf266203ba84803bb","unresolved":true,"context_lines":[{"line_number":6982,"context_line":"                continue"},{"line_number":6983,"context_line":""},{"line_number":6984,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6985,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6986,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6987,"context_line":"                continue"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"bde3dfab_274172cc","line":6985,"in_reply_to":"b26f5a9f_75966f19","updated":"2023-12-04 06:18:19.000000000","message":"I kinda like that we your using SO_PEERCRED to confirm that it\u0027s coming from the pid where\u0027s expecting to hear from.\n\nSo I assume if someother pid connects to this socket then we\u0027d just ignore and are waiting for the right pid to repond.\nAlthough I thought we\u0027d have a sigle unixsocket to a pid (based off the pid name), so not such how this could happen.. but seem to still be a nice feature.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6982,"context_line":"                continue"},{"line_number":6983,"context_line":""},{"line_number":6984,"context_line":"            pid, uid, gid \u003d struct.unpack(\"3i\", cmsg_data)"},{"line_number":6985,"context_line":"            if pid !\u003d self.pid:"},{"line_number":6986,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6987,"context_line":"                continue"},{"line_number":6988,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"723f8577_2bd278ec","line":6985,"in_reply_to":"bde3dfab_274172cc","updated":"2023-12-04 23:22:05.000000000","message":"We use SO_PASSCRED not SO_PEERCRED\n\nThe former will include the senders PID in ancdata by default on every message read while the latter seems to be for querying the connection.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2c274c50066ae82cca8797fd6e79ebd3c12e4736","unresolved":true,"context_lines":[{"line_number":7004,"context_line":"    systemd-compatible, that this process correctly started. To do so,"},{"line_number":7005,"context_line":"    it communicates through a Unix socket stored in environment variable"},{"line_number":7006,"context_line":"    NOTIFY_SOCKET. More information can be found in systemd documentation:"},{"line_number":7007,"context_line":"    https://www.freedesktop.org/software/systemd/man/sd_notify.html"},{"line_number":7008,"context_line":""},{"line_number":7009,"context_line":"    :param logger: a logger object"},{"line_number":7010,"context_line":"    :param msg: the message to send"}],"source_content_type":"text/x-python","patch_set":8,"id":"8cecc34e_8a48f264","line":7007,"updated":"2023-06-20 15:55:22.000000000","message":"Doc string could use an update to mention our `swift-notifications` socket.","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2754a769178a573d1a69c2b5d4d93f1ac675157e","unresolved":false,"context_lines":[{"line_number":7004,"context_line":"    systemd-compatible, that this process correctly started. To do so,"},{"line_number":7005,"context_line":"    it communicates through a Unix socket stored in environment variable"},{"line_number":7006,"context_line":"    NOTIFY_SOCKET. More information can be found in systemd documentation:"},{"line_number":7007,"context_line":"    https://www.freedesktop.org/software/systemd/man/sd_notify.html"},{"line_number":7008,"context_line":""},{"line_number":7009,"context_line":"    :param logger: a logger object"},{"line_number":7010,"context_line":"    :param msg: the message to send"}],"source_content_type":"text/x-python","patch_set":8,"id":"e7d45715_71caf729","line":7007,"in_reply_to":"8cecc34e_8a48f264","updated":"2023-06-21 20:47:06.000000000","message":"Done","commit_id":"f3647e1b1788ca1e01cb0d9b1614e42adc0f0fec"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6277,"context_line":"        \u0027\u0027\u0027"},{"line_number":6278,"context_line":"        pass"},{"line_number":6279,"context_line":""},{"line_number":6280,"context_line":"    def recv_from_pid(self, bufsize):"},{"line_number":6281,"context_line":"        start \u003d time.time()"},{"line_number":6282,"context_line":"        while True:"},{"line_number":6283,"context_line":"            if time.time() - start \u003e\u003d self.sock.gettimeout():"}],"source_content_type":"text/x-python","patch_set":12,"id":"fee313a5_47c56c06","line":6280,"updated":"2023-12-04 23:22:05.000000000","message":"I don\u0027t see where bufsize is used; I think we consistently use self.RECV_SIZE","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6277,"context_line":"        \u0027\u0027\u0027"},{"line_number":6278,"context_line":"        pass"},{"line_number":6279,"context_line":""},{"line_number":6280,"context_line":"    def recv_from_pid(self, bufsize):"},{"line_number":6281,"context_line":"        start \u003d time.time()"},{"line_number":6282,"context_line":"        while True:"},{"line_number":6283,"context_line":"            if time.time() - start \u003e\u003d self.sock.gettimeout():"}],"source_content_type":"text/x-python","patch_set":12,"id":"c244b374_4524de08","line":6280,"in_reply_to":"fee313a5_47c56c06","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6289,"context_line":""},{"line_number":6290,"context_line":"            try:"},{"line_number":6291,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6292,"context_line":"                    self.RECV_SIZE, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6293,"context_line":"            except OSError as e:"},{"line_number":6294,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6295,"context_line":"                    time.sleep(0.1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"f60eefda_24ce9240","line":6292,"updated":"2023-12-04 23:22:05.000000000","message":"I think this should be CMSG_SPACE:\n\nhttps://docs.python.org/3/library/socket.html#socket.CMSG_SPACE\n\n... at docs say that\u0027s the macro to use with recvmsg and tests pass either way\n\nAlso, the CMSG_SPACE is \"larger\"\n\n    \u003e\u003e\u003e socket.CMSG_SPACE(struct.calcsize(\"3i\"))\n    32\n    \u003e\u003e\u003e socket.CMSG_LEN(struct.calcsize(\"3i\"))\n    28\n\n... so better safe than sorry?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6289,"context_line":""},{"line_number":6290,"context_line":"            try:"},{"line_number":6291,"context_line":"                data, ancdata, flags, addr \u003d self.sock.recvmsg("},{"line_number":6292,"context_line":"                    self.RECV_SIZE, socket.CMSG_LEN(struct.calcsize(\"3i\")))"},{"line_number":6293,"context_line":"            except OSError as e:"},{"line_number":6294,"context_line":"                if e.errno \u003d\u003d errno.EAGAIN:"},{"line_number":6295,"context_line":"                    time.sleep(0.1)"}],"source_content_type":"text/x-python","patch_set":12,"id":"93268d65_cc61c29a","line":6292,"in_reply_to":"f60eefda_24ce9240","updated":"2024-12-04 01:17:33.000000000","message":"🤷 Mooted","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e34edfcbf52b03b5d1aadbcf266203ba84803bb","unresolved":true,"context_lines":[{"line_number":6296,"context_line":"                    continue"},{"line_number":6297,"context_line":"                raise"},{"line_number":6298,"context_line":""},{"line_number":6299,"context_line":"            if len(ancdata) !\u003d 1:"},{"line_number":6300,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6301,"context_line":"                continue"},{"line_number":6302,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"60cce3aa_a0471af6","line":6299,"range":{"start_line":6299,"start_character":12,"end_line":6299,"end_character":33},"updated":"2023-12-04 06:18:19.000000000","message":"So on we only ever expect 1 type of ancillary data sent. But I suppose this is fine seeing as the this Notification server sets up the socket and therefore has control of the socket opts.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                    continue"},{"line_number":6297,"context_line":"                raise"},{"line_number":6298,"context_line":""},{"line_number":6299,"context_line":"            if len(ancdata) !\u003d 1:"},{"line_number":6300,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6301,"context_line":"                continue"},{"line_number":6302,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"d616dbe9_9b1faa1b","line":6299,"range":{"start_line":6299,"start_character":12,"end_line":6299,"end_character":33},"in_reply_to":"1e4c7d70_1e2e9496","updated":"2024-12-04 01:17:33.000000000","message":"Mooted.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6296,"context_line":"                    continue"},{"line_number":6297,"context_line":"                raise"},{"line_number":6298,"context_line":""},{"line_number":6299,"context_line":"            if len(ancdata) !\u003d 1:"},{"line_number":6300,"context_line":"                self.discard_handler(data, ancdata, flags, addr)"},{"line_number":6301,"context_line":"                continue"},{"line_number":6302,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1e4c7d70_1e2e9496","line":6299,"range":{"start_line":6299,"start_character":12,"end_line":6299,"end_character":33},"in_reply_to":"60cce3aa_a0471af6","updated":"2023-12-04 23:22:05.000000000","message":"this might possibly be for upgrades - when I called recvmsg on a socket that didn\u0027t setsocketopt PASSCRED ancdata was an empty list.  I\u0027m not sure when/if it\u0027d ever be len() \u003e 1, maybe if we explicitly use SCM_CREDENTIALS in the future?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6363,"context_line":"       READY\u003d1"},{"line_number":6364,"context_line":"       RELOADING\u003d1"},{"line_number":6365,"context_line":"       STOPPING\u003d1"},{"line_number":6366,"context_line":"       STATUS\u003d\u003csome string\u003e"},{"line_number":6367,"context_line":""},{"line_number":6368,"context_line":"    :param logger: a logger object"},{"line_number":6369,"context_line":"    :param msg: the message to send"}],"source_content_type":"text/x-python","patch_set":12,"id":"39aeb099_57e3b96f","line":6366,"updated":"2023-12-04 23:22:05.000000000","message":"I don\u0027t think our processes ever actually send STATUS\u003dXXX but I have systemd related tools having special support for that format, e.g. the systemd-notify tool:\n\nhttps://www.commandlinux.com/man-page/man1/systemd-notify.1.html","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":false,"context_lines":[{"line_number":6363,"context_line":"       READY\u003d1"},{"line_number":6364,"context_line":"       RELOADING\u003d1"},{"line_number":6365,"context_line":"       STOPPING\u003d1"},{"line_number":6366,"context_line":"       STATUS\u003d\u003csome string\u003e"},{"line_number":6367,"context_line":""},{"line_number":6368,"context_line":"    :param logger: a logger object"},{"line_number":6369,"context_line":"    :param msg: the message to send"}],"source_content_type":"text/x-python","patch_set":12,"id":"6f24675f_2e9bf42d","line":6366,"in_reply_to":"39aeb099_57e3b96f","updated":"2024-12-04 01:17:33.000000000","message":"Done","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e7ce22b3bd6c04c584f6f5a865580152583ae466","unresolved":true,"context_lines":[{"line_number":6375,"context_line":"    systemd_socket \u003d os.getenv(\u0027NOTIFY_SOCKET\u0027)"},{"line_number":6376,"context_line":"    if systemd_socket:"},{"line_number":6377,"context_line":"        notify_sockets.append(systemd_socket)"},{"line_number":6378,"context_line":"    for notify_socket in notify_sockets:"},{"line_number":6379,"context_line":"        if notify_socket.startswith(\u0027@\u0027):"},{"line_number":6380,"context_line":"            # abstract namespace socket"},{"line_number":6381,"context_line":"            notify_socket \u003d \u0027\\0%s\u0027 % notify_socket[1:]"}],"source_content_type":"text/x-python","patch_set":12,"id":"b5f594a9_c73db62a","line":6378,"updated":"2023-12-04 23:22:05.000000000","message":"ok, so we\u0027re creating a strong coupling between any message we might want to send to systemd and what we\u0027ll have to support in swift-reload \n\nif we\u0027re going to send two notification messages to two sockets why hide that in a single function?   Why insist that in order to send a message to systemd (that it may or may not evolve to understand) we ALSO have to teach swift-reload how to handle that message first?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":6375,"context_line":"    systemd_socket \u003d os.getenv(\u0027NOTIFY_SOCKET\u0027)"},{"line_number":6376,"context_line":"    if systemd_socket:"},{"line_number":6377,"context_line":"        notify_sockets.append(systemd_socket)"},{"line_number":6378,"context_line":"    for notify_socket in notify_sockets:"},{"line_number":6379,"context_line":"        if notify_socket.startswith(\u0027@\u0027):"},{"line_number":6380,"context_line":"            # abstract namespace socket"},{"line_number":6381,"context_line":"            notify_socket \u003d \u0027\\0%s\u0027 % notify_socket[1:]"}],"source_content_type":"text/x-python","patch_set":12,"id":"a7f54178_fd73d000","line":6378,"in_reply_to":"a0922b47_a6e9bd73","updated":"2025-02-13 20:33:47.000000000","message":"\u003e bit of a red flag if we had a change that wanted to add some new systemd message (EXTEND_TIMEOUT_USEC\u003d..., say?) but didn\u0027t consider how it would/should impact swift-reload\n\nI\u0027m thinking of it more the other way: we want to send a message to swift-reload because systemd doesn\u0027t meet our needs.  That\u0027s the situation that we\u0027re in currently - right?  Otherwise operators would just a simple systemd unit like\n\n```\nType\u003dnotify-reload\nExecReload\u003d/bin/kill -USR1 $MAINPID\n```\n\nor maybe `swift-proxy-server --verify-config /etc/swift... \u0026\u0026 /bin/kill ...` if they want to get fancy; which I assume we\u0027ll continue to wrap up into `swift-reload` as a convenience even if we do eventually confirm deployers are using `Type\u003dnotify-reload` and we can drop support for the synchronous \"wait on READY\u003d1 before exit\" behavior in swift-reload.\n\nin their systemd unit and the $MAINPID process would send a message to systemd\u0027s notify_socket when it\u0027s READY\u003d1\n\n\u003e Why on earth would we start sending messages to systemd unless we already know there\u0027s a version of it that knows how to consume them?\n\nright... so I guess then we\u0027d refactor this code to call systemd_notify with our new SWIFT_SPECIAL_MESSAGE_TO_RELOAD_NOTIFICATION_SERVER and it would only send *that* message to OUR server, but the `systemd_notify` function would still send the messages that systemd_notify supports to systemd.\n\nOR if that seemed like a weird interface for our `systemd_notify` wrapper function - we\u0027d pull it apart - and have the process reload infra call \"systemd_notify\" for the messages that go to systemd - and \"swift_reload_notify\" for the messages that go to swift-reload: which I think would also make sense.\n\nSince it\u0027s currently the case that swift-reload\u0027s notification system has been desinged to mirror the protocol of systemd notify it\u0027s not obviously a functional requirement that we make the technical investment to design these interfaces to evolve separately over time if needed.  It was just confusing to me reviewing the patch.\n\n\u003e The set of systemd messages that we might want to send seems narrow enough that swift-reload probably should know about them all\n\nDo you think this is a good link to keep in the source code?\n\nhttps://www.freedesktop.org/software/systemd/man/latest/sd_notify.html#Well-known%20assignments\n\nAre we going to maintain parity FOREVER even for messages we don\u0027t currently send to the swift-reload socket?  I thought this whole dance was just because old systemd doesn\u0027t support async ExecReload scripts and our existing synchronous ExecReload implementation is sort of a hack?","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"48ac68b6cbae1d7b0fcbc8eb371e96c1d552f210","unresolved":true,"context_lines":[{"line_number":6375,"context_line":"    systemd_socket \u003d os.getenv(\u0027NOTIFY_SOCKET\u0027)"},{"line_number":6376,"context_line":"    if systemd_socket:"},{"line_number":6377,"context_line":"        notify_sockets.append(systemd_socket)"},{"line_number":6378,"context_line":"    for notify_socket in notify_sockets:"},{"line_number":6379,"context_line":"        if notify_socket.startswith(\u0027@\u0027):"},{"line_number":6380,"context_line":"            # abstract namespace socket"},{"line_number":6381,"context_line":"            notify_socket \u003d \u0027\\0%s\u0027 % notify_socket[1:]"}],"source_content_type":"text/x-python","patch_set":12,"id":"a0922b47_a6e9bd73","line":6378,"in_reply_to":"b5f594a9_c73db62a","updated":"2024-12-04 01:17:33.000000000","message":"\u003e in order to send a message to systemd (that it may or may not evolve to understand)\n\nWhy on earth would we start sending messages to systemd unless we already *know* there\u0027s a version of it that knows how to consume them?\n\nThe set of systemd messages that we might want to send seems narrow enough that `swift-reload` probably *should* know about them all. I\u0027d view it as a bit of a red flag if we had a change that wanted to add some new systemd message (`EXTEND_TIMEOUT_USEC\u003d...`, say?) but *didn\u0027t* consider how it would/should impact `swift-reload`.","commit_id":"2115cba46f9a323e0ff10bbd3df156c5dbdf1c41"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":4886,"context_line":"    \"\"\""},{"line_number":4887,"context_line":"    if pid is None:"},{"line_number":4888,"context_line":"        pid \u003d os.getpid()"},{"line_number":4889,"context_line":"    return \u0027\\0swift-notifications\\0\u0027 + str(pid)"},{"line_number":4890,"context_line":""},{"line_number":4891,"context_line":""},{"line_number":4892,"context_line":"class NotificationServer(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3c695977_6f291d43","line":4889,"updated":"2025-02-13 20:33:47.000000000","message":"I was able to catch this in the act with\n```\nvagrant@saio:~$ while true; do ss -a | grep swift | sed \u0027s/@/\\\\0/g\u0027; sleep 0.1; done\nu_dgr UNCONN 0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \nu_dgr UNCONN 0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \nu_dgr UNCONN 0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \nu_dgr ESTAB  0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \nu_dgr ESTAB  0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \nu_dgr ESTAB  0      0                                  \\0swift-notifications\\018817 239630                                    * 0                \n```\n\nand then run `swift-reload 18815` in another window\n\nN.B. this function has two callers, only one supports the `@` \u003d\u003e `\\0` translation - so sending the literal \u0027\\0\u0027 is probably reasonable.\n\nP.S. please forgive the `sed \u0027s/@/\\\\0/g\u0027` I was frustrated by gerrit giving me an error about being unable to notify an \"at-swift-notifications\" user.","commit_id":"fa6c72ffaef10abe59bb0ad50993fef718ba3d48"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":4911,"context_line":"        self.sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":4912,"context_line":"        started \u003d False"},{"line_number":4913,"context_line":"        try:"},{"line_number":4914,"context_line":"            self.sock.bind(get_pid_notify_socket(self.pid))"},{"line_number":4915,"context_line":"            self.sock.settimeout(self.read_timeout)"},{"line_number":4916,"context_line":"            started \u003d True"},{"line_number":4917,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":14,"id":"c276283b_9bb12b22","line":4914,"updated":"2025-02-13 20:33:47.000000000","message":"oic, this is why we don\u0027t want to return the `@` prefixed abstract socket name - we\u0027d have to implment the name translation logic that\u0027s in notify_systemd in here too.","commit_id":"fa6c72ffaef10abe59bb0ad50993fef718ba3d48"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"8f4012ba3066c8c35dd6104e0d813daf1cec880b","unresolved":true,"context_lines":[{"line_number":4960,"context_line":"    for notify_socket in notify_sockets:"},{"line_number":4961,"context_line":"        if notify_socket.startswith(\u0027@\u0027):"},{"line_number":4962,"context_line":"            # abstract namespace socket"},{"line_number":4963,"context_line":"            notify_socket \u003d \u0027\\0%s\u0027 % notify_socket[1:]"},{"line_number":4964,"context_line":"        sock \u003d socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)"},{"line_number":4965,"context_line":"        with closing(sock):"},{"line_number":4966,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":14,"id":"4861f3e3_588df4ae","line":4963,"updated":"2025-02-13 20:33:47.000000000","message":"it seems a little trixy for the `Get a pid-specific abstract notification socket` to not use this... but it\u0027s because that same method is also used by another class that doesn\u0027t share this normalization.","commit_id":"fa6c72ffaef10abe59bb0ad50993fef718ba3d48"}]}
