external: fix quote parsing and message in import-external-cluster.sh

Fixed a syntax error caused by incorrect quotation parsing in the importClusterID function of import-external-cluster.sh, and updated the output message shown while waiting for the SubVolumeGroup CR to be created.

Signed-off-by: GanghyeonSeo <sgh000109@gmail.com>
(cherry picked from commit f9acdab146)
This commit is contained in:
GanghyeonSeo authored and Mergify committed 2025-11-11 20:02:42 +00:00
1 parent f9f1130896
commit 6ecc75285d
1 file changed
+2 -2
+2 -2
View File
@@ -125,13 +125,13 @@ eof
function importClusterID() {
if [ -n "$RADOS_NAMESPACE" ]; then
createRadosNamespaceCR
timeout 20 sh -c "until [ $($KUBECTL -n "$NAMESPACE" get CephBlockPoolRadosNamespace/"$RADOS_NAMESPACE" -o jsonpath='{.status.phase}' | grep -c "Ready") -eq 1 ]; do echo "waiting for radosNamespace to get created" && sleep 1; done"
timeout 20 sh -c "until [ \$($KUBECTL -n \"$NAMESPACE\" get CephBlockPoolRadosNamespace/$RADOS_NAMESPACE -o jsonpath='{.status.phase}' | grep -c 'Ready') -eq 1 ]; do echo 'waiting for radosNamespace to get created' && sleep 1; done"
CLUSTER_ID_RBD=$($KUBECTL -n "$NAMESPACE" get cephblockpoolradosnamespace.ceph.rook.io/"$RADOS_NAMESPACE" -o jsonpath='{.status.info.clusterID}')
RBD_STORAGE_CLASS_NAME=ceph-rbd-$RADOS_NAMESPACE
fi
if [ -n "$SUBVOLUME_GROUP" ]; then
createSubvolumeGroupCR
timeout 20 sh -c "until [ $($KUBECTL -n "$NAMESPACE" get CephFilesystemSubVolumeGroup/"$SUBVOLUME_GROUP" -o jsonpath='{.status.phase}' | grep -c "Ready") -eq 1 ]; do echo "waiting for radosNamespace to get created" && sleep 1; done"
timeout 20 sh -c "until [ \$($KUBECTL -n \"$NAMESPACE\" get CephFilesystemSubVolumeGroup/$SUBVOLUME_GROUP -o jsonpath='{.status.phase}' | grep -c 'Ready') -eq 1 ]; do echo 'waiting for subVolumeGroup to get created' && sleep 1; done"
CLUSTER_ID_CEPHFS=$($KUBECTL -n "$NAMESPACE" get cephfilesystemsubvolumegroup.ceph.rook.io/"$SUBVOLUME_GROUP" -o jsonpath='{.status.info.clusterID}')
CEPHFS_STORAGE_CLASS_NAME=cephfs-$SUBVOLUME_GROUP
fi