On Tue, 2008-11-04 at 09:52 +0900, [EMAIL PROTECTED] wrote:
> 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.
>
> [EMAIL PROTECTED] ~]# 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?
No, my mistake:-)
Fixed:
http://hg.clusterlabs.org/pacemaker/pygui/rev/a087be359e3f
Regards,
--
Yan Gao
China R&D Software Engineer
[EMAIL PROTECTED]
Novell, Inc.
SUSEĀ® Linux Enterprise 10
Your Linux is ready
http://www.novell.com/linux
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker