Skip to content

Commit d36a4d9

Browse files
Merge pull request #1889 from marmijo/rhaos-pkgs-exception
[release-4.21] NO-JIRA: rhaos-pkgs-match-openshift: exclude known package mismatches
2 parents e8f5a55 + e21822e commit d36a4d9

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

kola-denylist.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# coreos-assembler to automatically skip some tests. For more information,
33
# see: https://github.com/coreos/coreos-assembler/pull/866.
44

5-
- pattern: ext.config.version.rhaos-pkgs-match-openshift
6-
tracker: https://github.com/openshift/os/issues/1847
7-
85
- pattern: rhcos.network.init-interfaces-test
96
tracker: https://github.com/openshift/os/issues/1852
107
arches:

tests/kola/files/openvswitch-hugetlbfs-groups

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## exclusive: false
44
## architectures: "x86_64 ppc64le"
55
## description: Verify openvswitch user is in the hugetlbfs group.
6+
## tags: openshift
67

78
set -xeuo pipefail
89

tests/kola/version/rhaos-pkgs-match-openshift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
## description: Verify that packages coming from the rhaos
55
## branches match the OpenShift version.
66
## This is RHCOS only.
7+
## tags: openshift
78

89
set -xeuo pipefail
910

@@ -13,7 +14,21 @@ set -xeuo pipefail
1314
# source the environment variables to get OPENSHIFT_VERSION
1415
source /etc/os-release
1516

16-
rpm -qa | grep "rhaos" > /tmp/rhaos-packages.txt
17+
# These are packages that are known to not match the
18+
# targeted version of openshift. Exlude them from the test.
19+
RHAOS_PACKAGE_EXCEPTIONS=(
20+
# toolbox doesn't always match the target ocp version because it
21+
# is included in the base-image which spans multiple versions
22+
toolbox
23+
# conmon currently is missing 4.19+ vesions of the package
24+
conmon-rs
25+
)
26+
27+
exception_pattern=$(echo ${RHAOS_PACKAGE_EXCEPTIONS[@]} | tr " " "|")
28+
29+
# Use `|| true` here to allow situations where RHAOS_PACKAGE_EXCEPTIONS contains every
30+
# rhaos package in the image, which would otherwise cause `grep -Ev` to fail the test.
31+
rpm -qa | grep "rhaos" | grep -Ev "${exception_pattern}" > /tmp/rhaos-packages.txt || true
1732

1833
if grep -v "rhaos${OPENSHIFT_VERSION}" /tmp/rhaos-packages.txt; then
1934
fatal "Error: rhaos packages do not match OpenShift version"

0 commit comments

Comments
 (0)