Skip to content

Commit ad8e789

Browse files
committed
feat: install aznfs package on AzureLinux 3.0
1 parent e1b6c73 commit ad8e789

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,27 @@ installKubeletKubectlPkgFromPMC() {
175175
installRPMPackageFromFile "kubectl" $desiredVersion || exit $ERR_KUBECTL_INSTALL_FAIL
176176
}
177177

178+
installAznfsPkgFromPMC() {
179+
if [ "$OS_VERSION" != "3.0" ]; then
180+
echo "aznfs package install is only supported on Azure Linux 3.0"
181+
return
182+
fi
183+
184+
readonly aznfs_rpm_file="/tmp/packages-microsoft-prod.rpm"
185+
local aznfs_pkg_url="https://packages.microsoft.com/config/rhel/9/packages-microsoft-prod.rpm"
186+
retrycmd_curl_file 120 5 25 ${aznfs_rpm_file} ${aznfs_pkg_url} || exit $ERR_MS_PROD_DEB_DOWNLOAD_TIMEOUT
187+
if ! dnf_install 30 1 600 ${aznfs_rpm_file}; then
188+
exit $ERR_APT_INSTALL_TIMEOUT
189+
fi
190+
if ! dnf_install 30 1 600 aznfs-0.3.34; then
191+
exit $ERR_APT_INSTALL_TIMEOUT
192+
fi
193+
rm -f ${aznfs_rpm_file}
194+
# disable aznfswatchdog since aznfs install and enable aznfswatchdog and aznfswatchdogv4 services at the same time while we only need aznfswatchdogv4
195+
systemctl disable aznfswatchdog
196+
systemctl stop aznfswatchdog
197+
}
198+
178199
installToolFromLocalRepo() {
179200
echo "installToolFromLocalRepo is not yet implemented for Mariner"
180201
return 1

vhdbuilder/packer/install-dependencies.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ if isMarinerOrAzureLinux "$OS" && ! isAzureLinuxOSGuard "$OS" "$OS_VARIANT"; the
234234
disableDNFAutomatic
235235
enableCheckRestart
236236
activateNfConntrack
237+
installAznfsPkgFromPMC
237238
fi
238239
capture_benchmark "${SCRIPT_NAME}_handle_azurelinux_configs"
239240

0 commit comments

Comments
 (0)