Skip to content

CKS: validate-cks-node merges missing package names into one string on Debian/Ubuntu #14755

Open

Description

@bhouse-nexthop

Problem

validate-cks-node (kubernetes-service plugin) checks a node for required packages before it is added to a CKS cluster. On Debian/Ubuntu it collects the missing ones with:

MISSING_PACKAGES+="$package"

On an array, this appends to the string in element 0. It does not add an element.

Effect Detail
Count always 1, however many are missing
Message names run together, e.g. cloud-guest-utilsapt-transport-httpscurl...
Exit status still 1, so the node is rejected, but the log does not say what to install

The RPM branch uses a different append and is not affected.

Reproduce

Run the script logic with dpkg stubbed so that only some packages are "installed":

1
Following packages are missing in the node template: cloud-guest-utilsapt-transport-httpscurlgnupg-agentsoftware-properties-commonpython3-json-pointerpython3-jsonschema

Expected

Each missing package is an array element: the count is correct and the names are separated by spaces.

Versions

4.22, main

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions