Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-44719

Boundary values in pcs status wait [rhel-10]

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.0
    • rhel-9.5, rhel-10.0.beta
    • pcs
    • None
    • None
    • Low
    • sst_high_availability
    • ssg_filesystems_storage_and_HA
    • 13
    • 23
    • 2
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • None
    • None
    • Release Note Not Required
    • x86_64
    • None

      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
      

            rh-ee-promanci Peter Romancik
            mmazoure Michal Mazourek
            Peter Romancik Peter Romancik
            Michal Mazourek Michal Mazourek
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: