Bug 2089748
| Summary: | Removal of "--selinux-relabel" option breaks existing scripts | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Cédric Jeanneret <cjeanner> |
| Component: | guestfs-tools | Assignee: | Laszlo Ersek <lersek> |
| Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | CentOS Stream | CC: | bdobreli, bstinson, jwboyer, lersek, qzhang, rjones, virt-maint, ymao, yoguo |
| Target Milestone: | rc | Keywords: | Regression, Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | guestfs-tools-1.48.2-4.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 09:52:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2075718 | ||
I confirmed this here too, commands such as "virt-builder fedora-36 --selinux-relabel" fail with an unknown option. See also the upstream series: https://listman.redhat.com/archives/libguestfs/2022-May/thread.html#28826 and original bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1554735 https://bugzilla.redhat.com/show_bug.cgi?id=2075718 [libguestfs PATCH] generator/customize: reintroduce "--selinux-relabel" as a compat option Message-Id: <20220525071958.9612-1-lersek> https://listman.redhat.com/archives/libguestfs/2022-May/028972.html [libguestfs-common PATCH] mlcustomize: refresh generated files Message-Id: <20220525072008.9689-1-lersek> https://listman.redhat.com/archives/libguestfs/2022-May/028973.html (In reply to Laszlo Ersek from comment #2) > [libguestfs PATCH] generator/customize: reintroduce "--selinux-relabel" as a compat option > Message-Id: <20220525071958.9612-1-lersek> > https://listman.redhat.com/archives/libguestfs/2022-May/028972.html commit range 63b722b6c094..9e69a38d8234 > [libguestfs-common PATCH] mlcustomize: refresh generated files > Message-Id: <20220525072008.9689-1-lersek> > https://listman.redhat.com/archives/libguestfs/2022-May/028973.html commit f8de5508fe75 guestfs-tools: commit 273de755dfe7 ("update common submodule", 2022-05-25) Verified with guestfs-tools-1.48.2-1.el9.x86_64 Steps: 1. On rhel9.1 host $ virt-builder fedora-36 --selinux-relabel [ 9.1] Downloading: http://builder.libguestfs.org/fedora-36.xz ###################################################################################################################### 100.0%###################################################################################################################### 100.0% [ 96.5] Planning how to build this image [ 96.5] Uncompressing [ 98.8] Opening the new disk [ 107.6] Setting a random seed [ 107.6] Setting passwords virt-builder: Setting random password of root to QVWvz00xHSTuWIX8 [ 109.0] SELinux relabelling [ 121.1] Finishing off Output file: fedora-36.img Output size: 6.0G Output format: raw Total usable space: 6.0G Free space: 4.7G (79%) No error like this "virt-builder: unrecognized option '--selinux-relabel'". Thank you! Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: guestfs-tools security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:7959 |
Description of problem: It appears the removal of "--selinux-relabel" option was pushed in the 1.48.1 version, which is distributed in CentOS Stream 9. While I'm completely OK with "default on relabel things", it breaks existing scripts that were calling on purpose the --selinux-relabel parameter: virt-sysprep: unrecognized option '--selinux-relabel' Version-Release number of selected component (if applicable): guestfs-tools-1.48.1-1.el9.x86_64 How reproducible: Always Steps to Reproduce: 1. Get a CentOS Stream 9 host, ensure all is up-to-date 2. install latest guestfs-tools 3. run any command with "--selinux-relabel", for instance: virt-sysprep -a {IMAGE} --selinux-relabel [... some other options] Actual results: It fails due to a now unknown option Expected results: It should still succeed, but probably output a warning about the deprecation of that option Additional info: Apparently the patch is this one: https://github.com/libguestfs/libguestfs/commit/2f6a27f1077d32d1ab526427052fc88e188356f7 I started a discussion there, resulting in this BZ creation Also: it will affect OSP CI, being upstream and downstream, and may lead to some major issues in our delivery processes... Hopefully I caught it early.