Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 695 Bytes

waitfor.md

File metadata and controls

21 lines (16 loc) · 695 Bytes

Waiting for a condition

octl can wait for a specific condition. It will run repeatedly until the condition is met or a timeout is reached.

Conditions are jq queries executed on the octl call result. The query is expected to return a single result.

octl will loop if the query returns:

  • false or "false",
  • 0 or "0",
  • "" or a null value.

waitfor works on calls returning a single entry:

octl iaas vm describe i-foo --waitfor '.State=="running"'

or returning a list:

octl iaas vm list --waitfor 'length==6'

By default, waitfor runs the query every 10 seconds (configured by --interval) and timeouts at 10 minutes (configured by --waitfor-timeout).