wiki:FenceTiming
Last modified 3 years ago Last modified on 05/23/11 15:30:31

Timeout options for fencing agents

Fence agents (based on fencing library) offers several options that can change timing inside fencing agent. Changing the default values should be used carefully because they can easily broke fencing.

shell-timeout

After issuing command to fencing agent wait at most X seconds for next command prompt. If we obtain the prompt earlier then we don't have to wait, so increasing shell-timeout (default 2 seconds) won't make your fence agent slower.

login-timeout

Ordinary commands uses shell-timeout but login is an operation that can took longer. Login-timeout (default 20 seconds) wait at most X seconds forfirstcommand prompt. Increasing this timeout won't make your fence agents slower.

power-timeout and power-wait

Changing power status on fencing device is time-consuming operation. We found two types of fencing agents:

  1. command prompt after power status is changed
  2. command prompt immediately - power status will be changed later

Timeout is common for 1) a 2) as we do not differenciate between them. This timeout is used for checking if status (on given plug/port/vm) is set to new value (e.g. power ON -> check for ON status). Because some devices do not work correctly if we don't give it some time to rest there is also power-wait=Y. Timing schedule is best shown on code itself:

    power off fencing device
    sleep (power-wait)
    for 1 .. power-timeout:

        break if status is equal to OFF
        sleep (1 second)

Most of the fence agents to do need power-wait at all (default 0 seconds).

@todo: understandable --help

   --power-timeout <seconds>      Test X seconds for status change after ON/OFF
   --shell-timeout <seconds>      Wait X seconds for cmd prompt after issuing command
   --login-timeout <seconds>      Wait X seconds for cmd prompt after login
   --power-wait <seconds>         Wait X seconds after issuing ON/OFF