[Pkg-ganeti-devel] [ganeti] 05/05: Fix luxid startup

Apollon Oikonomopoulos apoikos-guest at alioth.debian.org
Wed Sep 4 11:21:44 UTC 2013


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

apoikos-guest pushed a commit to branch experimental
in repository ganeti.

commit 859baeaaab036045d216ec98edfe9940d403cdb8
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Wed Sep 4 10:30:27 2013 +0300

    Fix luxid startup
    
    Add two patches handling the new dsahostkeypub cluster config field. This fixes
    luxid startup.
---
 debian/changelog                                   |    7 ++++
 ...0001-Mark-the-DSA-host-pubkey-as-optional.patch |   37 ++++++++++++++++++++
 ...ove-dsahostkeypub-during-config-downgrade.patch |   32 +++++++++++++++++
 debian/patches/series                              |    2 ++
 4 files changed, 78 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5484685..3dfa7b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,13 @@
 ganeti (2.8.0~rc2-1) experimental; urgency=low
 
   * New upstream version
+  * Introduce 2 new patches
+    - 0001-Mark-the-DSA-host-pubkey-as-optional.patch
+      Mark the newly-added dsahostkeypub cluster config field as optional. This
+      fixes luxid startup.
+    - 0002-Remove-dsahostkeypub-during-config-downgrade.patch
+      Remove the dsahostkeypub cluster config field during config downgrade to
+      2.7
   * Drop patches merged upstream
     - luxid now properly starts on the master node
     - re-enabled the failing TestVerifyRestrictedCmdDirectory test (fixed
diff --git a/debian/patches/0001-Mark-the-DSA-host-pubkey-as-optional.patch b/debian/patches/0001-Mark-the-DSA-host-pubkey-as-optional.patch
new file mode 100644
index 0000000..763e18c
--- /dev/null
+++ b/debian/patches/0001-Mark-the-DSA-host-pubkey-as-optional.patch
@@ -0,0 +1,37 @@
+From c47f416e37104501ab4e9f4240cf9ff844f5764e Mon Sep 17 00:00:00 2001
+Message-Id: <c47f416e37104501ab4e9f4240cf9ff844f5764e.1378067627.git.apoikos at gmail.com>
+In-Reply-To: <cover.1378067627.git.apoikos at gmail.com>
+References: <cover.1378067627.git.apoikos at gmail.com>
+From: Apollon Oikonomopoulos <apoikos at gmail.com>
+Date: Sun, 1 Sep 2013 23:21:08 +0300
+Subject: [PATCH stable-2.8 1/2] Mark the DSA host pubkey as optional
+
+Commit a9542a4 introduced support for DSA SSH keys. However, the dsahostkeypub
+field added to the config is not marked as optional in the Haskell components.
+As a result, luxid thinks the config file is corrupt and refuses to start. We
+fix this by marking the dsahostkeypub as an optionalField.
+
+This fixes issue 560.
+
+Signed-off-by: Apollon Oikonomopoulos <apoikos at gmail.com>
+---
+ src/Ganeti/Objects.hs |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Ganeti/Objects.hs b/src/Ganeti/Objects.hs
+index 3f5b513..57d6f9e 100644
+--- a/src/Ganeti/Objects.hs
++++ b/src/Ganeti/Objects.hs
+@@ -669,7 +669,8 @@ type UidPool = [(Int, Int)]
+ -- * Cluster definitions
+ $(buildObject "Cluster" "cluster" $
+   [ simpleField "rsahostkeypub"           [t| String           |]
+-  , simpleField "dsahostkeypub"           [t| String           |]
++  , optionalField $
++    simpleField "dsahostkeypub"           [t| String           |]
+   , simpleField "highest_used_port"       [t| Int              |]
+   , simpleField "tcpudp_port_pool"        [t| [Int]            |]
+   , simpleField "mac_prefix"              [t| String           |]
+-- 
+1.7.10.4
+
diff --git a/debian/patches/0002-Remove-dsahostkeypub-during-config-downgrade.patch b/debian/patches/0002-Remove-dsahostkeypub-during-config-downgrade.patch
new file mode 100644
index 0000000..3fefbc4
--- /dev/null
+++ b/debian/patches/0002-Remove-dsahostkeypub-during-config-downgrade.patch
@@ -0,0 +1,32 @@
+From 41eef0937af2425ecd5316e9057fd61ef6416e06 Mon Sep 17 00:00:00 2001
+Message-Id: <41eef0937af2425ecd5316e9057fd61ef6416e06.1378067627.git.apoikos at gmail.com>
+In-Reply-To: <cover.1378067627.git.apoikos at gmail.com>
+References: <cover.1378067627.git.apoikos at gmail.com>
+From: Apollon Oikonomopoulos <apoikos at gmail.com>
+Date: Sun, 1 Sep 2013 23:27:45 +0300
+Subject: [PATCH stable-2.8 2/2] Remove dsahostkeypub during config downgrade
+
+Remove the newly-added DSA host public key field from the configuration file
+when downgrading to 2.7, if present. Otherwise masterd will refuse to start.
+
+Signed-off-by: Apollon Oikonomopoulos <apoikos at gmail.com>
+---
+ tools/cfgupgrade |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tools/cfgupgrade b/tools/cfgupgrade
+index 14b2685..6a8d5a4 100755
+--- a/tools/cfgupgrade
++++ b/tools/cfgupgrade
+@@ -307,6 +307,8 @@ def DowngradeCluster(config_data):
+   ipolicy = cluster.get("ipolicy", None)
+   if ipolicy:
+     DowngradeIPolicy(ipolicy, "cluster")
++  if "dsahostkeypub" in cluster:
++    del cluster["dsahostkeypub"]
+ 
+ 
+ def DowngradeDisk(disk):
+-- 
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 7011cb7..1aec394 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
 fix-startup-with-old-config.patch
 cfgupgrade12-remove-old-ssconf.patch
 0003-Disable-local-checks-during-build.patch
+0001-Mark-the-DSA-host-pubkey-as-optional.patch
+0002-Remove-dsahostkeypub-during-config-downgrade.patch

-- 
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