File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,12 @@ if [ "${INSTALL_AZUREFILE_PROXY}" = "true" ];then
6868 fi
6969 if [ " $updateAzurefileProxy " = " true" ]; then
7070 echo " copy azurefile-proxy...."
71+ # if it reports "Read-only file system" error here, return as success
72+ if ! cp /azurefile-proxy/azurefile-proxy /host/usr/bin/azurefile-proxy --force; then
73+ echo " Warning: failed to copy azurefile-proxy, possibly due to read-only file system, continue..."
74+ exit 0
75+ fi
7176 rm -rf /host/" $KUBELET_PATH " /plugins/file.csi.azure.com/azurefile-proxy.sock
72- cp /azurefile-proxy/azurefile-proxy /host/usr/bin/azurefile-proxy --force
7377 chmod 755 /host/usr/bin/azurefile-proxy
7478 fi
7579
@@ -85,7 +89,12 @@ if [ "${INSTALL_AZUREFILE_PROXY}" = "true" ];then
8589 if [ " $updateService " = " true" ]; then
8690 echo " copy azurefile-proxy.service...."
8791 mkdir -p /host/usr/lib/systemd/system
88- cp /azurefile-proxy/azurefile-proxy.service /host/usr/lib/systemd/system/azurefile-proxy.service
92+
93+ # if it reports "Read-only file system" error here, return as success
94+ if ! cp /azurefile-proxy/azurefile-proxy.service /host/usr/lib/systemd/system/azurefile-proxy.service; then
95+ echo " Warning: failed to copy azurefile-proxy.service, possibly due to read-only file system, continue..."
96+ exit 0
97+ fi
8998 fi
9099
91100 $HOST_CMD systemctl daemon-reload
You can’t perform that action at this time.
0 commit comments