Skip to content

Commit

Permalink
config-sriov.sh: reduce wait time for operator readiness (kubevirt#469)
Browse files Browse the repository at this point in the history
Reduce the time we wait for taint presence and absence
during sriov-network-operator deployment.

Signed-off-by: Or Mergi <[email protected]>
  • Loading branch information
ormergi authored Nov 10, 2020
1 parent 8e0ce51 commit 73a1177
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cluster-up/cluster/kind-k8s-sriov-1.17.0/config_sriov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,29 +115,29 @@ function is_taint_absence {
function wait_for_taint_absence {
local -r taint=$1

local -r tries=60
local -r tries=24
local -r wait_time=5

local -r wait_message="Waiting for $taint taint absence"
local -r error_message="Taint $taint $name did not removed"
local -r wait_message="Waiting for taint '$taint' absence"
local -r error_message="Taint $taint did not removed"
local -r action="is_taint_absence $taint"

retry "$tries" "$wait_time" "$action" "$wait_message" && return 0
echo $error_message && return 1
echo "$error_message" && return 1
}

function wait_for_taint {
local -r taint=$1

local -r tries=60
local -r tries=24
local -r wait_time=5

local -r wait_message="Waiting for $taint taint to present"
local -r error_message="Taint $taint $name did not present"
local -r wait_message="Waiting for taint '$taint' to present"
local -r error_message="Taint '$taint' did not present"
local -r action="_kubectl get nodes -o custom-columns=taints:.spec.taints[*].effect --no-headers | grep -i $taint"

retry "$tries" "$wait_time" "$action" "$wait_message" && return 0
echo $error_message && return 1
echo "$error_message" && return 1
}

# not using kubectl wait since with the sriov operator the pods get restarted a couple of times and this is
Expand Down

0 comments on commit 73a1177

Please sign in to comment.