From 119610c13a2fc464df5ac943e70b3f7c88108ece Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 11 Mar 2026 11:51:52 +0100 Subject: [PATCH 1/2] add waits --- .../hdfs/examples/getting_started/getting_started.sh | 9 +++++++-- .../hdfs/examples/getting_started/getting_started.sh.j2 | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh b/docs/modules/hdfs/examples/getting_started/getting_started.sh index 5d530e27..f28566fb 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh @@ -15,6 +15,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -45,6 +48,10 @@ exit 1 ;; esac +# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay +# to allow the CRDs to be detected +sleep 10 + echo "Creating Zookeeper cluster" # tag::install-zk[] kubectl apply -f zk.yaml @@ -55,8 +62,6 @@ echo "Creating ZNode" kubectl apply -f znode.yaml # end::install-zk[] - - for (( i=1; i<=15; i++ )) do echo "Waiting for ZookeeperCluster to appear ..." diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 index fe83e8d8..722d15c6 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 @@ -15,6 +15,9 @@ then exit 1 fi +echo "Waiting for node(s) to be ready..." +kubectl wait node --all --for=condition=Ready --timeout=120s + cd "$(dirname "$0")" case "$1" in @@ -45,6 +48,10 @@ exit 1 ;; esac +# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay +# to allow the CRDs to be detected +sleep 10 + echo "Creating Zookeeper cluster" # tag::install-zk[] kubectl apply -f zk.yaml @@ -55,8 +62,6 @@ echo "Creating ZNode" kubectl apply -f znode.yaml # end::install-zk[] - - for (( i=1; i<=15; i++ )) do echo "Waiting for ZookeeperCluster to appear ..." From 377a4ed92ed126e7459a56d1d8ab5de49c7d97b3 Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Wed, 11 Mar 2026 13:07:29 +0100 Subject: [PATCH 2/2] improved wait condition --- .../modules/hdfs/examples/getting_started/getting_started.sh | 5 ++--- .../hdfs/examples/getting_started/getting_started.sh.j2 | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh b/docs/modules/hdfs/examples/getting_started/getting_started.sh index f28566fb..0f7b8689 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh @@ -48,9 +48,8 @@ exit 1 ;; esac -# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay -# to allow the CRDs to be detected -sleep 10 +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done echo "Creating Zookeeper cluster" # tag::install-zk[] diff --git a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 index 722d15c6..73abfd5c 100755 --- a/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 +++ b/docs/modules/hdfs/examples/getting_started/getting_started.sh.j2 @@ -48,9 +48,8 @@ exit 1 ;; esac -# As of SDP 26.3 CRDs are managed by the operator not helm, so there should be an initial delay -# to allow the CRDs to be detected -sleep 10 +# TODO: Remove once https://github.com/stackabletech/issues/issues/828 has been implemented (see that issue for details). +until kubectl get crd hdfsclusters.hdfs.stackable.tech >/dev/null 2>&1; do echo "Waiting for CRDs to be installed" && sleep 1; done echo "Creating Zookeeper cluster" # tag::install-zk[]