-
Bug
-
Resolution: Done
-
Normal
-
rhos-18.0.z
-
None
-
1
-
False
-
-
False
-
?
-
rhos-ops-day1day2-upgrades
-
None
-
-
-
-
RHOS Upgrades 2025 Sprint 17
-
1
-
Moderate
4.1.1
[kni@prodospd-basition ~]$ unset PULL_OPENSTACK_CONFIGURATION_DATABASES declare -xA PULL_OPENSTACK_CONFIGURATION_DATABASES for CELL in $(echo $CELLS); do PULL_OPENSTACK_CONFIGURATION_DATABASES[$CELL]=$(oc run mariadb-client-1-$CELL ${MARIADB_RUN_OVERRIDES} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ mysql -rsh "${SOURCE_MARIADB_IP[$CELL]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" -e 'SHOW databases;') done error: Invalid JSON Patch
I suspect it might be an issue with the format of
${MARIADB_RUN_OVERRIDES}
Created by
$ MARIADB_RUN_OVERRIDES="--overrides=${RUN_OVERRIDES} $MARIADB_CLIENT_ANNOTATIONS"
in the previous step
echo $MARIADB_RUN_OVERRIDES
--overrides={ "apiVersion": "v1", "metadata": { "annotations": { "k8s.v1.cni.cncf.io/networks": "[{\"name\": \"internalapi-static\",\"namespace\": \"openstack\", \"ips\":[\"172.17.0.99/24\"]}]" } }, "spec": { "node
Name": "prodospd-worker-1.internal.tme.redhat.com", "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": ["ALL"] }, "runAsNonRoot": true, "seccompProfile": { "type": "RuntimeDefault" }
} } }
[kni@prodospd-basition
If I expand the variables manually and enclose the override in single quotes, then run the command it works
[kni@prodospd-basition ~]$ oc run mariadb-client-1-$CELL --overrides='{ "apiVersion": "v1", "metadata": { "annotations": { "k8s.v1.cni.cncf.io/networks": "[{\"name\": \"internalapi-static\",\"namespace\": \"opensta
ck\", \"ips\":[\"172.17.0.99/24\"]}]" } }, "spec": { "nodeName": "prodospd-worker-1.internal.tme.redhat.com", "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": ["ALL"] }, "runAsNonRo
ot": true, "seccompProfile": { "type": "RuntimeDefault" } } } }' --image ${MARIADB_IMAGE} -i --restart=Never -- mysql -rsh "${SOURCE_MARIADB_IP[$CELL]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" -e 'SH
OW databases;'
cinder
glance
heat
information_schema
keystone
mysql
nova
nova_api
nova_cell0
ovs_neutron
performance_schema
placement
Without the single quotes I get the same error
oc run mariadb-client-1-$CELL --overrides={ "apiVersion": "v1", "metadata": { "annotations": { "k8s.v1.cni.cncf.io/networks": "[{\"name\": \"internalapi-static\",\"namespace\": \"openstac
k\", \"ips\":[\"172.17.0.99/24\"]}]" } }, "spec": { "nodeName": "prodospd-worker-1.internal.tme.redhat.com", "securityContext": { "allowPrivilegeEscalation": false, "capabilities": { "drop": ["ALL"] }, "runAsNonRoo
t": true, "seccompProfile": { "type": "RuntimeDefault" } } } } --image ${MARIADB_IMAGE} -i --restart=Never -- mysql -rsh "${SOURCE_MARIADB_IP[$CELL]}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD[$CELL]}" -e 'SHOW
databases;'
error: Invalid JSON Patch