All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] Final round of SLES resync patches
@ 2013-01-17 14:59 Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 01/11] Cleanup whitespaces Hannes Reinecke
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Hi Christophe,

and this is now the final round of SLES resync patches.
Mostly cleanup and minor fixes, except from the abstract
socket patch for CLI commands.
I _thought_ I had send this early, but apparently not.
Please apply.

Note that I've removed the rules file as it shouldn't
be necessary anymore; we're using libudev directly.

Hannes Reinecke (10):
  Cleanup whitespaces
  Provide correct persistent symlinks for user_friendly_names
  kpartx_id: Generate persistent symlinks for 'wwn'
  kpartx: Fix DASD name in kpartx_id
  Break out loop in factorize_hwtable()
  multipathd: switch to abstract sockets for CLI commands
  multipathd: log message when check interval has changed
  multipathd: call 'reconfigure' during startup
  multipath: do not install rules file
  kpartx: Deinstall kpartx_id

Petr Uzel (1):
  Fix inconsistent entries after merging hwtable with user's config

 kpartx/Makefile                 |    1 +
 kpartx/kpartx.rules             |    8 ++++++++
 kpartx/kpartx_id                |   11 +++++++++--
 libmultipath/config.c           |   25 +++++++++++++++++++------
 libmultipath/defaults.h         |    2 +-
 libmultipath/uxsock.c           |   27 ++++++++++++++-------------
 multipath/Makefile              |    3 ---
 multipath/multipath.rules       |    7 -------
 multipathd/main.c               |   26 ++++++++++++++------------
 multipathd/multipathd.init.suse |    2 +-
 multipathd/uxlsnr.c             |    6 +++---
 11 files changed, 70 insertions(+), 48 deletions(-)
 delete mode 100644 multipath/multipath.rules

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 01/11] Cleanup whitespaces
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 02/11] Provide correct persistent symlinks for user_friendly_names Hannes Reinecke
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 multipathd/uxlsnr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index 85dbd70..71fc3b4 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -1,6 +1,6 @@
 /*
  * Original author : tridge@samba.org, January 2002
- * 
+ *
  * Copyright (c) 2005 Christophe Varoqui
  * Copyright (c) 2005 Benjamin Marzinski, Redhat
  */
@@ -54,7 +54,7 @@ static void new_client(int ux_sock)
 	int fd;
 
 	fd = accept(ux_sock, &addr, &len);
-	
+
 	if (fd == -1)
 		return;
 
@@ -133,7 +133,7 @@ void * uxsock_listen(int (*uxsock_trigger)(char *, char **, int *, void *),
 
 		/* most of our life is spent in this call */
 		poll_count = poll(polls, i, SLEEP_TIME);
-		
+
 		if (poll_count == -1) {
 			if (errno == EINTR)
 				continue;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 02/11] Provide correct persistent symlinks for user_friendly_names
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 01/11] Cleanup whitespaces Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 03/11] kpartx_id: Generate persistent symlinks for 'wwn' Hannes Reinecke
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

When the option 'user_friendly_names' is set we should provide
both symlinks, the persistent one and that one generated for
user_friendly_names.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 kpartx/kpartx.rules |    4 ++++
 kpartx/kpartx_id    |    7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index ba5c6cb..8640094 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -18,10 +18,14 @@ OPTIONS="link_priority=50"
 # Create persistent links for multipath tables
 ENV{DM_UUID}=="mpath-*", \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
+ENV{DM_MPATH}=="?*", ENV{DM_PART}!="?*", \
+	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}"
 
 # Create persistent links for partitions
 ENV{DM_PART}=="?*", \
         SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
+ENV{DM_MPATH}=="?*", ENV{DM_PART}=="?*", \
+	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}-part$env{DM_PART}"
 
 # Create dm tables for partitions
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
diff --git a/kpartx/kpartx_id b/kpartx/kpartx_id
index fa21b5b..afb589c 100644
--- a/kpartx/kpartx_id
+++ b/kpartx/kpartx_id
@@ -55,6 +55,9 @@ if [ "$dmtbl" = "part" ] ; then
     # The name of the kpartx table is the name of the parent table
     dmname=$($DMSETUP info  -c --noheadings -o name -u $dmuuid)
     echo "DM_NAME=$dmname"
+    if [ "$dmname" != ${dmuuid#mpath-} ] ; then
+	echo "DM_MPATH=${dmuuid#mpath-}"
+    fi
     # We need the dependencies of the parent table to figure out
     # the type if the parent is a multipath table
     case "$dmuuid" in
@@ -63,7 +66,9 @@ if [ "$dmtbl" = "part" ] ; then
 	    ;;
     esac
 elif [ "$dmtbl" = "mpath" ] ; then
-    dmname=$tblname
+    if [ -n "$DM_NAME" -a "$DM_NAME" != "$dmuuid" ] ; then
+	echo "DM_MPATH=$dmuuid"
+    fi
     # We need the dependencies of the table to figure out the type
     dmdeps=$($DMSETUP deps -u $UUID)
 elif [ "$dmtbl" = "dmraid" ] ; then
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 03/11] kpartx_id: Generate persistent symlinks for 'wwn'
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 01/11] Cleanup whitespaces Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 02/11] Provide correct persistent symlinks for user_friendly_names Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 04/11] Fix inconsistent entries after merging hwtable with user's config Hannes Reinecke
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Newer udev versions generate /dev/disk/by-id/wwn-* symlinks.
We should be adjusting those for multipathing, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 kpartx/kpartx.rules |    4 ++++
 kpartx/kpartx_id    |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index 8640094..b96ec89 100644
--- a/kpartx/kpartx.rules
+++ b/kpartx/kpartx.rules
@@ -20,12 +20,16 @@ ENV{DM_UUID}=="mpath-*", \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}"
 ENV{DM_MPATH}=="?*", ENV{DM_PART}!="?*", \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}"
+ENV{DM_WWN}=="?*", ENV{DM_PART}!="?*", \
+	SYMLINK+="disk/by-id/wwn-$env{DM_WWN}"
 
 # Create persistent links for partitions
 ENV{DM_PART}=="?*", \
         SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}"
 ENV{DM_MPATH}=="?*", ENV{DM_PART}=="?*", \
 	SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_MPATH}-part$env{DM_PART}"
+ENV{DM_WWN}=="?*", ENV{DM_PART}=="?*", \
+	SYMLINK+="disk/by-id/wwn-$env{DM_WWN}-part$env{DM_PART}"
 
 # Create dm tables for partitions
 ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
diff --git a/kpartx/kpartx_id b/kpartx/kpartx_id
index afb589c..47fab1a 100644
--- a/kpartx/kpartx_id
+++ b/kpartx/kpartx_id
@@ -69,6 +69,7 @@ elif [ "$dmtbl" = "mpath" ] ; then
     if [ -n "$DM_NAME" -a "$DM_NAME" != "$dmuuid" ] ; then
 	echo "DM_MPATH=$dmuuid"
     fi
+    dmname="$dmuuid"
     # We need the dependencies of the table to figure out the type
     dmdeps=$($DMSETUP deps -u $UUID)
 elif [ "$dmtbl" = "dmraid" ] ; then
@@ -92,6 +93,7 @@ if [ -n "$dmdeps" ] ; then
 	    ;;
 	*)
             echo "DM_TYPE=scsi"
+	    echo "DM_WWN=0x${dmname#?}"
 	    ;;
     esac
 else
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 04/11] Fix inconsistent entries after merging hwtable with user's config
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (2 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 03/11] kpartx_id: Generate persistent symlinks for 'wwn' Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 05/11] kpartx: Fix DASD name in kpartx_id Hannes Reinecke
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Petr Uzel

From: Petr Uzel <petr.uzel@suse.cz>

When merging the user provided configuration with the internal
hwtable entry in merge_hwe(), it can happen that the resulting
entry has a discrepancy between 'features' and 'no_path_retry'.
Check for this special case and fix it.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
 libmultipath/config.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libmultipath/config.c b/libmultipath/config.c
index b317e32..2d88226 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -335,6 +335,15 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)
 	merge_num(retain_hwhandler);
 	merge_num(detect_prio);
 
+	/*
+	 * Make sure features is consistent with
+	 * no_path_retry
+	 */
+	if (dst->no_path_retry == NO_PATH_RETRY_FAIL)
+		remove_feature(&dst->features, "queue_if_no_path");
+	else if (dst->no_path_retry != NO_PATH_RETRY_UNDEF)
+		add_feature(&dst->features, "queue_if_no_path");
+
 	return 0;
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 05/11] kpartx: Fix DASD name in kpartx_id
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (3 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 04/11] Fix inconsistent entries after merging hwtable with user's config Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 06/11] Break out loop in factorize_hwtable() Hannes Reinecke
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

The name of the DASD type is 'ccw', not 'dasd'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 kpartx/kpartx_id |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kpartx/kpartx_id b/kpartx/kpartx_id
index 47fab1a..517b856 100644
--- a/kpartx/kpartx_id
+++ b/kpartx/kpartx_id
@@ -83,7 +83,7 @@ fi
 if [ -n "$dmdeps" ] ; then
     case "$dmdeps" in
 	*\(94,*)
-            echo "DM_TYPE=dasd"
+            echo "DM_TYPE=ccw"
 	    ;;
 	*\(104,* | *\(105,* | *\(106,* | *\(107,* | *\(108,* | *\(109,* | *\(110,* | *\(112,*)
 	    echo "DM_TYPE=cciss"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 06/11] Break out loop in factorize_hwtable()
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (4 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 05/11] kpartx: Fix DASD name in kpartx_id Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 07/11] multipathd: switch to abstract sockets for CLI commands Hannes Reinecke
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

We need to break out of the loop in factorize_hwtable() as
soon as we have removed a duplicate. Otherwise we might run
onto an deleted element in the outer loop.
Also we should declare factorize_hwtable() as 'void'
as it doesn't return anything.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/config.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/libmultipath/config.c b/libmultipath/config.c
index 2d88226..25d3e3d 100644
--- a/libmultipath/config.c
+++ b/libmultipath/config.c
@@ -418,12 +418,13 @@ out:
 	return 1;
 }
 
-static int
+static void
 factorize_hwtable (vector hw, int n)
 {
 	struct hwentry *hwe1, *hwe2;
 	int i, j;
 
+restart:
 	vector_foreach_slot(hw, hwe1, i) {
 		if (i == n)
 			break;
@@ -435,14 +436,17 @@ factorize_hwtable (vector hw, int n)
 			merge_hwe(hwe2, hwe1);
 			if (hwe_strmatch(hwe2, hwe1) == 0) {
 				vector_del_slot(hw, i);
-				free_hwe(hwe1);
-				n -= 1;
-				i -= 1;
-				break;
+				/*
+				 * Play safe here; we have modified
+				 * the original vector so the outer
+				 * vector_foreach_slot() might
+				 * become confused.
+				 */
+				goto restart;
 			}
 		}
 	}
-	return 0;
+	return;
 }
 
 struct config *
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 07/11] multipathd: switch to abstract sockets for CLI commands
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (5 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 06/11] Break out loop in factorize_hwtable() Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 08/11] multipathd: log message when check interval has changed Hannes Reinecke
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Instead of using file-based sockets we should be switching to
abstract sockets. Otherwise multipathd won't be able to start
if the directory is not available.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/defaults.h |    2 +-
 libmultipath/uxsock.c   |   27 ++++++++++++++-------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index 32948d8..b83d9fb 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -24,7 +24,7 @@
 
 #define MAX_DEV_LOSS_TMO	0x7FFFFFFF
 #define DEFAULT_PIDFILE		"/var/run/multipathd.pid"
-#define DEFAULT_SOCKET		"/var/run/multipathd.sock"
+#define DEFAULT_SOCKET		"/org/kernel/linux/storage/multipathd"
 #define DEFAULT_CONFIGFILE	"/etc/multipath.conf"
 #define DEFAULT_BINDINGS_FILE	"/etc/multipath/bindings"
 #define DEFAULT_WWIDS_FILE	"/etc/multipath/wwids"
diff --git a/libmultipath/uxsock.c b/libmultipath/uxsock.c
index e786899..f3e8dec 100644
--- a/libmultipath/uxsock.c
+++ b/libmultipath/uxsock.c
@@ -25,19 +25,21 @@
  */
 int ux_socket_connect(const char *name)
 {
-	int fd;
+	int fd, len;
 	struct sockaddr_un addr;
 
 	memset(&addr, 0, sizeof(addr));
-	addr.sun_family = AF_UNIX;
-	strncpy(addr.sun_path, name, sizeof(addr.sun_path));
+	addr.sun_family = AF_LOCAL;
+	addr.sun_path[0] = '\0';
+	len = strlen(name) + 1;
+	strncpy(&addr.sun_path[1], name, len);
 
-	fd = socket(AF_UNIX, SOCK_STREAM, 0);
+	fd = socket(AF_LOCAL, SOCK_STREAM, 0);
 	if (fd == -1) {
 		return -1;
 	}
 
-	if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
+	if (connect(fd, (struct sockaddr *)&addr, len) == -1) {
 		close(fd);
 		return -1;
 	}
@@ -51,20 +53,19 @@ int ux_socket_connect(const char *name)
  */
 int ux_socket_listen(const char *name)
 {
-	int fd;
+	int fd, len;
 	struct sockaddr_un addr;
 
-	/* get rid of any old socket */
-	unlink(name);
-
-	fd = socket(AF_UNIX, SOCK_STREAM, 0);
+	fd = socket(AF_LOCAL, SOCK_STREAM, 0);
 	if (fd == -1) return -1;
 
 	memset(&addr, 0, sizeof(addr));
-	addr.sun_family = AF_UNIX;
-	strncpy(addr.sun_path, name, sizeof(addr.sun_path));
+	addr.sun_family = AF_LOCAL;
+	addr.sun_path[0] = '\0';
+	len = strlen(name) + 1;
+	strncpy(&addr.sun_path[1], name, len);
 
-	if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
+	if (bind(fd, (struct sockaddr *)&addr, len) == -1) {
 		close(fd);
 		return -1;
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 08/11] multipathd: log message when check interval has changed
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (6 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 07/11] multipathd: switch to abstract sockets for CLI commands Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 09/11] multipathd: call 'reconfigure' during startup Hannes Reinecke
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

We should only log the message if the check interval has
indeed changed.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 multipathd/main.c |   26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 8c0866d..7f83a7a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1209,18 +1209,20 @@ check_path (struct vectors * vecs, struct path * pp)
 			reinstate_path(pp, 0);
 		} else {
 			LOG_MSG(4, checker_message(&pp->checker));
-			/*
-			 * double the next check delay.
-			 * max at conf->max_checkint
-			 */
-			if (pp->checkint < (conf->max_checkint / 2))
-				pp->checkint = 2 * pp->checkint;
-			else
-				pp->checkint = conf->max_checkint;
-
-			pp->tick = pp->checkint;
-			condlog(4, "%s: delay next check %is",
-				pp->dev_t, pp->tick);
+			if (pp->checkint != conf->max_checkint) {
+				/*
+				 * double the next check delay.
+				 * max at conf->max_checkint
+				 */
+				if (pp->checkint < (conf->max_checkint / 2))
+					pp->checkint = 2 * pp->checkint;
+				else
+					pp->checkint = conf->max_checkint;
+
+				pp->tick = pp->checkint;
+				condlog(4, "%s: delay next check %is",
+					pp->dev_t, pp->tick);
+			}
 		}
 	}
 	else if (newstate == PATH_DOWN) {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 09/11] multipathd: call 'reconfigure' during startup
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (7 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 08/11] multipathd: log message when check interval has changed Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 10/11] multipath: do not install rules file Hannes Reinecke
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

The init script should be calling 'reconfigure' cli command
during startup. That not only checks if the daemon is running,
but will also cause a complete reconfiguration, so all devices
which might have been missed during init will be catched.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 multipathd/multipathd.init.suse |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipathd/multipathd.init.suse b/multipathd/multipathd.init.suse
index 03a1151..d1319b1 100644
--- a/multipathd/multipathd.init.suse
+++ b/multipathd/multipathd.init.suse
@@ -38,7 +38,7 @@ case "$1" in
     start)
 	echo -n "Starting multipathd"
 	ulimit -c unlimited
-	if $DAEMON -k"show daemon" > /dev/null 2>&1 ; then
+	if $DAEMON -k"reconfigure" > /dev/null 2>&1 ; then
 	    echo -n " (multipathd running)"
 	    rc_status -v
 	    rc_exit
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 10/11] multipath: do not install rules file
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (8 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 09/11] multipathd: call 'reconfigure' during startup Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-17 14:59 ` [PATCH 11/11] kpartx: Deinstall kpartx_id Hannes Reinecke
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

multipathd now uses libudev, so the rules file is not required.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 multipath/Makefile        |    3 ---
 multipath/multipath.rules |    7 -------
 2 files changed, 10 deletions(-)
 delete mode 100644 multipath/multipath.rules

diff --git a/multipath/Makefile b/multipath/Makefile
index f748417..593c78d 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -21,15 +21,12 @@ $(EXEC): $(OBJS)
 install:
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
-	$(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
-	$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
 
 uninstall:
-	rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
 	rm $(DESTDIR)$(bindir)/$(EXEC)
 	rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
 	rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
deleted file mode 100644
index ac97749..0000000
--- a/multipath/multipath.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# udev rules for multipathing.
-# The persistent symlinks are created with the kpartx rules
-#
-
-# socket for uevents
-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 11/11] kpartx: Deinstall kpartx_id
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (9 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 10/11] multipath: do not install rules file Hannes Reinecke
@ 2013-01-17 14:59 ` Hannes Reinecke
  2013-01-18 16:58 ` [PATCH 00/11] Final round of SLES resync patches Xose Vazquez Perez
  2013-01-18 19:20 ` Christophe Varoqui
  12 siblings, 0 replies; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-17 14:59 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

We've installed it, so we should be uninstalling it, too.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 kpartx/Makefile |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kpartx/Makefile b/kpartx/Makefile
index 1287053..b0d73a3 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -36,6 +36,7 @@ install: $(EXEC) $(EXEC).8
 uninstall:
 	rm -f $(DESTDIR)$(bindir)/$(EXEC)
 	rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz
+	rm -f $(DESTDIR)$(libudevdir)/kpartx_id
 
 clean:
 	rm -f core *.o $(EXEC) *.gz
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/11] Final round of SLES resync patches
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (10 preceding siblings ...)
  2013-01-17 14:59 ` [PATCH 11/11] kpartx: Deinstall kpartx_id Hannes Reinecke
@ 2013-01-18 16:58 ` Xose Vazquez Perez
  2013-01-21  7:15   ` Hannes Reinecke
  2013-01-18 19:20 ` Christophe Varoqui
  12 siblings, 1 reply; 16+ messages in thread
From: Xose Vazquez Perez @ 2013-01-18 16:58 UTC (permalink / raw)
  To: device-mapper development; +Cc: Christophe Varoqui

On 01/17/2013 03:59 PM, Hannes Reinecke wrote:

> and this is now the final round of SLES resync patches.

Hannes, I do miss support for HSV3[46]0 devices.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/11] Final round of SLES resync patches
  2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
                   ` (11 preceding siblings ...)
  2013-01-18 16:58 ` [PATCH 00/11] Final round of SLES resync patches Xose Vazquez Perez
@ 2013-01-18 19:20 ` Christophe Varoqui
  12 siblings, 0 replies; 16+ messages in thread
From: Christophe Varoqui @ 2013-01-18 19:20 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: dm-devel, Christophe Varoqui

On jeu., 2013-01-17 at 15:59 +0100, Hannes Reinecke wrote:
> Hi Christophe,
> 
> and this is now the final round of SLES resync patches.
> Mostly cleanup and minor fixes, except from the abstract
> socket patch for CLI commands.
> I _thought_ I had send this early, but apparently not.
> Please apply.
> 
> Note that I've removed the rules file as it shouldn't
> be necessary anymore; we're using libudev directly.
> 
Applied.

Best regards,
Christophe Varoqui
www.opensvc.com

> Hannes Reinecke (10):
>   Cleanup whitespaces
>   Provide correct persistent symlinks for user_friendly_names
>   kpartx_id: Generate persistent symlinks for 'wwn'
>   kpartx: Fix DASD name in kpartx_id
>   Break out loop in factorize_hwtable()
>   multipathd: switch to abstract sockets for CLI commands
>   multipathd: log message when check interval has changed
>   multipathd: call 'reconfigure' during startup
>   multipath: do not install rules file
>   kpartx: Deinstall kpartx_id
> 
> Petr Uzel (1):
>   Fix inconsistent entries after merging hwtable with user's config
> 
>  kpartx/Makefile                 |    1 +
>  kpartx/kpartx.rules             |    8 ++++++++
>  kpartx/kpartx_id                |   11 +++++++++--
>  libmultipath/config.c           |   25 +++++++++++++++++++------
>  libmultipath/defaults.h         |    2 +-
>  libmultipath/uxsock.c           |   27 ++++++++++++++-------------
>  multipath/Makefile              |    3 ---
>  multipath/multipath.rules       |    7 -------
>  multipathd/main.c               |   26 ++++++++++++++------------
>  multipathd/multipathd.init.suse |    2 +-
>  multipathd/uxlsnr.c             |    6 +++---
>  11 files changed, 70 insertions(+), 48 deletions(-)
>  delete mode 100644 multipath/multipath.rules
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/11] Final round of SLES resync patches
  2013-01-18 16:58 ` [PATCH 00/11] Final round of SLES resync patches Xose Vazquez Perez
@ 2013-01-21  7:15   ` Hannes Reinecke
  2013-01-21 18:48     ` Christophe Varoqui
  0 siblings, 1 reply; 16+ messages in thread
From: Hannes Reinecke @ 2013-01-21  7:15 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: device-mapper development, Christophe Varoqui

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

On 01/18/2013 05:58 PM, Xose Vazquez Perez wrote:
> On 01/17/2013 03:59 PM, Hannes Reinecke wrote:
>
>> and this is now the final round of SLES resync patches.
>
> Hannes, I do miss support for HSV3[46]0 devices.
>
Oh. Correct.

Christophe, could you apply the patch?

Thanks.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

[-- Attachment #2: multipath-add-hp-p6300.patch --]
[-- Type: text/x-patch, Size: 784 bytes --]

From 9631beb23e3f873ceac4a80746cd3013891d33b6 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 28 Jun 2012 18:19:48 +0200
Subject: [PATCH] Add definitions for HP P6300

Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index c5b4071..d7292ee 100644
--- a/libmultipath/hwtable.c
+++ b/libmultipath/hwtable.c
@@ -133,7 +133,7 @@ static struct hwentry default_hw[] = {
 	{
 		/* EVA 3000/5000 with new firmware, EVA 4000/6000/8000 */
 		.vendor        = "(COMPAQ|HP)",
-		.product       = "HSV1[01]1|HSV2[01]0|HSV300|HSV4[05]0",
+		.product       = "HSV1[01]1|HSV2[01]0|HSV3[046]0|HSV4[05]0",
 		.features      = DEFAULT_FEATURES,
 		.hwhandler     = DEFAULT_HWHANDLER,
 		.pgpolicy      = GROUP_BY_PRIO,

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 00/11] Final round of SLES resync patches
  2013-01-21  7:15   ` Hannes Reinecke
@ 2013-01-21 18:48     ` Christophe Varoqui
  0 siblings, 0 replies; 16+ messages in thread
From: Christophe Varoqui @ 2013-01-21 18:48 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: device-mapper development, Xose Vazquez Perez, Christophe Varoqui

On lun., 2013-01-21 at 08:15 +0100, Hannes Reinecke wrote:
> On 01/18/2013 05:58 PM, Xose Vazquez Perez wrote:
> > On 01/17/2013 03:59 PM, Hannes Reinecke wrote:
> >
> >> and this is now the final round of SLES resync patches.
> >
> > Hannes, I do miss support for HSV3[46]0 devices.
> >
> Oh. Correct.
> 
> Christophe, could you apply the patch?
> 
Done.

Christophe Varoqui
www.opensvc.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-01-21 18:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 14:59 [PATCH 00/11] Final round of SLES resync patches Hannes Reinecke
2013-01-17 14:59 ` [PATCH 01/11] Cleanup whitespaces Hannes Reinecke
2013-01-17 14:59 ` [PATCH 02/11] Provide correct persistent symlinks for user_friendly_names Hannes Reinecke
2013-01-17 14:59 ` [PATCH 03/11] kpartx_id: Generate persistent symlinks for 'wwn' Hannes Reinecke
2013-01-17 14:59 ` [PATCH 04/11] Fix inconsistent entries after merging hwtable with user's config Hannes Reinecke
2013-01-17 14:59 ` [PATCH 05/11] kpartx: Fix DASD name in kpartx_id Hannes Reinecke
2013-01-17 14:59 ` [PATCH 06/11] Break out loop in factorize_hwtable() Hannes Reinecke
2013-01-17 14:59 ` [PATCH 07/11] multipathd: switch to abstract sockets for CLI commands Hannes Reinecke
2013-01-17 14:59 ` [PATCH 08/11] multipathd: log message when check interval has changed Hannes Reinecke
2013-01-17 14:59 ` [PATCH 09/11] multipathd: call 'reconfigure' during startup Hannes Reinecke
2013-01-17 14:59 ` [PATCH 10/11] multipath: do not install rules file Hannes Reinecke
2013-01-17 14:59 ` [PATCH 11/11] kpartx: Deinstall kpartx_id Hannes Reinecke
2013-01-18 16:58 ` [PATCH 00/11] Final round of SLES resync patches Xose Vazquez Perez
2013-01-21  7:15   ` Hannes Reinecke
2013-01-21 18:48     ` Christophe Varoqui
2013-01-18 19:20 ` Christophe Varoqui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.