Instance failure: Ignore notifications for certain events raised from libivrt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
masakari |
Fix Released
|
Undecided
|
Dinesh Bhor |
Bug Description
Masakari-monitors send notification for following libvirt events to masakari.
<pre>
event:LIFECYCLE
virt_domain_
event: REBOOT
virt_domain_
event: WATCHDOG
virt_domain_event: WATCHDOG_
event: IO_ERROR
virt_domain_event: IO_ERROR_
event: IO_ERROR_REASON
virt_domain_event: UNKNOWN
event: CONTROL_ERROR
virt_domain_event: UNKNOWN
</pre>
Out of all above events, masakari-engine should run instance recovery workflow only for the below events and for all the other remaining events it should simply log message with info log level.
<pre>
event:LIFECYCLE
virt_domain_
event: IO_ERROR
virt_domain_event: IO_ERROR_REPORT
</pre>
Changed in masakari: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in masakari: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/430121 /git.openstack. org/cgit/ openstack/ masakari/ commit/ ?id=74dff4b446b f280f6c3dd1dd65 6e6c56594d38ed
Committed: https:/
Submitter: Jenkins
Branch: master
commit 74dff4b446bf280 f6c3dd1dd656e6c 56594d38ed
Author: Dinesh Bhor <email address hidden>
Date: Thu Jan 19 15:22:33 2017 +0530
InstanceFai lure: Ignore notifications for certain events
For instance failure recovery Masakari doesn't check for the event from
payload received in notification, as a result it executes workflow for
all the events received.
When a instance is stopped (normal operation), masakari- instancemonitor
sends notifications related to following two events one after another to
masakari-api service.
A) event: LIFECYCLE detail: STOPPED_SHUTDOWN
B) event: LIFECYCLE detail: SHUTDOWN_FINISHED
When masakari-engine processes the first notification, it checks for vmstate instancemonitor and masakari- instancemonitor will send
of the instance, if it’s 'stopped', it won't stop the vm. But if it's not
stopped it will attempt to stop it. Then again, libvirt will send the above
two events to masakari-
related notifications to masakari-api and this way it will go into the recursion.
To solve this issue we can only process the below mentioned events at masakari
side which actually requires actions to be taken:
A) 'event': 'LIFECYCLE', 'vir_domain_event': 'STOPPED_FAILED'
B) 'event': 'IO_ERROR', 'vir_domain_event': 'IO_ERROR_REPORT'
So removed handling of all other events. For all other events masakari will
simply log the message at INFO level and mark the notification status as
'ignored'.
Closes-Bug: #1662994 7bab32b9656b6c4 2de5e5d7a54
Change-Id: If1113a599894cc