You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support to run ceph commands from must-gather pod
This commit adds support to run ceph-commands from must-gather pod which removes the dependency of toolbox pod from must-gather.
Signed-off-by: Ashish Ranjan <[email protected]>
secretName=`oc get secrets -n $namespace$CEPH_MON_SECRET_NAME -o jsonpath="{.metadata.name}"`
22
+
if [ -z${secretName} ];then
23
+
echo 1
24
+
fi
25
+
adminKey=`oc get secrets -n $namespace$CEPH_MON_SECRET_NAME -o jsonpath="{.data.admin-secret}"| base64 --decode`
26
+
configMapName=`oc get configmap -n $namespace$CEPH_MON_CONFIGMAP_NAME -o jsonpath="{.metadata.name}"`
27
+
if [ -z${configMapName} ];then
28
+
echo 1
29
+
fi
30
+
monEndPoints=`oc get configmap -n $namespace$CEPH_MON_CONFIGMAP_NAME -o jsonpath="{.data.data}"`
31
+
monEndPoints=`echo ${monEndPoints}| sed "s/[a-z]\+=//g"| sed "s/rook-ceph-mon[0-9]\+=//g"`
32
+
33
+
# creating admin keyring
34
+
cat ${CEPH_KEYRING_TEMPLATE}| sed "s/REPLACE_WITH_KEYRING/${adminKey}/g">${KEYRING_FILE}
35
+
cat ${CEPH_CONFIG_TEMPLATE}| sed "s/REPLACE_WITH_MON_ENDPOINTS/${monEndPoints}/g"| sed "s/REPLACE_WITH_KEYRING_PATH/${KEYRING_FILE//\//\\/}/g">${CEPH_CONFIG_FILE}
36
+
37
+
echo 0
38
+
}
11
39
12
40
# Ceph resources
13
41
ceph_resources=()
@@ -50,29 +78,30 @@ done
50
78
# Inspecting the namespace where ceph-cluster is installed
51
79
fornsin$(oc get cephcluster --all-namespaces --no-headers | awk '{print $1}');do
0 commit comments