Skip to content

Commit 3602edb

Browse files
authored
fix: issues caused by the /usr/local/bin to /opt/bin move (#7703)
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
1 parent e0f9cb0 commit 3602edb

File tree

63 files changed

+82
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+82
-81
lines changed

parts/linux/cloud-init/artifacts/azlosguard/cse_install_osguard.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ installRPMPackageFromFile() {
5252
fi
5353

5454
echo "Unpacking usr/bin/${rpmBinaryName} from ${downloadDir}/${packageName}-${desiredVersion}*"
55+
mkdir -p "${targetBinDir}"
5556
# This assumes that the binary will either be in /usr/bin or /usr/local/bin, but not both.
5657
rpm2cpio "${rpmFile}" | cpio -i --to-stdout "./usr/bin/${rpmBinaryName}" "./usr/local/bin/${rpmBinaryName}" | install -m0755 /dev/stdin "${targetBinDir}/${targetBinaryName}"
5758
rm -rf ${downloadDir}

parts/linux/cloud-init/artifacts/cse_helpers.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,10 @@ fallbackToKubeBinaryInstall() {
938938
if [ "${SHOULD_ENFORCE_KUBE_PMC_INSTALL}" = "true" ]; then
939939
echo "Kube PMC install is enforced, skipping fallback to kube binary install for ${packageName}"
940940
return 1
941-
elif [ -f "/usr/local/bin/${packageName}-${packageVersion}" ]; then
942-
mv "/usr/local/bin/${packageName}-${packageVersion}" "/usr/local/bin/${packageName}"
943-
chmod a+x /usr/local/bin/${packageName}
944-
rm -rf /usr/local/bin/${packageName}-* &
941+
elif [ -f "/opt/bin/${packageName}-${packageVersion}" ]; then
942+
mv "/opt/bin/${packageName}-${packageVersion}" "/opt/bin/${packageName}"
943+
chmod a+x /opt/bin/${packageName}
944+
rm -rf /opt/bin/${packageName}-* &
945945
return 0
946946
else
947947
echo "No binary fallback found for ${packageName} version ${packageVersion}"

parts/linux/cloud-init/artifacts/mariner/mariner-package-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ OS_RELEASE_FILE="/etc/os-release"
99
SECURITY_PATCH_REPO_DIR="/etc/yum.repos.d"
1010
KUBECONFIG="/var/lib/kubelet/kubeconfig"
1111
KUBECTL="/opt/bin/kubectl --kubeconfig ${KUBECONFIG}"
12-
KUBELET_EXECUTABLE="/usr/local/bin/kubelet"
12+
KUBELET_EXECUTABLE="/opt/bin/kubelet"
1313
SECURITY_PATCH_TMP_DIR="/tmp/security-patch"
1414

1515
# Function definitions used in this file.

pkg/agent/testdata/AKSUbuntu2204+China/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+Containerd+CDI/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+Containerd+DevicePlugin/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+Containerd+MIG+ArtifactStreaming/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+Containerd+MIG/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+CustomCloud+USNat/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pkg/agent/testdata/AKSUbuntu2204+CustomCloud+USSec/CustomData

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)