process name should be "maas-regiond" not "/usr/bin/python /usr/bin/twisted"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
When running ps ax I see something like this:
47624 ? Ssl 3:55 /usr/bin/python /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=
What I'd expect to see on a region+cluster is:
47624 ? Ssl 3:55 maas-regiond
47628 ? Ssl 3:55 maas-clusterd
At the moment, I currently see:
shared@maas:~$ ps ax | grep maas
685 ? S 0:00 avahi-daemon: running [maas.local]
19553 ? Ss 0:01 /usr/sbin/dhcpd -user dhcpd -group dhcpd -f -q -4 -pf /run/maas/
32647 pts/21 S+ 0:00 grep --color=auto maas
47624 ? Ssl 3:55 /usr/bin/python /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=
47626 ? Sl 48:36 (wsgi:maas) -k start
47627 ? Sl 50:12 (wsgi:maas) -k start
47759 ? Ss 0:00 postgres: maas maasdb ::1(43721) idle
47760 ? Ss 0:00 postgres: maas maasdb ::1(43722) idle
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in maas: | |
status: | Triaged → Fix Released |
The bulk of the region controller runs within mod_wsgi in Apache, so
changing the process name may affect the "(wsgi:maas) -k start" lines.
In other words, you'd have multiple maas-regiond processes. Changing the
process title for the cluster should work as described.
There are two libraries that I know of for changing the process title /code.google. com/p/procname/.
for Python, setproctitle and procname. The former is packaged as
python-setproctitle but it's in universe. The latter is not packaged,
but source is available at https:/
The path of least resistance and least surprise would be to use setproctitle) from packages in main (maas*)?
setproctitle if it's installed, and do nothing if not. Can we hint at a
package in universe (python-
I also found the following code snippet: ubuntuforums. org/showthread. php?t=694331& s=b5d7351d5a840 9b929b5bca1585c 9b48&p= 4321311# post4321311
http://
We may be able to put that into MAAS directly, or port it to use ctypes
(which avoids a compilation step). I have some experience with ctypes so
I'm happy to give that a go.
The principle amongst all of these possibilities is to copy a new
process title into the C-level argv[0]. setproctitle is based on a
PostgreSQL library to do this in a cross-platform way. We don't need
cross-platform compatibility, but the fact that it's PostgreSQL is
reassuring. The code snippet has no bounds checking so it appears to be
risky to use as-is. I don't know enough about procname to comment.