What were you trying to do that didn't work?
Specify corner-case values of timeout of command pcs status wait. Two cases can be adjusted:
- Zero timeout values
- Upper timeout boundary
This was found as a part of RHEL-25854 verification, for full verification see this comment.
Please provide the package NVR for which bug is seen:
pcs-0.11.7-3.el9
How reproducible:
always
Steps to reproduce
1. Specify behavior of zero timeout values (also in forms of 0s, 0m, 0h)
[root@virt-242 ~]# pcs status wait 0 Waiting for the cluster to apply configuration changes... [root@virt-242 ~]# pcs status wait 0s Waiting for the cluster to apply configuration changes... [root@virt-242 ~]# pcs status wait 0m Waiting for the cluster to apply configuration changes... [root@virt-242 ~]# pcs status wait 0hr Waiting for the cluster to apply configuration changes...
It seems that the behavior of the timeout with 0 is like no timeout is defined at all, command waits for actions to be completed
[root@virt-242 ~]# pcs cluster start && time pcs status wait 0s
Starting Cluster...
Waiting for the cluster to apply configuration changes...
real 0m37.288s
user 0m0.953s
sys 0m0.183s
This can be a bit unintuitive, especially if the unit (sec, min, hr) is specified.
Some of possible solutions:
- Specify in man/usage that when timeout 0 is entered, the command will wait default/infinite time (depends on which behavior is correct).
- Forbid to enter timeout 0
- Change the behavior of the command with timeout 0 to instantly produce timeout message if any pending action is present
2. Upper timeout boundary - the command will automatically produce error, if high timeout is entered. The boundary starts somewhere around 900000000s, the error is not present with 800000000s.
[root@virt-242 ~]# pcs status wait 900000000s
Waiting for the cluster to apply configuration changes (timeout: 900000000 seconds)...
Error: waiting timeout
crm_resource: Error performing operation: Timeout occurred
Pending actions:
[root@virt-242 ~]# echo $?
1
- is blocked by
-
RHEL-45869 Upper boundary of crm_resource --wait timeout
- Planning
- is related to
-
RHEL-67334 Upper boundary value in pcs status wait [rhel-10]
- Planning