bosh-linux-stemcell-builder icon indicating copy to clipboard operation
bosh-linux-stemcell-builder copied to clipboard

Noble Numbat stemcell no longer uses `runit` to launch the agent

Open aramprice opened this issue 1 year ago • 4 comments

Currently the bosh-agent is started using a separate process manager runit.

This issue proposed removing runit in favor of the existing process manager on Ubuntu, systemd.

Having a single process management system allows that system to optimize startup across all processes in the system hopefully speeding up the time-to-ready for the whole system.

This is related to though not dependent on replacing monit (also with systemd).

aramprice avatar Feb 21 '24 18:02 aramprice

when moving the agent and monit to systemd. i noticed that chpst is used in almost all bosh releases which will run a program with the user vcap chpst is a component from runit. so we still need to have runit. there is an option to replace it chpst -u vcap:vcap with:

  • runuser- u vcap -g vcap executable
  • systemd-run --uid vcap --guid vcap
  • setpriv--reuid vcap --regid vcap

ramonskie avatar Mar 26 '24 10:03 ramonskie

As discovered by Ramon: the agent also invokes runit directly to start monit: https://github.com/cloudfoundry/bosh-agent/blob/main/platform/monit_retryable.go#L20 This should become configurable similar to: https://github.com/cloudfoundry/bosh-agent/pull/324

rkoster avatar Apr 03 '24 06:04 rkoster

We should consider what we want to do with bosh-lite too. We could keep runit just on the warden stemcells or we could come up with an alternative (since systemd doesn't run under warden stemcells)

jpalermo avatar Apr 04 '24 15:04 jpalermo

in the meantime i have removed the runit units for monit and the agent and converted them to systemd services https://github.com/cloudfoundry/bosh-linux-stemcell-builder/commit/c27910fdf1ee48187ae767edb27df3f5d666b17b

ramonskie avatar Apr 15 '24 13:04 ramonskie