Bugzilla – Bug 1215943
[Build 20231003] busybox-gzip's zgrep is incompatible with busybox-grep
Last modified: 2023-12-10 12:36:11 UTC
Created attachment 869906 [details] k3s check-config output ## Observation openQA test in scenario microos-Tumbleweed-DVD-aarch64-container-host@aarch64-4G-HD40G fails in [podman_pods](https://openqa.opensuse.org/tests/3620135/modules/podman_pods/steps/201) k3s check-config has been introduced with https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17699 but this fails on microos, likely because grep from busybox does not support '--label=XYZ' option. ## Test suite description ## Reproducible Fails since (at least) Build [20231003](https://openqa.opensuse.org/tests/3619949) ## Expected result Last good: [20231002](https://openqa.opensuse.org/tests/3615977) (or more recent) ## Further details Always latest result in this scenario: [latest](https://openqa.opensuse.org/tests/latest?arch=aarch64&distri=microos&flavor=DVD&machine=aarch64-4G-HD40G&test=container-host&version=Tumbleweed)
Created attachment 869949 [details] microos install log
The check-config script is reading /proc/config.gz [1], therefore using zgrep [2]. In DVD test suite the installer pulls busybox-gzip instead of gzip package. ``` 2023-10-06 00:44:42 <1> install(3735) [zypp::exec++] forkspawnengine.cc(start):274 Executing[C] 'rpm' '--root' '/mnt' '--dbpath' '/var/lib/rpm' '-U' '--percent' '--noglob' '--excludedocs' '--force' '--nodeps' '--' '/mnt/var/cache/zypp/packages/openSUSE-MicroOS-20231005-0/noarch/busybox-gzip-1.36.1-30.1.noarch.rpm' 2023-10-06 00:44:42 <1> install(3735) [Ruby] modules/PackageSlideShow.rb(PkgInstallDone):405 Installed package busybox-gzip 2023-10-06 00:44:42 <1> install(3735) [zypp-core] PathInfo.cc(unlink):706 unlink /mnt/var/cache/zypp/packages/openSUSE-MicroOS-20231005-0/noarch/busybox-gzip-1.36.1-30.1.noarch.rpm ``` Replacing busybox-gzip by gzip fixes the issue. ``` cat: /sys/kernel/security/apparmor/profiles: No such file or directory [37/741] Verifying binaries in /var/lib/rancher/k3s/data/3dfc950bd39d2e2b435291ab8c1333aa6051fcaf46325aee898819f3b99d4b21/bin: - sha256sum: good - links: good System: - /sbin iptables v1.8.9 (legacy): ok - swap: disabled - routes: ok Limits: - /proc/sys/kernel/keys/root_maxkeys: 1000000 info: reading kernel config from /proc/config.gz ... Generally Necessary: - cgroup hierarchy: cgroups V2 mounted, cpu|cpuset|memory controllers status: good - CONFIG_NAMESPACES: enabled - CONFIG_NET_NS: enabled - CONFIG_PID_NS: enabled - CONFIG_IPC_NS: enabled - CONFIG_UTS_NS: enabled - CONFIG_CGROUPS: enabled - CONFIG_CGROUP_PIDS: enabled ... ``` [1] https://github.com/k3s-io/k3s/blob/master/contrib/util/check-config.sh#L14 [2] https://github.com/k3s-io/k3s/blob/master/contrib/util/check-config.sh#L36
I filed https://github.com/k3s-io/k3s/issues/8585 as an upstream bug for this issue.
k3s check-config runs zgrep (unless on an Apparmor system, as then zgrep throws permission denied when calling out to zcat - so they detect that and fall back to an internal zcat | grep, just as if zgrep would not exist) the zgrep file shipped as part of /busybox-gzip seems to be broken: while [ "$#" -gt 0 ]; do # shellcheck disable=SC2086 if [ $pattern_found -eq 2 ]; then "zcat" -- "$1" | "grep" --label="${1}" ${grep_args} -- - else "zcat" -- "$1" | "grep" --label="${1}" ${grep_args} -- "${pattern}" - fi [ "$?" -ne 0 ] && EXIT_CODE=1 shift done buzysbox-grep does not support --label though; which essentially means, busybox-gzip would need to conflict busybox-grep to ensure the 'real' grep is there; hard to believe this would be intentional
The files zless, zmore and zgrep are from Dirk: https://build.opensuse.org/package/rdiff/openSUSE:Factory/busybox-links?linkrev=base&rev=22
(In reply to Thorsten Kukuk from comment #5) > The files zless, zmore and zgrep are from Dirk: > > https://build.opensuse.org/package/rdiff/openSUSE:Factory/busybox- > links?linkrev=base&rev=22 Indeed; apologies for that. I searched for zgrep in the changes file and only found this: Fri Aug 28 08:09:37 UTC 2020 - Thorsten Kukuk - Add zgrep to gzip sub-package Dirk's files are indeed newer and replacing the original variants we had
I have submitted a fix for busybox-links, but I think microos tumbleweed should consider installing gzip by default..
This is an autogenerated message for OBS integration: This bug (1215943) was mentioned in https://build.opensuse.org/request/show/1132118 Factory / busybox-links
(In reply to OBSbugzilla Bot from comment #8) > This is an autogenerated message for OBS integration: > This bug (1215943) was mentioned in > https://build.opensuse.org/request/show/1132118 Factory / busybox-links Merged and confirmed by openQA: https://openqa.opensuse.org/tests/3797247