Skip to content

Instantly share code, notes, and snippets.

@ramr
Created October 24, 2018 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramr/05fe97fe0e0d4a7929330dc178f33db0 to your computer and use it in GitHub Desktop.
Save ramr/05fe97fe0e0d4a7929330dc178f33db0 to your computer and use it in GitHub Desktop.
test for installer wait
$ oc delete $(oc get pods -n openshift-ingress -o name) -n openshift-ingress ; \
oc get pods -n openshift-ingress ; oc get all -n openshift-ingress; \
echo " - test with next command that should timeout"; \
time oc --request-timeout=10s rollout status "${ROUTER_DEPLOYMENT}" -n "${ROUTER_NAMESPACE}" -w; \
echo " - test with next command tht should finish ... "; \
oc get all -n openshift-ingress; \
time oc --request-timeout=2m rollout status "${ROUTER_DEPLOYMENT}" -n "${ROUTER_NAMESPACE}" -w
pod "router-default-72lqm" deleted
pod "router-default-jsr6f" deleted
pod "router-default-x6x9p" deleted
NAME READY STATUS RESTARTS AGE
router-default-7crpg 0/1 ContainerCreating 0 5s
router-default-hbp87 0/1 ContainerCreating 0 1s
router-default-kmhtf 0/1 Running 0 5s
NAME READY STATUS RESTARTS AGE
pod/router-default-7crpg 0/1 Running 0 13s
pod/router-default-hbp87 0/1 ContainerCreating 0 9s
pod/router-default-kmhtf 0/1 Running 0 13s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/router-default LoadBalancer 10.3.82.156 <pending> 80:30897/TCP 8m
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/router-default 3 3 0 3 0 node-role.kubernetes.io/worker= 8m
- test with next command that should timeout
Waiting for daemon set "router-default" rollout to finish: 1 of 3 updated pods are available...
Waiting for daemon set "router-default" rollout to finish: 2 of 3 updated pods are available...
E1024 14:48:50.131075 31258 streamwatcher.go:109] Unable to decode an event from the watch stream: net/http: request canceled (Client.Timeout exceeded while reading body)
error: watch closed before Until timeout
real 0m10.729s
user 0m0.203s
sys 0m0.054s
- test with next command tht should finish ...
NAME READY STATUS RESTARTS AGE
pod/router-default-7crpg 1/1 Running 0 35s
pod/router-default-hbp87 1/1 Running 0 31s
pod/router-default-kmhtf 1/1 Running 0 35s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/router-default LoadBalancer 10.3.82.156 <pending> 80:30897/TCP 9m
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/router-default 3 3 3 3 3 node-role.kubernetes.io/worker= 9m
daemon set "router-default" successfully rolled out
real 0m0.898s
user 0m0.172s
sys 0m0.047s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment