Currently port binding call is made at destination compute in post live
migration phase. This may cause network outage during post-copy as the
virtual CPUs are paused immediately at source and unpaused at
destination by transferring a minimum set of pages.
The following domain life cycle events are emitted in this order during
post-copy:
* VIR_DOMAIN_EVENT_STARTED(destination)
* VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY(source)--migration
entered post-copy mode
* VIR_DOMAIN_EVENT_RESUMED_POSTCOPY(destination)--guest
is running on the destinaton host while some if its
memory pages still remain on sourcehost.
* VIR_DOMAIN_EVENT_RESUMED_MIGRATED(destination)
* VIR_DOMAIN_EVENT_STOPPED_MIGRATED(source)--migration
finished successfully and the destination host holds
a complete guest state.
In this change, dest host port binding activation is done when the
following events are emitted at source for post-copy and pre-copy:
* VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY
* VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED
This reduces the network outage during live migration as network switch
is done right before VM resumes at destination.
Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>
Change-Id: Ic5cab99944df9e501ba2032eb96911c36304494d
Closes-Bug: #1605016
Hyper-V can emit events signaling that an instance was suspended.
The issue is that at the moment, there is no lifecycle event defined
for this instance state in nova.virt.event.
This patch adds this lifecycle event and ensures that the manager
will properly handle it.
Partially fixes bug: #1428505
Change-Id: I0fad28025785e77ef32b88ff813f39000d9f9e35
oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.
Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
When an event object gets dumped in a stack trace, because there
is no __repr__ of it, we don't get any details about what it was.
Add a __repr__ to all the event objects so that we can get this
information on a fail.
Change-Id: I9a62a4348871b748c53b7354ad1b821fe987127d
Instead of logging integers in a cryptic way, log the human
readable strings for VM event state transitions. Also use the
existing instance_uuid port of the logger instead of putting that
separately into our log message.
Change-Id: I96c39ad4494aa06a8dd5bd942c669a16836a8b9c
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
This introduces the basic infrastructure to allow compute
drivers to emit asychronous events for processing by the
virt API. Initially the only event defined is a "lifecycle"
event which allows the virt API to immediately detect the
start and stop of virtual domain instances, without needing
to frequently poll the compute API.
The base compute driver gains a method enabling the manage
to register a callback to receive events, and another method
to allow driver subclasses to emit events.
Blueprint: compute-driver-events
Change-Id: Ic9abcd3f829c106e840538a01376862ab5b3485b
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>