osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[masakari] Run masakari-hostmonitor into Docker container


Hi Gaëtan,
 I have never tried it, but sounds interesting.
 Current masakari is not designed to run in the containers.
 However, except masakari monitors, most of masakari components can
run on the containers.

For masakari-hostmonitor, you don't need to run systemd daemon inside
the container.
Hoever, the code need to be changed slightly to use remote systemd on
the host OS.
ex: systemctl --host user_name at host_name command
Or we also can use the method Mark shared in previous email.

> I would not recommend running the systemd daemon in a container, but
> you could potentially use the client to access a daemon running on the
> host. E.g., for debian:
> https://stackoverflow.com/questions/54079586/make-systemctl-work-from-inside-a-container-in-a-debian-stretch-image.
> No doubt there will be various gotchas with this.

> Are you planning to run pacemaker and corosync on the host?
Since masakari-hostmonitor needs to detect any failures of the host,
pacemaker and corosync need to run on the host OS.
You may do the otherwise, but this is the simplest solution.


--- Regards,
Sampath

On Fri, Jun 28, 2019 at 5:15 PM Mark Goddard <mark at stackhpc.com> wrote:
>
> On Thu, 27 Jun 2019 at 21:52, <gaetan.trellu at incloudus.com> wrote:
> >
> > Hi,
> >
> > I'm integrating Masakari into Kolla and Kolla Ansible projects but I'm
> > facing
> > an issue related to masakari-hostmonitor.
> >
> > Based on masakari-monitors code[1], "systemctl status" command is used
> > to check
> > if pacemaker, pacemaker-remote and corosync are running.
> >
> > Having systemd running into Docker container is not the best solution.
> > Does any
> > of you has been able to run masakari-monitor into Docker container ?
> >
>
> I would not recommend running the systemd daemon in a container, but
> you could potentially use the client to access a daemon running on the
> host. E.g., for debian:
> https://stackoverflow.com/questions/54079586/make-systemctl-work-from-inside-a-container-in-a-debian-stretch-image.
> No doubt there will be various gotchas with this.
>
> Are you planning to run pacemaker and corosync on the host?
>
> Mark
>
> > Thanks for your help.
> >
> > Gaëtan
> >
> > - [1]
> > https://github.com/openstack/masakari-monitors/blob/26d558333d9731ca06da09b26fe6592c49c0ac8a/masakarimonitors/hostmonitor/host_handler/handle_host.py#L48
> >
>