Skip to content

Commit de7d76c

Browse files
committed
fix: upgrade to aznfs 3.0.10 during CSI driver init
--allow-downgrades
1 parent 30cca50 commit de7d76c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

pkg/azurefile-proxy/install-proxy.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,22 @@ fi
2727
if [ "${INSTALL_AZNFS_MOUNT}" = "true" ];then
2828
# install aznfs-mount on ubuntu
2929
if [ "$DISTRIBUTION" = "ubuntu" ];then
30-
AZNFS_VERSION="0.3.15"
31-
echo "install aznfs v$AZNFS_VERSION...."
30+
if [ -z "${AZNFS_UBUNTU_VERSION}" ]; then
31+
AZNFS_UBUNTU_VERSION="3.0.10"
32+
fi
33+
echo "install aznfs v$AZNFS_UBUNTU_VERSION...."
3234
# shellcheck disable=SC1091
3335
$HOST_CMD curl -sSL -O "https://packages.microsoft.com/config/$(. /host/etc/os-release && echo "$ID/$VERSION_ID")/packages-microsoft-prod.deb"
3436
yes | $HOST_CMD dpkg -i packages-microsoft-prod.deb && $HOST_CMD apt-get update
3537
$HOST_CMD rm packages-microsoft-prod.deb
36-
$HOST_CMD apt-get install -y aznfs="$AZNFS_VERSION"
38+
$HOST_CMD apt-get install -y aznfs="$AZNFS_UBUNTU_VERSION" --allow-downgrades
3739
echo "aznfs-mount installed"
3840
elif [ "$DISTRIBUTION" = "azurelinux" ];then # install aznfs-mount on azure linux 3.0
39-
AZNFS_VERSION="0.1.548"
40-
echo "install aznfs v$AZNFS_VERSION...."
41-
$HOST_CMD curl -fsSL https://github.com/Azure/AZNFS-mount/releases/download/$AZNFS_VERSION/aznfs_install.sh | $HOST_CMD bash
41+
if [ -z "${AZNFS_AZURELINUX_VERSION}" ]; then
42+
AZNFS_AZURELINUX_VERSION="0.1.548"
43+
fi
44+
echo "install aznfs v$AZNFS_AZURELINUX_VERSION...."
45+
$HOST_CMD curl -fsSL https://github.com/Azure/AZNFS-mount/releases/download/$AZNFS_AZURELINUX_VERSION/aznfs_install.sh | $HOST_CMD bash
4246
else
4347
echo "aznfs-mount is not supported on Linux distribution: $DISTRIBUTION"
4448
exit 0

0 commit comments

Comments
 (0)