Skip to content

Delegate service management to systemd or other service managers #310

@aravindavk

Description

@aravindavk

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:

  • Create the systemd unit file with all the arguments.
  • Start the service

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions