Skip to content

Commit 4b0cc0b

Browse files
committed
Add delay on checking BAD_OR_MISSING_NODE_SELECTOR_COUNT or service certs
The script might make some troubles for OpenShift API to reply when there is no delay on repeating command. Also add few seconds delay on checking service certs. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
1 parent 1ec2176 commit 4b0cc0b

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

tests/kuttl/common/osp_check_noapi_service_certs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ done
5656

5757
# Gather the ClusterIP and ports for databases
5858
for database in "${!database_secrets[@]}"; do
59+
sleep 5
5960
secret="${database_secrets[$database]}"
6061

6162
database_info=$(oc get service "$database" -n "$NAMESPACE" -o jsonpath="{.spec.clusterIP} {.spec.ports[*].port}")
@@ -73,6 +74,7 @@ for database in "${!database_secrets[@]}"; do
7374

7475
for port in $ports; do
7576
echo "Connecting to $database on port $port..."
77+
sleep 5
7678

7779
pod_cert=$(oc rsh -n "$NAMESPACE" openstackclient openssl s_client -starttls mysql -connect "$cluster_ip:$port" </dev/null 2>/dev/null | sed -ne '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p')
7880

tests/kuttl/tests/ctlplane-nodeselectors/02-assert-nodeselector.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ commands:
1010
echo "Found $BAD_OR_MISSING_NODE_SELECTOR_COUNT pods with bad or missing nodeselector:"
1111
echo "$BAD_OR_MISSING_NODE_SELECTOR"
1212
exit 1
13+
else
14+
sleep 5
1315
fi
1416
- script: |
1517
echo "Checking all cronjobs have expected nodeselector"
@@ -20,4 +22,6 @@ commands:
2022
echo "Found $BAD_OR_MISSING_NODE_SELECTOR_COUNT cronjobs with bad or missing nodeselector:"
2123
echo "$BAD_OR_MISSING_NODE_SELECTOR"
2224
exit 1
25+
else
26+
sleep 5
2327
fi

tests/kuttl/tests/ctlplane-nodeselectors/04-assert-nodeselector.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ commands:
1010
echo "Found $BAD_OR_MISSING_NODE_SELECTOR_COUNT pods with bad or missing nodeselector:"
1111
echo "$BAD_OR_MISSING_NODE_SELECTOR"
1212
exit 1
13+
else
14+
sleep 5
1315
fi
1416
- script: |
1517
echo "Checking all cronjobs have expected nodeselector"
@@ -20,4 +22,6 @@ commands:
2022
echo "Found $BAD_OR_MISSING_NODE_SELECTOR_COUNT cronjobs with bad or missing nodeselector:"
2123
echo "$BAD_OR_MISSING_NODE_SELECTOR"
2224
exit 1
25+
else
26+
sleep 5
2327
fi

0 commit comments

Comments
 (0)