[ClusterLabs] Antw: Where is the syntax for parameter types?

Xin Liang XLiang at suse.com
Thu Oct 17 02:48:03 EDT 2019


Hi Ulrich,

Please try this:
crm configure validate-all <rsc>

Thanks!


On 10/16/19 5:50 PM,  Ulrich Windl  wrote:
>>>> Ulrich Windl schrieb am 16.10.2019 um 10:53 in Nachricht <5DA6DA93.232 : 161 :
> 60728>:
>> Hi!
>>
>> I just discovered an interesting problem with my own RA that allows a 
>> boolean parameter:
>> Where is the exact syntax for "boolean" defined, and who's responsible for 
>> checking it? The RA or (e.g.) crm?
> 
> Inspecting my RA, I realized that my "validate-all" DOES check the value, so it seems crm's validate does not call the RA's validate. Part of my code is:
> 
>     if [ "X${logrotate//[^01]/}" != "X${logrotate}" ]; then
>         ocf_exit_reason "$me: invalid value $logrotate for \"logrotate\""
>         result=$OCF_ERR_CONFIGURED
>     fi
> 
> [...]
> 
> My test script outputs (I added a new test with an invalid Boolean):
> ...
> ocf/tester: Using parameter file ocf/isredir-test3.params
> ocf-exit-reason:validate: invalid value true for "logrotate"
> ocf/tester: Exit status of validate-all is 6
> ocf/tester: Parameter file ocf/isredir-test3.params done
> ...
> ocf/tester: Using parameter file ocf/isredir-test3.params
> Beginning tests for ocf/isredir...
> * rc=6: Validation failed.  Did you supply enough options with -o ?
> ocf-exit-reason:validate: invalid value true for "logrotate"
> Aborting tests
> ocf/tester: Exit status is 1
> ocf/tester: Parameter file ocf/isredir-test3.params done
> 
> 
> Regards,
> Ulrich
> 
> 
> 
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
> 
> ClusterLabs home: https://www.clusterlabs.org/
> 

-- 
Xin Liang
HA team, Beijing
https://github.com/liangxin1300
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pEpkey.asc
Type: application/pgp-keys
Size: 1775 bytes
Desc: pEpkey.asc
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20191017/af81c391/attachment.bin>


More information about the Users mailing list