Skip to contentSkip to conversation

multipath-tools: replace multipath configuration output

PATCH In review Xose Vazquez Perez 2 participants 4 messages Apr 8, 2017 – Apr 14, 2017 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: replace multipath configuration output

Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/propsel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
libmultipath/propsel.c +6 -6
index dd10ceb..5f70d86 100644
@@ -162,7 +162,7 @@ int select_pgpolicy(struct config *conf, struct multipath * mp)
 
 	if (conf->pgpolicy_flag > 0) {
 		mp->pgpolicy = conf->pgpolicy_flag;
-		origin = "(cmd line flag)";
+		origin = "(setting: multipath command line [-p] flag)";
 		goto out;
 	}
 	mp_set_mpe(pgpolicy);
@@ -251,18 +251,18 @@ int select_alias(struct config *conf, struct multipath * mp)
 				mp->alias_old, mp->alias_prefix,
 				conf->bindings_read_only);
 		memset (mp->alias_old, 0, WWID_SIZE);
-		origin = "(using existing alias)";
+		origin = "(setting: using existing alias)";
 	}
 
 	if (mp->alias == NULL) {
 		mp->alias = get_user_friendly_alias(mp->wwid,
 				conf->bindings_file, mp->alias_prefix, conf->bindings_read_only);
-		origin = "(user_friendly_name)";
+		origin = "(setting: user_friendly_name)";
 	}
 out:
 	if (mp->alias == NULL) {
 		mp->alias = STRDUP(mp->wwid);
-		origin = "(default to wwid)";
+		origin = "(setting: default to WWID)";
 	}
 	if (mp->alias)
 		condlog(3, "%s: alias = %s %s", mp->wwid, mp->alias, origin);
@@ -565,7 +565,7 @@ int select_retain_hwhandler(struct config *conf, struct multipath *mp)
 
 	if (!VERSION_GE(conf->version, minv_dm_retain)) {
 		mp->retain_hwhandler = RETAIN_HWHANDLER_OFF;
-		origin = "(requires kernel version >= 1.5.0)";
+		origin = "(setting: WARNING, requires kernel version >= 1.5.0)";
 		goto out;
 	}
 	mp_set_ovr(retain_hwhandler);
@@ -614,7 +614,7 @@ int select_deferred_remove(struct config *conf, struct multipath *mp)
 
 #ifndef LIBDM_API_DEFERRED
 	mp->deferred_remove = DEFERRED_REMOVE_OFF;
-	origin = "(not compiled with support)";
+	origin = "(setting: WARNING, not compiled with support)";
 	goto out;
 #endif
 	if (mp->deferred_remove == DEFERRED_REMOVE_IN_PROGRESS) {
Signature · 1 line
2.12.2
#1 lore raw

Merged,
thanks.

Quoted 71 lines · Xose Vazquez Perez
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/propsel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
libmultipath/propsel.c +1 -1
index dd10ceb..5f70d86 100644
@@ -162,7 +162,7 @@ int select_pgpolicy(struct config *conf, struct
 multipath * mp)
 
        if (conf->pgpolicy_flag > 0) {
                mp->pgpolicy = conf->pgpolicy_flag;
-               origin = "(cmd line flag)";
+               origin = "(setting: multipath command line [-p] flag)";
                goto out;
        }
        mp_set_mpe(pgpolicy);
libmultipath/propsel.c +3 -3
@@ -251,18 +251,18 @@ int select_alias(struct config *conf, struct
 multipath * mp)
                                mp->alias_old, mp->alias_prefix,
                                conf->bindings_read_only);
                memset (mp->alias_old, 0, WWID_SIZE);
-               origin = "(using existing alias)";
+               origin = "(setting: using existing alias)";
        }
 
        if (mp->alias == NULL) {
                mp->alias = get_user_friendly_alias(mp->wwid,
                                conf->bindings_file, mp->alias_prefix,
 conf->bindings_read_only);
-               origin = "(user_friendly_name)";
+               origin = "(setting: user_friendly_name)";
        }
 out:
        if (mp->alias == NULL) {
                mp->alias = STRDUP(mp->wwid);
-               origin = "(default to wwid)";
+               origin = "(setting: default to WWID)";
        }
        if (mp->alias)
                condlog(3, "%s: alias = %s %s", mp->wwid, mp->alias,

origin);

libmultipath/propsel.c +1 -1
@@ -565,7 +565,7 @@ int select_retain_hwhandler(struct config *conf,
 struct multipath *mp)
 
        if (!VERSION_GE(conf->version, minv_dm_retain)) {
                mp->retain_hwhandler = RETAIN_HWHANDLER_OFF;
-               origin = "(requires kernel version >= 1.5.0)";
+               origin = "(setting: WARNING, requires kernel version >=
 1.5.0)";
                goto out;
        }
        mp_set_ovr(retain_hwhandler);
libmultipath/propsel.c +1 -1
@@ -614,7 +614,7 @@ int select_deferred_remove(struct config *conf, struct
 multipath *mp)
 
 #ifndef LIBDM_API_DEFERRED
        mp->deferred_remove = DEFERRED_REMOVE_OFF;
-       origin = "(not compiled with support)";
+       origin = "(setting: WARNING, not compiled with support)";
        goto out;
 #endif
        if (mp->deferred_remove == DEFERRED_REMOVE_IN_PROGRESS) {

--
2.12.2

#2 lore raw
Quoted 1 line · Christophe Varoqui

Merged,

No, it's missing.

Quoted 66 lines · On Sat, Apr 8, 2017 at 3:30 PM, Xose Vazquez Perez <[email protected]…
    Cc: Christophe Varoqui <[email protected] <mailto:[email protected]>>
    Cc: device-mapper development <[email protected] <mailto:[email protected]>>
    Signed-off-by: Xose Vazquez Perez <[email protected] <mailto:[email protected]>>
    ---
     libmultipath/propsel.c | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)

    diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
    index dd10ceb..5f70d86 100644
    --- a/libmultipath/propsel.c
    +++ b/libmultipath/propsel.c
    @@ -162,7 +162,7 @@ int select_pgpolicy(struct config *conf, struct multipath * mp)

            if (conf->pgpolicy_flag > 0) {
                    mp->pgpolicy = conf->pgpolicy_flag;
    -               origin = "(cmd line flag)";
    +               origin = "(setting: multipath command line [-p] flag)";
                    goto out;
            }
            mp_set_mpe(pgpolicy);
    @@ -251,18 +251,18 @@ int select_alias(struct config *conf, struct multipath * mp)
                                    mp->alias_old, mp->alias_prefix,
                                    conf->bindings_read_only);
                    memset (mp->alias_old, 0, WWID_SIZE);
    -               origin = "(using existing alias)";
    +               origin = "(setting: using existing alias)";
            }

            if (mp->alias == NULL) {
                    mp->alias = get_user_friendly_alias(mp->wwid,
                                    conf->bindings_file, mp->alias_prefix, conf->bindings_read_only);
    -               origin = "(user_friendly_name)";
    +               origin = "(setting: user_friendly_name)";
            }
     out:
            if (mp->alias == NULL) {
                    mp->alias = STRDUP(mp->wwid);
    -               origin = "(default to wwid)";
    +               origin = "(setting: default to WWID)";
            }
            if (mp->alias)
                    condlog(3, "%s: alias = %s %s", mp->wwid, mp->alias, origin);
    @@ -565,7 +565,7 @@ int select_retain_hwhandler(struct config *conf, struct multipath *mp)

            if (!VERSION_GE(conf->version, minv_dm_retain)) {
                    mp->retain_hwhandler = RETAIN_HWHANDLER_OFF;
    -               origin = "(requires kernel version >= 1.5.0)";
    +               origin = "(setting: WARNING, requires kernel version >= 1.5.0)";
                    goto out;
            }
            mp_set_ovr(retain_hwhandler);
    @@ -614,7 +614,7 @@ int select_deferred_remove(struct config *conf, struct multipath *mp)

     #ifndef LIBDM_API_DEFERRED
            mp->deferred_remove = DEFERRED_REMOVE_OFF;
    -       origin = "(not compiled with support)";
    +       origin = "(setting: WARNING, not compiled with support)";
            goto out;
     #endif
            if (mp->deferred_remove == DEFERRED_REMOVE_IN_PROGRESS) {
    --
    2.12.2
#3 lore raw

Right,
pushed now.

Thanks,
Christophe.

Quoted 86 lines · Xose Vazquez Perez
Quoted 1 line · Christophe Varoqui

Merged,

No, it's missing.

Quoted 1 line

On Sat, Apr 8, 2017 at 3:30 PM, Xose Vazquez Perez <

Quoted 2 lines · [email protected] <mailto:[email protected]>> wrote:
Cc Christophe Varoqui <[email protected] <mailto:

[email protected]>>

Quoted 1 line
Cc device-mapper development <[email protected] <mailto:

[email protected]>>

Quoted 1 line

[email protected]>>

Quoted 9 lines
    ---
     libmultipath/propsel.c | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)

    diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
    index dd10ceb..5f70d86 100644
    --- a/libmultipath/propsel.c
    +++ b/libmultipath/propsel.c
    @@ -162,7 +162,7 @@ int select_pgpolicy(struct config *conf, struct

multipath * mp)

Quoted 5 lines

if (conf->pgpolicy_flag > 0) {
mp->pgpolicy = conf->pgpolicy_flag;
- origin = "(cmd line flag)";
+ origin = "(setting: multipath command line [-p]

flag)";

Quoted 4 lines
                    goto out;
            }
            mp_set_mpe(pgpolicy);
    @@ -251,18 +251,18 @@ int select_alias(struct config *conf, struct

multipath * mp)

Quoted 10 lines
                                    mp->alias_old, mp->alias_prefix,
                                    conf->bindings_read_only);
                    memset (mp->alias_old, 0, WWID_SIZE);
    -               origin = "(using existing alias)";
    +               origin = "(setting: using existing alias)";
            }

            if (mp->alias == NULL) {
                    mp->alias = get_user_friendly_alias(mp->wwid,
                                    conf->bindings_file,

mp->alias_prefix, conf->bindings_read_only);

Quoted 11 lines
    -               origin = "(user_friendly_name)";
    +               origin = "(setting: user_friendly_name)";
            }
     out:
            if (mp->alias == NULL) {
                    mp->alias = STRDUP(mp->wwid);
    -               origin = "(default to wwid)";
    +               origin = "(setting: default to WWID)";
            }
            if (mp->alias)
                    condlog(3, "%s: alias = %s %s", mp->wwid, mp->alias,

origin);

Quoted 1 line
    @@ -565,7 +565,7 @@ int select_retain_hwhandler(struct config *conf,

struct multipath *mp)

Quoted 10 lines

if (!VERSION_GE(conf->version, minv_dm_retain)) {
mp->retain_hwhandler = RETAIN_HWHANDLER_OFF;
- origin = "(requires kernel version >= 1.5.0)";
+ origin = "(setting: WARNING, requires kernel version

= 1.5.0)";
                    goto out;
            }
            mp_set_ovr(retain_hwhandler);
    @@ -614,7 +614,7 @@ int select_deferred_remove(struct config *conf,

struct multipath *mp)

Quoted 12 lines
     #ifndef LIBDM_API_DEFERRED
            mp->deferred_remove = DEFERRED_REMOVE_OFF;
    -       origin = "(not compiled with support)";
    +       origin = "(setting: WARNING, not compiled with support)";
            goto out;
     #endif
            if (mp->deferred_remove == DEFERRED_REMOVE_IN_PROGRESS) {
    --
    2.12.2