(2.10) Introduce _UpgradeSerializedRuntime() method
authorDimitris Aragiorgis <dimara@grnet.gr>
Fri, 29 Nov 2013 19:14:19 +0000 (21:14 +0200)
committerDimitris Aragiorgis <dimara@grnet.gr>
Tue, 17 Dec 2013 10:46:47 +0000 (12:46 +0200)
commite2800fca6ce62e1392e78cc4c67a7fbf721b5ccd
treeb563f7d30a805f46471f4abcf70b2733d1d19efe
parent6ba0093cd6a85132427b3cc0a0d4bcdedfa541f0
(2.10) Introduce _UpgradeSerializedRuntime() method

This method is invoked during _AnalizeSerializedRuntime() and is
meant to modify runtime files in the way cfgupgrade does for
config.data.  This could remove deprecated fields, change the
format of the file, add/remove sections, etc.

There is a possibility data included inside runtime
files to cause migration failures after a Ganeti upgrade.
Use this method to avoid such cases.

Commit cc6fd3d exports NICs' UUIDs to configuration scripts.
It assumes UUIDs as an non optional slot in NIC object.
This is true for latest Ganeti versions. Still there might
be instances created back in Ganeti 2.7 missing that slot.

Ganeti 2.10 supports hot-plugging of devices. A prerequisite
for this feature was to change the format of runtime files and
add another entry containing block devices. This was done in
_AnalizeSerializedRuntime(). Move this logic in the new method.

Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>
lib/hypervisor/hv_kvm.py