[libvirt] [PATCHv3 3/6] esx: reject unknown flags
Eric Blake
eblake at redhat.com
Fri Jul 15 22:36:29 UTC 2011
On 07/15/2011 09:30 AM, Matthias Bolte wrote:
> 2011/7/15 Eric Blake<eblake at redhat.com>:
>> Silently ignored flags get in the way of new features that
>> use those flags.
>>
>> Regarding ESX migration flags - right now, ESX silently enforces
>> VIR_MIGRATE_PERSIST_DEST, VIR_MIGRATE_UNDEFINE_SOURCE, and
>> VIR_MIGRATE_LIVE, even if those flags were not supplied; it ignored
>> other flags. This patch does not change the implied bits (it permits
>> but does not require them), but enforces only the supported bits.
>> If further cleanup is needed to be more particular about migration
>> flags, that should be a separate patch.
It turns out that libvirt.c also handles (or at least claims to handle)
VIR_MIGRATE_PAUSED on behalf of ESX, so I'm squashing this in:
diff --git i/src/esx/esx_driver.c w/src/esx/esx_driver.c
index 80d687b..9b0a541 100644
--- i/src/esx/esx_driver.c
+++ w/src/esx/esx_driver.c
@@ -3845,7 +3845,8 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
#define ESX_MIGRATION_FLAGS \
(VIR_MIGRATE_PERSIST_DEST | \
VIR_MIGRATE_UNDEFINE_SOURCE | \
- VIR_MIGRATE_LIVE)
+ VIR_MIGRATE_LIVE | \
+ VIR_MIGRATE_PAUSED)
static int
esxDomainMigratePrepare(virConnectPtr dconn,
libvirt.c also handles VIR_MIGRATE_PEER2PEER and VIR_MIGRATE_TUNNELLED,
but only if the driver advertises those features, which ESX does not.
So by the time the ESX callbacks are reached, those flag bits can never
be set.
>
> ACK.
I've pushed this now.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list