Skip to contentSkip to conversation

clvmd always sets debug level to DEBUG_SYSLOG

PATCH Robert Milasan 2 participants 3 messages Oct 19, 2012

lore
Share & tools
lore
#0 lore raw

Hello,
just realized now that in clvmd.c debugging level is set wrong due to using the wrong variable in clvmd_set_debug.

If a user run clvmd -d0, usually this means no debugging or DEBUG_OFF, but 0 argument is saved in debug_arg and debugging level is set using debug_opt in clvmd_set_debug:

# cat clvmd.c |grep clvmd_set_debug
        clvmd_set_debug(debug_opt);

and it suppose to be: clvmd_set_debug(debug_arg)

Here is the patch:

daemons/clvmd/clvmd.c +1 -1
Index: LVM2.2.02.84/daemons/clvmd/clvmd.c
===================================================================
@@ -428,7 +428,7 @@ int main(int argc, char *argv[])
        if (debug_opt && !check_local_clvmd())
                return debug_clvmd(debug_arg, clusterwide_opt)==1?0:1;
 
-       clvmd_set_debug(debug_opt);
+       clvmd_set_debug(debug_arg);
 
        /* Fork into the background (unless requested not to) */
        if (!foreground_mode)

Cheers!

Signature · 6 lines
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A
#1 lore raw

Dne 19.10.2012 14:33, Robert Milasan napsal(a):

Quoted 8 lines

Hello,
just realized now that in clvmd.c debugging level is set wrong due to using the wrong variable in clvmd_set_debug.

If a user run clvmd -d0, usually this means no debugging or DEBUG_OFF, but 0 argument is saved in debug_arg and debugging level is set using debug_opt in clvmd_set_debug:

Quoted 7 lines
# cat clvmd.c |grep clvmd_set_debug
         clvmd_set_debug(debug_opt);

and it suppose to be: clvmd_set_debug(debug_arg)

Here is the patch:

Thanks for noticing, the patch (in a bit updated version) pushed upstream.
(https://www.redhat.com/archives/lvm-devel/2012-October/msg00166.html)

Zdenek

#2 lore raw
Quoted 5 lines · On Fri, 19 Oct 2012 15:39:52 +0200 "Zdenek Kabelac" <[email protected]> wrote:

Thanks for noticing, the patch (in a bit updated version) pushed upstream.
(https://www.redhat.com/archives/lvm-devel/2012-October/msg00166.html)

Quoted 7 lines

Zdenek

--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

Yes I know, didn't wanna do this again for a newer version of LVM, the idea is more important.

Signature · 6 lines
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A