Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions parts/common/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -2238,6 +2238,31 @@
}
}
},
{
"name": "aznfs",
"downloadLocation": "/opt/aznfs/downloads",
"downloadURIs": {
"azurelinux": {
"v3.0": {
"versionsV2": [
{
"renovateTag": "<DO_NOT_UPDATE>",
"latestVersion": "3.0.15-1"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why arent we looking at tracking the versions with renovate ? when would this need to change ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aznfs package is from PMC (packages.microsoft.com) not the AzureLinux repo, so renovate can't track it. The version is pinned with <DO_NOT_UPDATE> tag and we'd bump it manually when a new version is available. We could add a custom renovate datasource later if this becomes a maintenance burden.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renovate support PMC, or I mean we could easily add support for the locaiton of this package

I'm just scared at one point we will loose track of the manual bump

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do it manually now since we need to verify the version before auto version bump. we need to make sure the version AB used is stable and won't break first. @djsly

}
],
"downloadURL": "https://packages.microsoft.com/rhel/9/prod/Packages/a/aznfs-${version}.$(uname -m).rpm"
Comment thread
andyzhangx marked this conversation as resolved.
},
Comment thread
andyzhangx marked this conversation as resolved.
"OSGUARD/v3.0": {
"versionsV2": [
{
"renovateTag": "<DO_NOT_UPDATE>",
"latestVersion": "<SKIP>"
}
]
}
}
}
},
{
"name": "blobfuse",
"downloadURIs": {
Expand Down
47 changes: 47 additions & 0 deletions parts/linux/cloud-init/artifacts/mariner/cse_install_mariner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,53 @@ installKubeletKubectlFromPkg() {
installRPMPackageFromFile "kubectl" "${desiredVersion}" "/opt/bin/kubectl" || exit "$ERR_KUBECTL_INSTALL_FAIL"
}

installAznfsPkgFromPMC() {
Comment thread
andyzhangx marked this conversation as resolved.
if [ "$OS_VERSION" != "3.0" ]; then
echo "aznfs package install is only supported on Azure Linux 3.0"
return
fi

# The aznfs RPM is pre-downloaded to /opt/aznfs/downloads during VHD build
Comment thread
andyzhangx marked this conversation as resolved.
# (via components.json). If not found, download it now as a fallback.
local aznfs_download_dir="/opt/aznfs/downloads"
local aznfs_rpm_file
aznfs_rpm_file=$(find "${aznfs_download_dir}" -name "aznfs-*.rpm" -type f 2>/dev/null | sort -V | tail -1)
if [ -z "${aznfs_rpm_file}" ]; then
echo "aznfs RPM not found in ${aznfs_download_dir}, downloading from PMC"
local download_url
download_url=$(getPackageDownloadUrl "aznfs")
if [ -z "${download_url}" ]; then
echo "Error: could not determine aznfs download URL"
exit $ERR_APT_INSTALL_TIMEOUT
fi
mkdir -p "${aznfs_download_dir}"
local aznfs_filename
aznfs_filename=$(basename "${download_url}")
retrycmd_curl_file 120 5 25 "${aznfs_download_dir}/${aznfs_filename}" "${download_url}" || exit $ERR_MS_PROD_DEB_DOWNLOAD_TIMEOUT
Comment thread
andyzhangx marked this conversation as resolved.
aznfs_rpm_file="${aznfs_download_dir}/${aznfs_filename}"
fi
Comment thread
andyzhangx marked this conversation as resolved.

echo "Installing aznfs from pre-downloaded RPM: ${aznfs_rpm_file}"
if ! AZNFS_NONINTERACTIVE_INSTALL=1 dnf_install 30 1 600 "${aznfs_rpm_file}"; then
exit $ERR_APT_INSTALL_TIMEOUT
fi

# Disable aznfs auto-upgrade to respect operator OS update settings and AKS SDP
local aznfs_config="/opt/microsoft/aznfs/data/config"
if [ -f "${aznfs_config}" ]; then
sed -i 's/AUTOUPDATE=.*/AUTOUPDATE=false/' "${aznfs_config}"
echo "Disabled aznfs auto-upgrade in ${aznfs_config}"
fi

# Disable aznfswatchdog since aznfs install enables both aznfswatchdog and aznfswatchdogv4
# services at the same time while we only need aznfswatchdogv4
systemctl disable aznfswatchdog
systemctl stop aznfswatchdog

echo "Importing Microsoft RPM GPG key into RPM database"
gpg --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Microsoft || echo "Warning: failed to import Microsoft RPM GPG key"
Comment thread
andyzhangx marked this conversation as resolved.
Comment thread
andyzhangx marked this conversation as resolved.
}
Comment thread
andyzhangx marked this conversation as resolved.

installToolFromLocalRepo() {
local tool_name=$1
local tool_download_dir=$2
Expand Down
11 changes: 11 additions & 0 deletions vhdbuilder/packer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,17 @@ while IFS= read -r p; do
"acr-mirror")
# acr-mirror is handled separately below via installAndConfigureArtifactStreaming.
;;
"aznfs")
Comment thread
andyzhangx marked this conversation as resolved.
for version in ${PACKAGE_VERSIONS[@]}; do
evaluatedURL=$(evalPackageDownloadURL "${PACKAGE_DOWNLOAD_URL}")
mkdir -p "${downloadDir}"
aznfsFilename=$(basename "${evaluatedURL}")
echo "Downloading aznfs RPM from ${evaluatedURL} to ${downloadDir}/${aznfsFilename}"
retrycmd_curl_file 120 5 25 "${downloadDir}/${aznfsFilename}" "${evaluatedURL}" || exit $ERR_MS_PROD_DEB_DOWNLOAD_TIMEOUT
echo " - aznfs version ${version}" >> ${VHD_LOGS_FILEPATH}
Comment thread
andyzhangx marked this conversation as resolved.
done
installAznfsPkgFromPMC
;;
"blobfuse"|"blobfuse2")
for version in "${PACKAGE_VERSIONS[@]}"; do
if isUbuntu "$OS"; then
Expand Down
Loading