[Pacemaker] Failure of the resource migration from GUI

renayama19661014 at ybb.ne.jp renayama19661014 at ybb.ne.jp
Tue Nov 4 00:52:54 UTC 2008


Hi Yan,

I referred to your patch. 
I gave the following patch.

----------------------- patch ------------------------------------------------------------
+       mgmt_log(LOG_INFO, "yamauchi ----- migrate_cmd0:%s",argv[3]);
        if (STRNCMP_CONST(argv[3], "True") == 0){
                strncat(cmd, " -f", sizeof(cmd)-strlen(cmd)-1);
                mgmt_log(LOG_INFO, "yamauchi ----- migrate_cmd1:%s",argv[3]);
        }
+       mgmt_log(LOG_INFO, "yamauchi ----- migrate_cmd2:%s",cmd);

        if (STRNCMP_CONST(argv[4], "") != 0){
                if (regex_match(duration_regex, argv[4])) {
                        strncat(cmd, " -u \"", sizeof(cmd)-strlen(cmd)-1);
                        strncat(cmd, argv[4], sizeof(cmd)-strlen(cmd)-1);
                        strncat(cmd, "\"", sizeof(cmd)-strlen(cmd)-1);
                }
                else {
                        mgmt_log(LOG_ERR, "invalid duration specified: \"%s\"", argv[1]);
                        return strdup(MSG_FAIL"\nInvalid duration.\nPlease refer to "
                                        "http://en.wikipedia.org/wiki/ISO_8601#Duration for examples
of valid durations");
                }
        }

        strncat(cmd, " 2>&1", sizeof(cmd)-strlen(cmd)-1);
+       mgmt_log(LOG_INFO, "yamauchi ----- migrate_cmd3:%s",cmd);
------------------------------------------------------------------------------------

And the log when I chose True and False by operation to migrate was the following thing.

[root at ais-1 ~]# tail -f /var/log/messages | grep yamauchi
Nov  4 09:39:33 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd0:\True
Nov  4 09:39:33 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd2:crm_resource -M -r group -H
ais-2
Nov  4 09:39:33 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd3:crm_resource -M -r group -H
ais-2 2>&1
Nov  4 09:39:53 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd0:\False
Nov  4 09:39:53 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd2:crm_resource -M -r group -H
ais-1
Nov  4 09:39:53 ais-1 mgmtd: [12837]: info: yamauchi ----- migrate_cmd3:crm_resource -M -r group -H
ais-1 2>&1

After all backslash seems to be in the top.

Possibly will not there be a problem at the time of the transfer of the parameter with the daemon?

Best Regards,
Hideo Yamauchi.

--- Yan Gao <ygao at novell.com> wrote:

> On Fri, 2008-10-31 at 20:17 +0900, HIDEO YAMAUCHI wrote:
> > Hi Yan,
> > 
> > It confirmed it with the machine with a little different environment.
> > (CentOS5.2 on VirtualMachin, Python 2.4.3)
> > 
> > > +		print migrate
> > Result :
> > 	{'duration': '', 'force': 'True', 'to_node': 'cent51-vm2', 'rsc':
> > 'primitive'}
> > 
> Strange, nothing is wrong. So could you pls add the following line in
> mgmt_crm.c, you get "\\True" or "True" 鏤・n the log?
> 
> mgmt/daemon/mgmt_crm.c
> @@ -1124,6 +1124,7 @@
>  		}
>  	}
>  
> +	mgmt_log(LOG_WARNING, "migrate argument 3: %s", argv[3]);
>  	if (STRNCMP_CONST(argv[3], "True") == 0){
>  		strncat(cmd, " -f", sizeof(cmd)-strlen(cmd)-1);
>  	}
> 
> > And, crm_resource that goes out to the log is the following.
> > 
> > Oct 31 20:14:22 cent51-vm1 crm_resource: [15882]: info: Invoked:
> > crm_resource -M -r primitive -H cent51-vm2
> > Oct 31 20:14:22 cent51-vm1 crm_resource: [15882]: notice:
> > unpack_config: On
> > loss of CCM Quorum: Ignore
> > 
> > Is the influence of the difference between my environment and your
> > environment?
> > 
> 
> Regards,
> -- 
> Yan Gao
> China R&D Software Engineer
> ygao at novell.com
> 
> Novell, Inc.
> SUSE速 Linux Enterprise 10
> Your Linux is ready
> http://www.novell.com/linux
> 
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at clusterlabs.org
> http://list.clusterlabs.org/mailman/listinfo/pacemaker
> 





More information about the Pacemaker mailing list