kadalu / moana

Moana is a frontend for the Kadalu Storage / GlusterFS. Moana provides tools for setting up and managing the Kadalu Storage / Gluster pools.
GNU General Public License v3.0
18 stars 7 forks source link

Delegate service management to systemd or other service managers #310

Open aravindavk opened 1 year ago

aravindavk commented 1 year ago

When Moana server goes down, the other processes(glusterfsd, shd and others) need not stop since it can work without the Storage manager. It is easy to use the already available service manager.

Replace the current code of starting the service with:

Note: Do not enable the service. On node reboot, Systemd should not start the service, since Storage manager may need to perform some action before starting the service.

Update the systemd service file as:

[Unit]
Description=Kadalu Storage Manager
After=network.target

[Service]
PIDFile=/var/run/kadalu/kadalu-mgr.pid
ExecStart=/usr/sbin/kadalu mgr --workdir=/var/lib/kadalu --logdir=/var/log/kadalu --service-mgr=systemd

[Install]
WantedBy=multi-user.target

Develop plugin like architecture so that other init systems can be supported.

Container release uses Supervisord to manage the Kadalu Storage manager. Update supervisord conf file with additional arguments to kadalu-mgr

[supervisord]
nodaemon=true

[program:kadalu-mgr]
command=/usr/sbin/kadalu mgr --workdir=/var/lib/kadalu --logdir=/var/log/kadalu --service-mgr=supervisor --supervisor-conf=/etc/supervisor/conf.d/supervisor.conf