File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -646,6 +646,8 @@ installAndConfigureArtifactStreaming() {
646646 /opt/acr/tools/overlaybd/config.sh exporterConfig.enable true
647647 /opt/acr/tools/overlaybd/config.sh exporterConfig.port 9863
648648 systemctl link /opt/overlaybd/overlaybd-tcmu.service /opt/overlaybd/snapshotter/overlaybd-snapshotter.service
649+ # Remove the bundled overlaybd installer packages (~55-58 MB); install.sh already installed them and they're unused at runtime.
650+ rm -f /opt/acr/tools/overlaybd/bin/* .deb /opt/acr/tools/overlaybd/bin/* .rpm
649651 echo " - acr-mirror version ${version} " >> ${VHD_LOGS_FILEPATH}
650652}
651653
Original file line number Diff line number Diff line change @@ -538,6 +538,27 @@ testAuditDNotPresent() {
538538 echo " $test :Finish"
539539}
540540
541+ testArtifactStreamingPackagesCleanedUp () {
542+ local test=" testArtifactStreamingPackagesCleanedUp"
543+ echo " $test :Start"
544+ local overlaybdBinDir=" /opt/acr/tools/overlaybd/bin"
545+ # Skip if artifact streaming (acr-mirror) isn't installed on this VHD.
546+ if [ ! -d " $overlaybdBinDir " ]; then
547+ echo " $overlaybdBinDir not present; artifact streaming not installed on this VHD, skipping"
548+ echo " $test :Finish"
549+ return
550+ fi
551+ # The bundled overlaybd installer packages are unused at runtime and must be removed after install.
552+ local leftovers
553+ leftovers=$( find " $overlaybdBinDir " -maxdepth 1 -type f \( -name ' *.deb' -o -name ' *.rpm' \) 2> /dev/null)
554+ if [ -n " $leftovers " ]; then
555+ err $test " Leftover overlaybd install packages found (should be removed after install): ${leftovers} "
556+ else
557+ echo " No leftover overlaybd .deb/.rpm packages found, as expected"
558+ fi
559+ echo " $test :Finish"
560+ }
561+
541562testChrony () {
542563 os_sku=$1
543564 local test=" testChrony"
@@ -2512,3 +2533,4 @@ testPackageDownloadURLFallbackLogic
25122533testFileOwnership $OS_SKU
25132534testDiskQueueServiceIsActive
25142535testVulnerableKernelModulesDisabled $OS_SKU $OS_VERSION
2536+ testArtifactStreamingPackagesCleanedUp
You can’t perform that action at this time.
0 commit comments