From openstacksdk version 0.11.1 onwards, there is no way
you can add service to the connection. Hence we need to monkey
_find_service_filter_class method from sdk to allow
to point to thee correct service filter class from masakariclient.
Solution provided here is not going to work in sdk 0.9.19 and
0.10.0 versions. Because service descriptor is not supported
in 0.9.19 and 0.10.0 sdk versions and profile parameter doesn't
work correctly during connection initialization.
Also solution provided here is not going to work in sdk 0.13.0
and above, it will still fails with below error
"'Connection' object has no attribute 'ha'"
this is because 'Connection' object expecting instance_ha not ha
Co-Author: tpatil <tushar.vitthal.patil@gmail.com>
Change-Id: Ic10d1b380abc8b3b6cc38015c9c3bf4ab7705a0c
Depends-On: I24ec493f3333a5b3f6bfed9395c921fb28500065
Closes-Bug: #1779752
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I9298555dd7571f85b37abeed2291e94119721987
Story: #2002586
Task: #24310
The new stable upper-constraints file is only available
after the openstack/requirements repository is branched.
This will happen around the RC1 timeframe.
Recheck and merge this change once the requirements
repository has been branched.
The CI system will work with this patch before the requirements
repository is branched because zuul configues the job to run
with a local copy of the file and defaults to the master branch.
However, accepting the patch will break the test configuration
on developers' local systems, so please wait until after the
requirements repository is branched to merge the patch.
Change-Id: I76939b6c0f1d866b5bb80e169226887ac40758dd
In exceptions.HttpException has no attribute 'http_status'.
Use status_code instead of http_status.In future, 'http_status'
parameter will be removed. For UT, use response object instead of
http_status.
Change-Id: Id0e3ae5377ea713cf2394975c827605dbc860143
Signed-off-by: Sampath Priyankara <sam47priya@gmail.com>
In some cases specific connection uri may needed to connect libvirt,
like libvirt and instancemonitor are running in seperated docker
container.
Change-Id: I8f4f89aa12850e4bcaf1a3874a8cc5605f0f22ca
masakari-monitors should use os-testr instead of testr as
it is more powerful and provide much prettier output than testr.
This patch also disables the use of PY34 and adds PY35 for in tox
as the gating on python 3.4 is restricted to <= Mitaka in OpenStack.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available. Python 3 don't have 'file' builtin method so
to make it compatible with Python 2 and 3 used 'open' builtin method.
Also fixed the failing test cases due to that.
Change-Id: Ib84b0b28a845e49eaef969d0fc995b1adbb7b29d
This patch added missing testcases for hostmonitor directory.
And also improved existing testcases for them.
Change-Id: Iedc86123a2bc17299119ddb52824d0c449afa993
While getting the openstacksdk connection object, the
'project_domain_name' from conf file is passed to both
'user_domain_id' and 'project_domain_id' parameters.
The keystoneauth 'get_auth_plugin_conf_options('password')' [1]
also generates both 'user_domain_id' and 'project_domain_id' in
api section so no need to pass 'project_domain_name' to them we
can pass their respective values directly.
This patch fixes this by passing 'user_domain_id' and
'project_domain_id' to their respective parameters from api section
of conf file.
[1] https://github.com/openstack/masakari-monitors/blob/master/masakarimonitors/conf/api.py#L42
Closes-Bug: #1686896
Change-Id: I5b55db2eb0c1c1aa9a3d0123112d25c78eb38ea3
This patch changed the required oslo.privsep version so that
the masakari-monitors don't take following bug.
https://bugs.launchpad.net/oslo.privsep/+bug/1674185
Change-Id: Iaa9bcd3d7d62f44ab2ee0e7fe329b241bf117cb0
This patch added missing testcases for ha and processmonitor
directory. And also improved existing testcases for them.
Change-Id: Ifd9681b53b71122aa9ca738e6e6bf49f282b1f61
This patch added missing testcases for instancemonitor directory.
And also improved existing testcases for them.
Change-Id: I5cf815a418d885a52e7f8dcb14607e49e2a9f5bc
This patch fixed so that failure messages of notifying are output
when the retuen value of notifying is not 0.
With this fix, the success message is output only when the return
value of notifying is 0, and when the other return value, the
failure message is output.
And, this patch also fixed the problem of return value conditions
other than when notifying.
Change-Id: Ic72cf7226b226a045f5154ba91e2e9758e2cc9db
Closes-Bug: #1676338
data_files definition of setup.cfg is unnecessary.
This patch removes the data_files definition of setup.cfg.
Change-Id: I224ae8b99c78ed1f3e1853047e1e50ff56ac5b6b
Closes-Bug: #1665524
This patch adds README.rst of masakari-monitors.
Change-Id: I521c3f248d0931d736b7ebcaa84137a2b5939eeb
Implements: bp pythonize-host-and-process-monitor
This patch adds warning messages to process/host monitor,
and adds a release note about process/host monitor.
Change-Id: I6527438fca457eb2ec6d7ca224520d7a8748394e
Implements: bp pythonize-host-and-process-monitor
If the HTTP status of the notification is 409, monitors should
not retry notification processing.
This patch modified to skip the notification retry processing
if the monitors receives 409 HTTP status.
Since this problem exists only in the monitors implemented
with python, no need to modify the monitors implemented with
bash shell script.
Change-Id: I267c5676a5057d5d7a8e0ef718ea01c914c9a99d
Closes-Bug: #1664498
If serve method from service module is called twice, it will raise
error as '_' is not imported.
Imported '_' from i18n module to resolve this issue.
Change-Id: Ia2d9b6f6153373d6fa77267f3a9da43a47a38a27
If user has enabled “monkey_patch” config option and kept the default
“monkey_patch_modules” config option as is, then service gives
ValueError at the time of starting itself. The default value given to
the “monkey_patch_modules” config option is not according to the format
expected which results into ValueError at service starting.
This patch fixes this issue by making monkey_patch_modules's correct
default value and if user wants to apply monkey patching then syntax
must be correct so handled that value error.
Closes-Bug: #1660545
Change-Id: I637a36eacdabca8c4edbba201d491744690869ef
Added hacking check to ensure that _ is imported and allows multiple
imports from i18n module per line.
Change-Id: Ieffabd6f2fe866000c5dc1d9ce83acd2f9ab0450
This patch add implementation of script calling pre and post
on starting and restarting processes.
Change-Id: Id492fab44413d86c27a6e2f188b7fe84780a553c
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of sending a notification.
Change-Id: I56f592e9ce91447ac35fb14073c0c94cb9677472
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of preventing split-brain.
The part that captures packets of corosync is not impelemented yet.
Change-Id: I6bedd28928ac53dfa30b889d2442d748edad2f9c
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of sending a notification.
Change-Id: I2582ca76e1aeb897b908b35e3de4074e9cabc640
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of comparing if host status
changed.
Change-Id: Ibd009a27765acd4673ff75ffb097088c091f101b
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of monitoring host.
Change-Id: I066a0b632389e261dcd8e5ca6e7067d47be9eab1
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of restarting processes
Change-Id: I1d88127ec9316c2721f2a1cafc9c7a55b3534875
Implements: bp pythonize-host-and-process-monitor
This patch adds implementation of monitoring processes
Change-Id: I0778599b8997d4b6d9a728e746bf0f8232609da5
Implements: bp pythonize-host-and-process-monitor