medic / medic-os

A space-efficient Linux-based operating system, designed specifically to run Medic's mHealth platform. This is the build system and source code; Docker images will be available on Medic's website.
https://medic.org
GNU Affero General Public License v3.0
10 stars 6 forks source link

Set process title in supervisor after a package is updated #25

Open henokgetachew opened 6 years ago

henokgetachew commented 6 years ago

This is after a package update.

vm@medic:/srv/storage/gardener/logs $ sudo ps aux | grep package-update
14048 root     {package-update} /bin/sh /boot/package-update medic-core-v17000-x64.vpkg
14083 root     {package-update} /bin/sh /boot/package-update medic-core-v17000-x64.vpkg
14130 root     {package-update} /bin/sh /boot/package-update medic-core-v17000-x64.vpkg
14186 root     {package-update} /bin/sh /boot/package-update medic-core-v17000-x64.vpkg
14238 root     {package-update} /bin/sh /boot/package-update medic-core-v17000-x64.vpkg

@SCdF and I have noticed this with package-install as well. A reboot is required in order to get the processes to quit.

ghost commented 6 years ago

This is a process titling issue IIRC; ps is showing the process name under which the job was invoked despite the fact that the process has forked, detached, and is now running in the background. We could look into doing something like setproctitle or otherwise passing through a better-named exec call.

Those are the supervisor processes IIRC – one for each supervised service beneath medic-core. It just sucks to look at.

ghost commented 6 years ago

I've updated the title to reflect the action that I think needs to be taken here.