The event handler emits bogus events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
compute-hyperv |
Fix Released
|
High
|
Lucian Petrut |
Bug Description
The listener currently used by the instance event handler records
all WMI instance object changes, even though we only care about
power state changes.
For this reason, we currently record the last emited power state
change in order to see whether the power state actually changed
before emiting a new change.
This is problematic and unreliable. When the instance is created,
it will be powered off. If anything changes, the current
implementation will emit a power off event, having no previous
recorded state. For this reason, the manager can consider that the
the instance was unexpectedly powered off, calling the stop
API, which is highly undesirable.
This patch fixes the issue by constructing a WQL query used by the
event listener in order to catch events only in case the instance
actually transitioned into one of the states that we're interested
in.
Changed in compute-hyperv: | |
status: | Fix Committed → Fix Released |
Addressed by: https:/ /review. openstack. org/#/c/ 190158/ 1