Public bug reported: In bug 1816485 we pushed code [0] to have nice process names for neutron-server workers (indicating RPC workers, ...). This was done via setproctitle.
Code itself does not affect other neutron components, but simply loading the setproctitle module will affect the process environment [1] in /proc/xx/environ. This is quite visible when checking "ps -e" output, form: # ps -e|grep neutron 4712 ? 00:00:02 neutron-openvsw 4775 ? 00:00:00 neutron-rootwra 4821 ? 00:00:02 neutron-dhcp-ag 4852 ? 00:00:01 neutron-l3-agen 4932 ? 00:00:00 neutron-rootwra 5790 ? 00:00:02 neutron-server 5844 ? 00:00:00 neutron-server 5845 ? 00:00:00 neutron-server to: # ps -e|grep neutron 28447 ? 00:00:00 neutron-rootwra 28805 ? 00:00:00 neutron-server: 28806 ? 00:00:00 neutron-server: 28807 ? 00:00:00 neutron-server: 31253 ? 00:00:00 neutron-rootwra A shorter test, "ps -e | grep $(pgrep -f neutron-openvswitch-agent)" reported neutron-openvswitch-agent in old systems, and now pythonx.x Using setproctitle's SPT_NOENV feature to avoid clobbering does not work as proper environment name is the full "/usr/bin/python3.6 /usr/local/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.in" (or local equivalent) While using other toosl (or ps options) to find the agent process work fine, some monitoring solutions only work on env name like "ps -e" output As we added process names for neutron-keepalived-state-change [2], I think the "best of both ways" fix would be to set process names in agents starting, with a format like "neutron-openvswitch-agent ($original_proc_title)" Bonus question: I wonder about backportability of such a fix, as it keeps old process name it should be mostly backwards-compatible and helps with other use-cases, but it may break for those using exact matchin [0] https://review.opendev.org/#/c/637019/ [1] https://pypi.org/project/setproctitle/ [2] https://review.opendev.org/#/c/660905/ ** Affects: neutron Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1881297 Title: Neutron agents process name changed after neutron-server setproctitle change Status in neutron: New Bug description: In bug 1816485 we pushed code [0] to have nice process names for neutron-server workers (indicating RPC workers, ...). This was done via setproctitle. Code itself does not affect other neutron components, but simply loading the setproctitle module will affect the process environment [1] in /proc/xx/environ. This is quite visible when checking "ps -e" output, form: # ps -e|grep neutron 4712 ? 00:00:02 neutron-openvsw 4775 ? 00:00:00 neutron-rootwra 4821 ? 00:00:02 neutron-dhcp-ag 4852 ? 00:00:01 neutron-l3-agen 4932 ? 00:00:00 neutron-rootwra 5790 ? 00:00:02 neutron-server 5844 ? 00:00:00 neutron-server 5845 ? 00:00:00 neutron-server to: # ps -e|grep neutron 28447 ? 00:00:00 neutron-rootwra 28805 ? 00:00:00 neutron-server: 28806 ? 00:00:00 neutron-server: 28807 ? 00:00:00 neutron-server: 31253 ? 00:00:00 neutron-rootwra A shorter test, "ps -e | grep $(pgrep -f neutron-openvswitch-agent)" reported neutron-openvswitch-agent in old systems, and now pythonx.x Using setproctitle's SPT_NOENV feature to avoid clobbering does not work as proper environment name is the full "/usr/bin/python3.6 /usr/local/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.in" (or local equivalent) While using other toosl (or ps options) to find the agent process work fine, some monitoring solutions only work on env name like "ps -e" output As we added process names for neutron-keepalived-state-change [2], I think the "best of both ways" fix would be to set process names in agents starting, with a format like "neutron-openvswitch-agent ($original_proc_title)" Bonus question: I wonder about backportability of such a fix, as it keeps old process name it should be mostly backwards-compatible and helps with other use-cases, but it may break for those using exact matchin [0] https://review.opendev.org/#/c/637019/ [1] https://pypi.org/project/setproctitle/ [2] https://review.opendev.org/#/c/660905/ To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1881297/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

