Commit Graph

9 Commits

Author SHA1 Message Date
Mitya_Eremeev 9fef8807cf DLM to fix host notification race.
Two concurrent events that host is down
might be accepted by different instances of API
which triggers two evacuation workflows for instances.
Patch introduces distributed lock for creation of
host type notifications. It solves the issue.

Closes-Bug: 1961110
Change-Id: Ie8f10b14f29a8548181560cd8a26b4dc79afc3dc
2022-07-19 09:31:47 +00:00
Sean McGinnis c401beb370
Remove monotonic usage
The monotonic package was needed for monotonic time operations when
running under Python runtimes older than 3.3. Since we now only support
versions higher than this, this third party package requirement can now
be removed.

Change-Id: I5e5e446c51195f3a53604dcdc43fd8e8881b24d5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-07-13 14:44:25 -05:00
bhagyashris 4299b38883 Enable mutable config in Masakari
New releases of oslo.config support a 'mutable' parameter to Opts.
This is only respected when the new method mutate_config_files is
called instead of reload_config_files. Masakari delegates making
this call to oslo.service, so how do we switch?
Icec3e664f3fe72614e373b2938e8dee53cf8bc5e allows services to tell
oslo.service they want mutate_config_files to be called by passing a
parameter, which this patch does.

This allows Masakari to benefit from
I1e7a69de169cc85f4c09954b2f46ce2da7106d90, where the 'debug' option
(owned by oslo.log) is made mutable. We should be able to turn debug
logging on and off by changing the config and sending SIGHUP.
Also in this patch configuration parameter
'retry_notification_new_status_interval' is marked as mutable.

Part of bp:mutable-config

Change-Id: Icf4438b98420eb0e9d35a19cf88831f359c74fe5
2018-05-11 16:10:46 +05:30
Dinesh Bhor 2c4574bfdc Make eventlet hub use a monotonic clock
If system time is adjusted first forward and then backward while a
masakari-engine service is running, then the periodic tasks stops
for the duration of time the system clock was adjusted backward.

This was supposed to be fixed by the following patch to oslo.service
https://review.openstack.org/#/c/286838/ , but the order of imports
in unit tests and production code is different, so masakari services
end up starting with the default eventlet hub, that does not use a
monotonic clock and, thus, is affected by changes of system time.

Testing the change done in the patch is problematic, as it's a
subject of imports order and is not reproduced in functional or
unit tests (oslo_service is always imported earlier than eventlet
hub is initialized, so it just does "the right thing").
The alternative is to make an assertion when services start.

Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Closes-Bug: #1510234
Change-Id: I9d917b3151d9cdf7340a173b5baf98def63c76cd
2017-11-14 07:15:45 +00:00
lcsong c9f7a3c56d Remove log translations
Log messages are no longer being translated. This removes all use of
the _LC, _LE, _LI and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I4c96f3590d46205c45d12ee4ead8c208e11c52c5
2017-04-05 08:11:09 +00:00
dineshbhor 834c1ae050 Add RPC layer for masakari
This patch will add RPC framework to send notification from
masakari-api to masakari-engine service.

Change-Id: I3c514db1a652834a56efb187b754e336580ca7fc
2016-10-07 13:16:26 +05:30
Abhishek Kekane d8040e7ccc Add masakari-engine support
Added masakari-engine service using oslo_service framework. Added
MasakariManager class which will handle RPC calls related to
notifications.

Change-Id: Ifd704cf452ceb4ece2867ca8fba3f94fbb94aa42
2016-10-05 14:53:26 +05:30
Nguyen Hung Phuong c83e2d637c TrivialFix: Remove logging import unused
This patch removes logging import unused in

masakari/objects/host.py
masakari/service.py
masakari/tests/unit/objects/test_objects.py

Change-Id: If8bec3d4624fe7fe3cda299822894828e739d2d3
2016-09-15 08:53:56 +07:00
Abhishek Kekane d4f055262e Add support for wsgi framework
Added wsgi framework support to create masakari-api
service using oslo_service framework. Similar to core
openstack projects, config items will be kept at centralized
location.

Refer README.rst to cofigure and run masakari-api service.

Change-Id: Idb0120b8cf3b10642c51b286d82cd0944cad5ca3
2016-07-12 13:10:10 +05:30