[Pkg-ganeti-devel] [SCM] Ganeti packaging branch, master, updated. debian/2.4.5-1-3-g2c3f4b8
Iustin Pop
iustin at debian.org
Sat Mar 24 23:19:08 UTC 2012
The following commit has been merged in the master branch:
commit c63b636a1d98f53a508372e145da321d161f164a
Author: Iustin Pop <iustin at debian.org>
Date: Sat Mar 24 20:58:07 2012 +0100
Back-port patch to fix compatibility with kvm 1.0
This was the original version of the patch that was not accepted; the
final version is more involved. But in any case, this works well for
us.
diff --git a/debian/patches/series b/debian/patches/series
index 62f588b..5d041b7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
fix-startup-with-old-config.patch
cfgupgrade12-remove-old-ssconf.patch
+support-kvm-1.0.patch
diff --git a/debian/patches/support-kvm-1.0.patch b/debian/patches/support-kvm-1.0.patch
new file mode 100644
index 0000000..0c54eda
--- /dev/null
+++ b/debian/patches/support-kvm-1.0.patch
@@ -0,0 +1,40 @@
+From: Guido Trotter <ultrotter at google.com>
+To: Ganeti Development <ganeti-devel at googlegroups.com>
+Subject: [PATCH stable-2.5] KVM: support version reported by 1.0
+Date: Thu, 5 Jan 2012 16:22:36 +0000
+
+This of course was working for all the rcs, but broke with 1.0 itself.
+
+Signed-off-by: Guido Trotter <ultrotter at google.com>
+---
+ lib/hypervisor/hv_kvm.py | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+--- a/lib/hypervisor/hv_kvm.py
++++ b/lib/hypervisor/hv_kvm.py
+@@ -199,7 +199,7 @@
+ _MIGRATION_INFO_MAX_BAD_ANSWERS = 5
+ _MIGRATION_INFO_RETRY_DELAY = 2
+
+- _VERSION_RE = re.compile(r"\b(\d+)\.(\d+)\.(\d+)\b")
++ _VERSION_RE = re.compile(r"\b(\d+)\.(\d+)(\.(\d+))?\b")
+
+ ANCILLARY_FILES = [
+ _KVM_NETWORK_SCRIPT,
+@@ -937,8 +937,14 @@
+ if not match:
+ return None
+
+- return (match.group(0), int(match.group(1)), int(match.group(2)),
+- int(match.group(3)))
++ v_all = match.group(0)
++ v_maj = int(match.group(1))
++ v_min = int(match.group(2))
++ if match.group(4):
++ v_rev = int(match.group(4))
++ else:
++ v_rev = 0
++ return (v_all, v_maj, v_min, v_rev)
+
+ def StopInstance(self, instance, force=False, retry=False, name=None):
+ """Stop an instance.
--
Ganeti packaging
More information about the Pkg-ganeti-devel
mailing list