From d92fafc86f94cd8ccecc254e35bfd1e54dc49ad2 Mon Sep 17 00:00:00 2001 From: Vibe Nuage Agent Date: Tue, 1 Dec 2026 20:53:11 +0000 Subject: [PATCH] Fix MISSING_PACKAGES array append in validate-cks-node (#14755) ### Description On Debian/Ubuntu, `validate-cks-node` collected missing packages with `MISSING_PACKAGES+="$package"`, which appends to the string in element 0 instead of adding an array element: the missing count was always 1 and names were concatenated (e.g. `cloud-guest-utilsapt-transport-https...`). Fixed to `MISSING_PACKAGES+=("$package")`, matching the RPM branch. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### How Has This Been Tested? Ran the script with a stubbed `dpkg` (cloud-init and curl "installed"): before the fix it printed count `1` with concatenated names; after the fix it prints the correct count `12` with space-separated names and exit status 1. `bash -n` syntax check passes. Closes #14755 Co-authored-by: ravening --- .../src/main/resources/script/validate-cks-node | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node b/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node index e28614e05afe..e51c6ddd8058 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node +++ b/plugins/integrations/kubernetes-service/src/main/resources/script/validate-cks-node @@ -24,7 +24,7 @@ if [[ $OS == *"Ubuntu"* || $OS == *"Debian"* ]]; then for package in ${REQUIRED_PACKAGES[@]}; do dpkg -s $package >/dev/null 2>&1 if [ $? -eq 1 ]; then - MISSING_PACKAGES+="$package" + MISSING_PACKAGES+=("$package") fi done else