lxc-test-no-new-privs in ubuntu_lxc failed on F-s390x zVM (lxc 1:4.0.12-0ubuntu1~20.04.1 )

Bug #1969905 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned
lxc (Ubuntu)
New
Undecided
Unassigned

Bug Description

Issue found on F 5.4.0-108.122 s390x node kernel04

Test failed with:
 Running '/tmp/lxc-pkg-ubuntu/src/tests/lxc-test-no-new-privs'
 + DONE=0
 + trap cleanup EXIT SIGHUP SIGINT SIGTERM
 + '[' '!' -d /etc/lxc ']'
 + lxc-create -t busybox -n c1
 + echo 'lxc.no_new_privs = 1'
 + lxc-start -n c1
 ++ lxc-info -n c1 -p -H
 + p1=65479
 + '[' 65479 '!=' -1 ']'
 + lxc-attach -n c1 --clear-env -- mkdir -p /home/ubuntu
 + lxc-attach -n c1 --clear-env -- /bin/sh -c 'cat <> /etc/passwd
 ubuntu:x:1000:1000:ubuntu:/home/ubuntu:/bin/sh
 EOF'
 + lxc-attach -n c1 --clear-env --uid 1000 --gid 1000 -- ping -c 1 127.0.0.1
 PING 127.0.0.1 (127.0.0.1): 56 data bytes
 ping: permission denied (are you root?)
 + lxc-stop -n c1 -k
 + sed -i 's/lxc.no_new_privs = 1/lxc.no_new_privs = 0/' /var/lib/lxc/c1/config
 + lxc-start -n c1
 + lxc-attach -n c1 --clear-env --uid 1000 --gid 1000 -- ping -c 1 127.0.0.1
 PING 127.0.0.1 (127.0.0.1): 56 data bytes
 ping: sendto: Network is unreachable
 Managed to ping localhost
 + echo 'Managed to ping localhost'
 + false
 + cleanup
 + cd /
 + lxc-destroy -n c1 -f
 FAIL
 + '[' 0 -eq 0 ']'
 + echo FAIL
 + exit 1

It's worthy to note that this test has passed with 5.4.0-106.120 + lxc 1:4.0.6-0ubuntu1~20.04.1
The test output is a bit different, I think it's because of this commit: https://github.com/lxc/lxc/commit/f6a53ad2c593ade2320cc357abd15e01e22b6f8d

Po-Hsu Lin (cypressyew)
tags: added: 5.4 focal s390x sru-20220321 ubuntu-lxc
Revision history for this message
Christian Brauner (cbrauner) wrote :

And that only fails on s390x?

Revision history for this message
Po-Hsu Lin (cypressyew) wrote (last edit ):

Hi Christian,
we just found that it's because we have universe -proposed enabled on that node only. (Which should be disabled for our SRU test)
On other instances they're still using the old test case from 1:4.0.6-0ubuntu1~20.04.1.

I can give it a try on AMD64 instance.

Revision history for this message
Stefan Bader (smb) wrote :

Turns out that is a SUT which does not get freshly provisioned and had proposed enabled. And there is a newer lxc in proposed.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Tried this on a Focal AMD64 instance, and it passed with 1:4.0.12-0ubuntu1~20.04.1

Stefan is right, the tool was not updated on that s390x SUT.

Sorry for the noise, this is a manually provisioned system and this -proposed stuff must be something leftover from the past.

Changed in lxc (Ubuntu):
status: New → Invalid
Revision history for this message
Po-Hsu Lin (cypressyew) wrote (last edit ):

OK I misread Stefan's comment,

checking the report again, it's using the consistent version (1:4.0.12-0ubuntu1~20.04.1)) for both lxc and test cases (source) on that s390x zVM.

Please find attachment for the full test log.

I will switch the bug status back to New.

Changed in lxc (Ubuntu):
status: Invalid → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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