[Pkg-ganeti-devel] [ganeti] 05/10: Fix pre-migration version compatibility check

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Tue Oct 3 14:44:30 UTC 2017


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch debian/stable/stretch
in repository ganeti.

commit 1b65d18e14c5c47d693d9f179f5605414e7ebd04
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Mon May 29 11:47:53 2017 +0300

    Fix pre-migration version compatibility check
    
    Backport upstream commit 0df7c246e34.
---
 debian/patches/series                              |  1 +
 .../use-hv-class-to-check-for-migration.patch      | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 7494ea1..ea4d6e5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,4 @@ snap-server-1.0-compat
 non-DSA-SSH-key-support.patch
 fix-ssh-key-renewal-on-single-node-clusters.patch
 set-defaults-for-ssh-type-bits.patch
+use-hv-class-to-check-for-migration.patch
diff --git a/debian/patches/use-hv-class-to-check-for-migration.patch b/debian/patches/use-hv-class-to-check-for-migration.patch
new file mode 100644
index 0000000..440ae1c
--- /dev/null
+++ b/debian/patches/use-hv-class-to-check-for-migration.patch
@@ -0,0 +1,24 @@
+From 0df7c246e34a9c18b96fb84c9a0bb915c7361988 Mon Sep 17 00:00:00 2001
+From: David Mohr <david at mcbf.net>
+Date: Mon, 22 Aug 2016 11:31:47 +0100
+Subject: [PATCH] Bugfix: migrate needs HypervisorClass, not an instance
+
+Otherwise it will complain about permissions of
+/var/run/ganeti/kvm-hypervisor
+
+Signed-off-by: David Mohr <david at mcbf.net>
+Reviewed-by: Brian Foley <bpfoley at google.com>
+
+diff --git a/lib/cmdlib/instance_migration.py b/lib/cmdlib/instance_migration.py
+index b4435e7a3..c6053230a 100644
+--- a/lib/cmdlib/instance_migration.py
++++ b/lib/cmdlib/instance_migration.py
+@@ -712,7 +712,7 @@ class TLMigrateInstance(Tasklet):
+         self.feedback_fn("* warning: hypervisor version mismatch between"
+                          " source (%s) and target (%s) node" %
+                          (src_version, dst_version))
+-        hv = hypervisor.GetHypervisor(self.instance.hypervisor)
++        hv = hypervisor.GetHypervisorClass(self.instance.hypervisor)
+         if hv.VersionsSafeForMigration(src_version, dst_version):
+           self.feedback_fn("  migrating from hypervisor version %s to %s should"
+                            " be safe" % (src_version, dst_version))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git



More information about the Pkg-ganeti-devel mailing list