Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ installRPMPackageFromFile() {
# This assumes that the binary will either be in /usr/bin or /usr/local/bin, but not both.
rpm2cpio "${rpmFile}" | cpio -i --to-stdout "./usr/bin/${packageName}" "./usr/local/bin/${packageName}" | install -m0755 /dev/stdin "${targetPath}"
rm -rf "${downloadDir}"
# Clean up stale cached binaries that were not used
rm -f /opt/bin/"${packageName}"-* &
}

downloadPkgFromVersion() {
Expand Down
2 changes: 1 addition & 1 deletion parts/linux/cloud-init/artifacts/cse_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ fallbackToKubeBinaryInstall() {
mv "/opt/bin/${packageName}-${packageVersion}" "${targetPath}"
chown root:root "${targetPath}"
chmod 0755 "${targetPath}"
rm -rf "/opt/bin/${packageName}-*" &
rm -rf /opt/bin/"${packageName}"-* &
return 0
else
echo "No binary fallback found for ${packageName} version ${packageVersion}"
Expand Down
1 change: 1 addition & 0 deletions parts/linux/cloud-init/artifacts/cse_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ installToolFromBootstrapProfileRegistry() {

# All tools installed successfully
rm -rf "${download_root}"
rm -f /opt/bin/"${tool_name}"-* &
return 0
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ installRPMPackageFromFile() {
rpmFile="${downloadDir}/${rpmFile}"
logs_to_events "AKS.CSE.install${packageName}.extractBinaryFromRPM" "extractBinaryFromRPM ${rpmFile} ${packageName} ${targetPath}" || exit "$ERR_APT_INSTALL_TIMEOUT"
rm -rf "${downloadDir}"
# Clean up stale cached binaries that were not used
rm -f /opt/bin/"${packageName}"-* &
}

installPackageFromCache() {
Expand Down Expand Up @@ -546,6 +548,7 @@ installPackageFromCache() {
rpmFile="${downloadDir}/${rpmFile}"
logs_to_events "AKS.CSE.install${packageName}.extractBinaryFromRPM" "extractBinaryFromRPM ${rpmFile} ${packageName} ${targetPath}" || exit "$ERR_APT_INSTALL_TIMEOUT"
rm -rf "${downloadDir}"
rm -f /opt/bin/"${packageName}"-* &
}

downloadPkgFromVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ installPkgWithAptGet() {
logs_to_events "AKS.CSE.install${packageName}.extractDebBinaryFromFile" "extractDebBinaryFromFile ${debFile} ${packageName} ${targetPath}" || exit "$ERR_APT_INSTALL_TIMEOUT"

rm -rf "${downloadDir}"
# Clean up stale cached binaries that were not used
rm -f /opt/bin/"${packageName}"-* &
Comment thread
Devinwong marked this conversation as resolved.
}

installPackageFromCache() {
Expand Down Expand Up @@ -425,6 +427,7 @@ installPackageFromCache() {
logs_to_events "AKS.CSE.install${packageName}.extractDebBinaryFromFile" "extractDebBinaryFromFile ${debFile} ${packageName} ${targetPath}" || exit "$ERR_APT_INSTALL_TIMEOUT"

rm -rf "${downloadDir}"
rm -f /opt/bin/"${packageName}"-* &
}

downloadPkgFromVersion() {
Expand Down
Loading