[devstack][stein][masakari]Using Masakari in multihost devstack stein setup

Sanjay K isanjayk5 at gmail.com
Mon May 13 07:00:25 UTC 2019


Hi Tushar,

I searched for masakarimonitors.conf on my both controller and compute node
in my devstack stein setup, but I did not find this file present anywhere.
After I run "sudo python setup.py install" from my controller's
"/opt/stack/masakari-monitors" path, it installed the necessary monitoring
binaries in /usr/local/bin/ path-

stack at stein-cntlr-masakari:~/masakari-monitors$ ls -ltr
/usr/local/bin/masakari*
-rwxr-xr-x 1 root root  976 May  9 00:21
/usr/local/bin/masakari-processmonitor.sh
-rwxr-xr-x 1 root root  918 May  9 00:21
/usr/local/bin/masakari-hostmonitor.sh
-rwxr-xr-x 1 root root  222 May  9 00:45 /usr/local/bin/masakari
-rwxr-xr-x 1 root root 1854 May 10 00:06 /usr/local/bin/masakari-wsgi
-rwxr-xr-x 1 root root  158 May 10 00:06 /usr/local/bin/masakari-status
-rwxr-xr-x 1 root root  158 May 10 00:06 /usr/local/bin/masakari-manage
-rwxr-xr-x 1 root root  158 May 10 00:06 /usr/local/bin/masakari-engine
-rwxr-xr-x 1 root root  155 May 10 00:06 /usr/local/bin/masakari-api
-rwxr-xr-x 1 root root  188 May 12 23:23
/usr/local/bin/masakari-introspectiveinstancemonitor
-rwxr-xr-x 1 root root  174 May 12 23:23
/usr/local/bin/masakari-processmonitor
-rwxr-xr-x 1 root root  175 May 12 23:23
/usr/local/bin/masakari-instancemonitor
-rwxr-xr-x 1 root root  171 May 12 23:23 /usr/local/bin/masakari-hostmonitor

Under /opt/stack/masakari-monitors, I can find below config files inside
etc/ -
$ ls -lt etc/masakarimonitors/
total 24
-rwxr-xr-x 1 stack stack 1743 May  9 00:21 hostmonitor.conf.sample
-rw-r--r-- 1 stack stack  173 May  9 00:21
masakarimonitors-config-generator.conf
-rw-r--r-- 1 stack stack 2188 May  9 00:21 process_list.yaml.sample
-rwxr-xr-x 1 stack stack  290 May  9 00:21 processmonitor.conf.sample
-rwxr-xr-x 1 stack stack  239 May  9 00:21 proc.list.sample
-rw-r--r-- 1 stack stack  144 May  9 00:21 README-masakarimonitors.conf.txt

Following steps from README-masakarimonitors.conf.txt to generate
masakarimonitors.conf file by running "tox -egenconfig", I get errors below-

===Errors===
I/opt/stack/masakari-monitors/.tox/genconfig/include/python3.5m -c
ext/_yaml.c -o build/temp.linux-x86_64-3.5/ext/_yaml.o
    ext/_yaml.c:4:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/opt/stack/masakari-monitors/.tox/genconfig/bin/python3 -u
-c 'import setuptools,
tokenize;__file__='"'"'/tmp/pip-install-_yy7e6rg/PyYAML/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
install --record /tmp/pip-record-fbsfgz00/install-record.txt
--single-version-externally-managed --compile --install-headers
/opt/stack/masakari-monitors/.tox/genconfig/include/site/python3.5/PyYAML"
failed with error code 1 in /tmp/pip-install-_yy7e6rg/PyYAML/

====================================================================================================
log end
=====================================================================================================
ERROR: could not install deps
[-r/opt/stack/masakari-monitors/test-requirements.txt]; v =
InvocationError(u'/opt/stack/masakari-monitors/.tox/genconfig/bin/pip
install -chttps://releases.openstack.org/constraints/upper/stein
-r/opt/stack/masakari-monitors/test-requirements.txt', 1)
____________________________________________________________________________________________________
summary
_____________________________________________________________________________________________________
ERROR:   genconfig: could not install deps
[-r/opt/stack/masakari-monitors/test-requirements.txt]; v =
InvocationError(u'/opt/stack/masakari-monitors/.tox/genconfig/bin/pip
install -chttps://releases.openstack.org/constraints/upper/stein
-r/opt/stack/masakari-monitors/test-requirements.txt', 1)
===Errors END===

I also get this same errors  when I try to generate masakarimonitors.conf
file on my compute host after installing masakari monitors binaries on it.

As mentioned by you earlier in this thread, Masakari dev guys are going to
add these monitoring processes in devstack Train release. So my queries are
-

1. whether devstack stein currently does not support these monitoring
processes as of now? If not, whether Masakari service can be utilized fully
using the normal Masakari Stein release branch integrating it with the
other services, not using this devstack version of Masakari what I am
trying in my test multi host setup?

Can you please provide me the documentation link for how to integrate
Masakari and its additional sub binaries to existing openstack services
under stein release.

2. whether Train Masakari main release and Devstack release will completely
support Masakari monitoring services which in turn gives Masakari its full
features to utilize in openstack?
If yes, then I will wait for the next Train release to have this feature
work completely.

thank you for support and help on this as I am trying to put these pieces
together at my end.

Sorry for my long thread.

best regards,
Sanjay


On Tue, Apr 30, 2019 at 8:47 PM Patil, Tushar <Tushar.Patil at nttdata.com>
wrote:

> Hi Sanjay,
>
> You will need to add following config options in masakarimonitors.conf
> under the [api] section.
>
> auth_url
> password
> project_name
> username
> user_domain_id
> project_domain_id
> region
>
> We have added support to install and run following masakari-monitors in
> the current master planned to available in Train cycle.
>
> 1. process monitor
> 2. instance monitor
> 3. introspective instance monitor
>
> We are still working on adding support to install and run host monitors
> using devstack.
>
> Regards,
> Tushar Patil
>
>
>
>
> ________________________________________
> From: Sanjay K <isanjayk5 at gmail.com>
> Sent: Tuesday, April 30, 2019 10:04:21 PM
> To: Patil, Tushar
> Cc: openstack-discuss at lists.openstack.org
> Subject: Re: [devstack][stein][masakari]Using Masakari in multihost
> devstack stein setup
>
> Hi Tushar,
> Thanks you for your quick response on this. As I have already included the
> masakari-monitors plugin in my compute host's local.conf file in devstack,
> I have the repo present in my VM. Following the steps to set up the conf
> files and start the necessary masakari monitoring processes from this link
> https://github.com/openstack/masakari-monitors/blob/master/README.rst I
> get the same error when I start the 3 monitoring processes
> (masakari-processmonitor, masakari-hostmonitor, masakari-instancemonitor) -
>
> stack at devstack-:/etc/masakarimonitors$ masakari-processmonitor
> Traceback (most recent call last):
>   File "/usr/local/bin/masakari-processmonitor", line 10, in <module>
>     sys.exit(main())
>   File
> "/usr/local/lib/python2.7/dist-packages/masakarimonitors/cmd/processmonitor.py",
> line 31, in main
>     config.parse_args(sys.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/masakarimonitors/config.py", line
> 32, in parse_args
>     default_config_files=default_config_files)
>   File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line
> 2127, in __call__
>     self._check_required_opts()
>   File "/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py", line
> 2865, in _check_required_opts
>     raise RequiredOptError(opt.name<http://opt.name>, group)
> oslo_config.cfg.RequiredOptError: value required for option auth-url in
> group [api]
>
> After masakari setup I can file all the required binaries in my
> /usr/local/bin directory -
>
> $ ls -ltr /usr/local/bin/masakari*
> -rwxr-xr-x 1 root root  222 Apr 17 01:55 /usr/local/bin/masakari
> -rwxr-xr-x 1 root root  976 Apr 21 23:41
> /usr/local/bin/masakari-processmonitor.sh
> -rwxr-xr-x 1 root root  918 Apr 21 23:41
> /usr/local/bin/masakari-hostmonitor.sh
> -rwxr-xr-x 1 root root 1854 Apr 29 01:01 /usr/local/bin/masakari-wsgi
> -rwxr-xr-x 1 root root  158 Apr 29 01:01 /usr/local/bin/masakari-status
> -rwxr-xr-x 1 root root  158 Apr 29 01:01 /usr/local/bin/masakari-manage
> -rwxr-xr-x 1 root root  158 Apr 29 01:01 /usr/local/bin/masakari-engine
> -rwxr-xr-x 1 root root  155 Apr 29 01:01 /usr/local/bin/masakari-api
> -rwxr-xr-x 1 root root  174 Apr 30 04:34
> /usr/local/bin/masakari-processmonitor
> -rwxr-xr-x 1 root root  188 Apr 30 04:34
> /usr/local/bin/masakari-introspectiveinstancemonitor
> -rwxr-xr-x 1 root root  175 Apr 30 04:34
> /usr/local/bin/masakari-instancemonitor
> -rwxr-xr-x 1 root root  171 Apr 30 04:34
> /usr/local/bin/masakari-hostmonitor
>
> Please let me know is there any issue with my masakari setup with devstack
> and where can I find latest documentation on Masakari for using in devstack.
>
> thanks for your pointer,
> best regards,
> Sanjay
>
> On Tue, Apr 30, 2019 at 3:24 AM Patil, Tushar <Tushar.Patil at nttdata.com
> <mailto:Tushar.Patil at nttdata.com>> wrote:
> Hi Sanjay,
>
> In case of masakari-processmonitor, it only monitors processes as
> mentioned in the process_list.yaml which by default monitors libvirt-bin,
> nova-compute, instancemonitor, hostmonitor and sshd processes.
>
> To test process failure, you should terminate any of the above processes.
>
> In case of instancemonitor, you can shutdown the VM to test whether a
> notification is sent or not.
>
> >> I have asked the same question in openstack forum, but not got a single
> response.
> Sorry, I didn't notice your question on forum. I have replied above
> comment on forum as well.
>
> Regards,
> Tushar Patil
>
> ________________________________________
> From: Sanjay K <isanjayk5 at gmail.com<mailto:isanjayk5 at gmail.com>>
> Sent: Monday, April 29, 2019 6:18:20 PM
> To: openstack-discuss at lists.openstack.org<mailto:
> openstack-discuss at lists.openstack.org>
> Subject: [devstack][stein][masakari]Using Masakari in multihost devstack
> stein setup
>
> Hi all,
> I have been trying to setup Masakari in a 3 node setup - 1 controller + 2
> computes with minimal openstack services installed using devstack
> stable/stein version. All these 3 nodes are Ubuntu 16.04 VMs. I have
> included Masakari plugin in controller's local.conf file and included
> masakari-monitor in both compute node's local.conf file. I want to test out
> VM/process failure in my test environment. To do so, when I kill one of the
> qemu process created for one instance (cirros 256 flavor VMs) on one of the
> compute with root user login, I did not see any notification under my
> horizon/instance-ha section for this (I have already created Segments,
> Hosts under instance-ha in horizon). Also the killed process is not
> restarted by Masakari.
>
> I have asked the same question in openstack forum, but not got a single
> response.
>
> masakari-notification-on-process-failure<
> https://ask.openstack.org/en/question/121490/masakari-notification-on-process-failure/
> >
>
> Whether any additional services related to Masakari need to be configured
> on compute hosts to detect failures since I did not find exactly the
> documentation related inside devstack for this.
>
> Please let me know if I am missing anything my set up. Any helps and
> pointers are most appreciated.
>
> thank you for your reply.
>
> best regards
> Disclaimer: This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain legally
> privileged, confidential, and proprietary data. If you are not the intended
> recipient, please advise the sender by replying promptly to this email and
> then delete and destroy this email and any attachments without any further
> use, copying or forwarding.
> Disclaimer: This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain legally
> privileged, confidential, and proprietary data. If you are not the intended
> recipient, please advise the sender by replying promptly to this email and
> then delete and destroy this email and any attachments without any further
> use, copying or forwarding.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190513/9bbd5521/attachment-0001.html>


More information about the openstack-discuss mailing list