lxc: lxc-test-parse-config-file failure (expected value and retrieved value do not match)

Bug #1943441 reported by Andrea Righi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned
lxc (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Impish
Won't Fix
Undecided
Unassigned

Bug Description

I'm getting the following error with the lxc kernel autotest on impish:

08:46:04 DEBUG| parse_config_file.c: 60: set_get_compare_clear_save_load: expected value "system_u:system_r:lxc_t:s0:c22" and retrieved value "" for config key "lxc.selinux.context" do not match
08:46:04 DEBUG|
08:46:04 DEBUG| parse_config_file.c: 382: main: lxc.selinux.context
08:46:06 INFO | ERROR ubuntu_lxc.lxc-test-parse-config-file ubuntu_lxc.lxc-test-parse-config-file timestamp=1631090766 localtime=Sep 08 08:46:06 Command failed, rc=1, Command returned non-zero exit status
  * Command:
      /tmp/lxc-pkg-ubuntu/src/tests/lxc-test-parse-config-file
  Exit status: 1
  Duration: 0.0550210475922

  stderr:
  parse_config_file.c: 60: set_get_compare_clear_save_load: expected value "system_u:system_r:lxc_t:s0:c22" and retrieved value "" for config key "lxc.selinux.context" do not match

  parse_config_file.c: 382: main: lxc.selinux.context

I haven't investigated very much, but it looks like a (mis)configuration change / issue. Does it ring any bell? Otherwise I'll investigate more.

Changed in lxc (Ubuntu):
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Christian Brauner (cbrauner) wrote :

This was caused by a recent change to how we handle selinux and apparmor config options when LXC is compiled without support. I've sent
https://github.com/lxc/lxc/pull/3969
specific to stable-4.0.

Revision history for this message
Andrea Righi (arighi) wrote :

Makes sense, thanks for looking at this Christian!

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Also observed with impish linux-aws 5.13.0-1000.1

Revision history for this message
Krzysztof Kozlowski (krzk) wrote :

Found on impish/linux-oracle/5.13.0-1005.7

tags: added: 5.13 amd64 impish linux-kvm oracle sru-20210906 ubuntu-lxc
tags: added: hinted
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1:4.0.12-0ubuntu1

---------------
lxc (1:4.0.12-0ubuntu1) jammy; urgency=medium

  * Cherry-pick upstream bugfixes (stable-4.0):
    - 0002-lxc-checkconfig-Fix-bashism.patch
    - 0003-doc-Fix-reverse-allowlist-denylist.patch (LP: #1957934)

  * New upstream bugfix release (4.0.12):
    (https://discuss.linuxcontainers.org/t/lxc-4-0-12-has-been-released/13288)
    - Fixed CRIU restoration of containers with pre-created veth interfaces
    - Fixed issue with kernels lacking SMT support
    - Extended cgroup2 config options in lxc.mount.auto (cgroup2)
    - lxc-download now relies on HTTPS for validation (avoids GPG issues)

  * New upstream bugfix release (4.0.11)
    (LP: #1943441, LP: #1938771, LP: #1891903):
    (https://discuss.linuxcontainers.org/t/lxc-4-0-11-has-been-released/12427)
    - Core scheduling support (lxc.sched.core)
    - riscv64 support in lxc.arch
    - Significantly improved bash completion profile
    - Greater use of the new VFS mount API (when supported by the kernel)
    - Fix containers with empty network namespaces
    - Handle kernels that lack TIOCGPTPEER
    - Improve CPU bitmask/id handling (handle skipped CPU numbers)
    - Reworked the tests to run offline

  * Bump to debhelper 12 (allows focal SRUs)
  * Bump standards to 4.6.0.1
  * Add lintian overrides for incorrect bashism detection
  * Remove bash completion install logic (now done upstream)

 -- Stéphane Graber <email address hidden> Wed, 02 Feb 2022 20:48:39 -0500

Changed in lxc (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The issue is still reproducible in Impish (lxc 1:4.0.12-0ubuntu1~21.10.1)

Changed in lxc (Ubuntu Impish):
status: New → Confirmed
Po-Hsu Lin (cypressyew)
summary: - lxc: lxc-test-parse-config-file failure
+ lxc: lxc-test-parse-config-file failure (expected value and retrieved
+ value do not match
Po-Hsu Lin (cypressyew)
summary: lxc: lxc-test-parse-config-file failure (expected value and retrieved
- value do not match
+ value do not match)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This test is still failing on Focal 5.15 with lxc 1:4.0.12-0ubuntu1~20.04.1

Running '/tmp/lxc-pkg-ubuntu/src/tests/lxc-test-parse-config-file'
 parse_config_file.c: 63: set_get_compare_clear_save_load: expected value "system_u:system_r:lxc_t:s0:c22" and retrieved value "" for config key "lxc.selinux.context" do not match

 parse_config_file.c: 49: set_get_compare_clear_save_load: failed to set config item "lxc.seccomp.profile" to "/some/seccomp/file"

 parse_config_file.c: 580: main: lxc.seccomp.profile

Revision history for this message
Luke Nowakowski-Krijger (lukenow) wrote :

Failing with 2022.06.20/focal/linux-fips/5.4.0-1057.65

parse_config_file.c: 63: set_get_compare_clear_save_load: expected value "system_u:system_r:lxc_t:s0:c22" and retrieved value "" for config key "lxc.selinux.context" do not match
parse_config_file.c: 49: set_get_compare_clear_save_load: failed to set config item "lxc.seccomp.profile" to "/some/seccomp/file"
parse_config_file.c: 580: main: lxc.seccomp.profile

Revision history for this message
Cory Todd (corytodd) wrote :

Failing with 2022.07.11/focal/linux-fips/5.4.0-1058.66

parse_config_file.c: 63: set_get_compare_clear_save_load: expected value "system_u:system_r:lxc_t:s0:c22" and retrieved value "" for config key "lxc.selinux.context" do not match
parse_config_file.c: 49: set_get_compare_clear_save_load: failed to set config item "lxc.seccomp.profile" to "/some/seccomp/file"
parse_config_file.c: 580: main: lxc.seccomp.profile

Revision history for this message
Cory Todd (corytodd) wrote :

Failing with 2022.08.08/focal/linux-fips/5.4.0-1060.68 (note that 1059.67 was a security release so we don't have test data for it)

tags: added: sru-20220808
Revision history for this message
Cory Todd (corytodd) wrote :

Failing with 2022.08.29/focal/linux-fips/5.4.0-1061.69

tags: added: sru-20220829
Revision history for this message
Cory Todd (corytodd) wrote :

Failing with 2022.09.19/focal/linux-fips/5.4.0-1062.70

tags: added: sru-20220919
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 21.10 (Impish Indri) has reached end of life, so this bug will not be fixed for that specific release.

Changed in lxc (Ubuntu Impish):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.