[Pkg-ganeti-devel] [instance-debootstrap] 01/02: Use kpartx's sync mode

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Fri May 23 09:07:02 UTC 2014


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

apoikos pushed a commit to branch master
in repository instance-debootstrap.

commit 36d9bc5de4c6df5bab6937762bcd7e4b6f0e36e3
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date:   Fri May 23 11:49:30 2014 +0300

    Use kpartx's sync mode
    
    Add a patch (merged upstream post-0.14) to use kpartx in sync mode when
    creating the partition device maps, to solve a race where the creation
    script would proceed before the actual devices were present.
    
    Git-Dch: full
---
 ...se-sync-kpartx-mode-when-creating-devices.patch | 33 ++++++++++++++++++++++
 debian/patches/series                              |  2 +-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/debian/patches/0001-Use-sync-kpartx-mode-when-creating-devices.patch b/debian/patches/0001-Use-sync-kpartx-mode-when-creating-devices.patch
new file mode 100644
index 0000000..71b22fa
--- /dev/null
+++ b/debian/patches/0001-Use-sync-kpartx-mode-when-creating-devices.patch
@@ -0,0 +1,33 @@
+From 5a8a67b7579d89488a9de4c2f44a15d61a5eee2b Mon Sep 17 00:00:00 2001
+From: Apollon Oikonomopoulos <apoikos at gmail.com>
+Date: Mon, 24 Mar 2014 22:28:15 +0200
+Subject: [PATCH] Use sync kpartx mode when creating devices
+
+Pass the -s (sync) flag to kpartx in map_disk0(). Without the -s flag,
+kpartx will return directly after signaling the device mapper to create
+the partition devices, however it is not guaranteed that the devices
+will have appeared in userspace by the time map_disk0 will look for
+them. With -s, kpartx will wait until the devices have been created.
+
+Signed-off-by: Apollon Oikonomopoulos <apoikos at gmail.com>
+Reviewed-by: Klaus Aehlig <aehlig at google.com>
+---
+ common.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common.sh.in b/common.sh.in
+index a35eadd..8d5bcc0 100644
+--- a/common.sh.in
++++ b/common.sh.in
+@@ -105,7 +105,7 @@ map_disk0() {
+     log_error "Cannot interpret kpartx output and get partition mapping"
+     exit 1
+   fi
+-  kpartx -a -p- $blockdev > /dev/null
++  kpartx -a -s -p- $blockdev > /dev/null
+   filesystem_dev="/dev/mapper/$filesystem_dev_base"
+   if [ ! -b "$filesystem_dev" ]; then
+     log_error "Can't find kpartx mapped partition: $filesystem_dev"
+-- 
+2.0.0.rc2
+
diff --git a/debian/patches/series b/debian/patches/series
index 08f1dad..efa4b4a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-# comment to keep empty file in the diff.gz
+0001-Use-sync-kpartx-mode-when-creating-devices.patch

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



More information about the Pkg-ganeti-devel mailing list