Skip to content

Commit 9645864

Browse files
committed
test: Enable k8s access test + tempest
1 parent 747cb58 commit 9645864

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

hack/run-tempest-tests.sh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
# This script will run the full functional tests for a given `KUBE_TAG`. It
18-
# will download the image, create a cluster, wait for it to hit `CREATE_COMPLETE`
19-
# and then run `sonobuoy` against it.
20-
2117
source /opt/stack/openrc admin admin
2218

2319
OS_DISTRO=${OS_DISTRO:-ubuntu}
@@ -169,6 +165,25 @@ if [[ ${UPGRADE_KUBE_TAG} != ${KUBE_TAG} ]]; then
169165
fi
170166
done
171167

168+
# Wait for kubernetes accessible and Ready.
169+
for i in {1..10}; do
170+
# Get the cluster configuration file
171+
eval $(openstack coe cluster config k8s-cluster)
172+
Node=$(kubectl get node -o wide)
173+
if [[ ${Node} == *"NotReady"* ]]; then
174+
echo "Kubernetes accessible with Not Ready node."
175+
echo "Node status: ${Node}"
176+
sleep 5
177+
elif [[ ${Node} == *"Ready"* ]]; then
178+
echo "Kubernetes accessible with Ready node."
179+
break
180+
else
181+
echo "Currtny retry count: $i"
182+
echo "Node status: ${Node}"
183+
sleep 5
184+
fi
185+
done
186+
172187
# Upgrade cluster
173188
openstack coe cluster upgrade k8s-cluster-upgrade k8s-${UPGRADE_KUBE_TAG}
174189
# Wait for cluster to be "UPDATE_COMPLETE".

0 commit comments

Comments
 (0)