lxc-android-config not starting on ubuntu-touch/staging/* xenial-based images after lxc upgrade

Bug #1653725 reported by Łukasz Zemczak on 2017-01-03
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Critical
Unassigned
lxc (Ubuntu)
High
Christian Brauner
Trusty
Medium
Stéphane Graber
Xenial
High
Stéphane Graber
Yakkety
High
Stéphane Graber
Zesty
High
Christian Brauner

Bug Description

# SRU
## Rationale
LXC 2.0.6 introduced a writability test for /var/lib/lxc which breaks the corner case of partly-writable systems like the Ubuntu phone.
This upload fixes this by changing the test to a simple readability one.

## Test case
1) Attempt to run lxc-start with /var/lib/lxc on a read-only filesystem but /var/lib/lxc/<container> on a writable one.
2) Confirm that the container now starts.

## Regression potential
This upload only changes the check from read/write to read so the only consequence of this should be more cases now being allowed. In the case where a writable /var/lib/lxc is in fact absolutely required for the requested operation, the operation will still fail, just a bit later and with a slightly less clear error message (as was the case pre-2.0.6).

# Original report
As in topic. Since the 20161217 rootfs, after upgrade of lxc from 2.0.5-0ubuntu1~ubuntu16.04.3 to 2.0.6-0ubuntu1~ubuntu16.04.1 the lxc-android-config service does not start - making the devices unbootable.

The syslog only states this:

Jan 3 10:50:30 ubuntu-phablet systemd[1]: Starting LXC Android Config and Container Initialization...
Jan 3 10:50:30 ubuntu-phablet kernel: [ 5.790810] (3)[1:systemd]SLEEP_EN = 0x1
Jan 3 10:50:30 ubuntu-phablet systemd[1]: Starting Light Display Manager...
Jan 3 10:50:30 ubuntu-phablet systemd-udevd[672]: Could not generate persistent MAC address for ifb0: No such file or directory
Jan 3 10:50:30 ubuntu-phablet systemd-udevd[684]: Could not generate persistent MAC address for ifb1: No such file or directory
Jan 3 10:50:30 ubuntu-phablet lxc-start[1220]: You lack access to /var/lib/lxc
Jan 3 10:50:30 ubuntu-phablet systemd[1]: lxc-android-config.service: Control process exited, code=exited status=1
Jan 3 10:50:30 ubuntu-phablet systemd[1]: Failed to start LXC Android Config and Container Initialization.
Jan 3 10:50:30 ubuntu-phablet systemd[1]: Dependency failed for force-mtp.service.
Jan 3 10:50:30 ubuntu-phablet systemd[1]: force-mtp.service: Job force-mtp.service/start failed with result 'dependency'.
Jan 3 10:50:30 ubuntu-phablet systemd[1]: lxc-android-config.service: Unit entered failed state.
Jan 3 10:50:30 ubuntu-phablet systemd[1]: lxc-android-config.service: Failed with result 'exit-code'.

This makes all of our frieza and cooler devices useless for testing purposes.

Changed in lxc (Ubuntu):
importance: Undecided → High
Changed in canonical-devices-system-image:
importance: Undecided → Critical
milestone: none → x1
status: New → Confirmed
Stéphane Graber (stgraber) wrote :

What are the permissions on /var/lib/lxc on such devices?

Łukasz Zemczak (sil2100) wrote :

Looking at my krillin from the recovery, /var/lib/lxc looks like this:
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)

Stéphane Graber (stgraber) wrote :

Thanks. I think the problem is a newly introduced check for path writeability which is harmless and in fact, potentially useful in just about all cases but the weird Ubuntu Phone case where / is read-only, confusing that check.

@Christian: Can you look into fixing this? I suspect we only really care about being able to access the path, not so much about being able to write to it. So it may make sense to change the check in all our tools to simply check for read rights.

Changed in lxc (Ubuntu):
assignee: nobody → Christian Brauner (cbrauner)
Changed in lxc (Ubuntu):
status: New → In Progress
Changed in lxc (Ubuntu):
status: In Progress → Fix Committed
no longer affects: lxc-android-config (Ubuntu)
Changed in lxc (Ubuntu Yakkety):
status: New → Triaged
Changed in lxc (Ubuntu Xenial):
status: New → Triaged
Changed in lxc (Ubuntu Yakkety):
importance: Undecided → High
Changed in lxc (Ubuntu Xenial):
importance: Undecided → High
Changed in lxc (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Changed in lxc (Ubuntu Xenial):
assignee: nobody → Stéphane Graber (stgraber)
Changed in lxc (Ubuntu Yakkety):
assignee: nobody → Stéphane Graber (stgraber)
no longer affects: lxc-android-config (Ubuntu Xenial)
no longer affects: lxc-android-config (Ubuntu Yakkety)
no longer affects: lxc-android-config (Ubuntu Zesty)
Changed in lxc (Ubuntu Trusty):
assignee: nobody → Stéphane Graber (stgraber)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 2.0.6-0ubuntu5

---------------
lxc (2.0.6-0ubuntu5) zesty; urgency=medium

  * Cherry-pick upstream bugfix:
    - 0003-tools-only-check-for-O_RDONLY.patch (LP: #1653725)

 -- Stéphane Graber <email address hidden> Wed, 04 Jan 2017 14:11:45 -0500

Changed in lxc (Ubuntu Zesty):
status: Fix Committed → Fix Released
Stéphane Graber (stgraber) wrote :

This was fixed upstream and included in our stable branch. A cherry-pick was uploaded to Zesty and all tests were run successfully against it.

I have now uploaded the same thing for xenial and yakkety, they are in the queue waiting for a SRU team member to approve them.

Once the Xenial SRU is through, I'll update the trusty-backports pocket with it.

Changed in lxc (Ubuntu Yakkety):
status: Triaged → In Progress
Changed in lxc (Ubuntu Xenial):
status: Triaged → In Progress
description: updated
Łukasz Zemczak (sil2100) wrote :

Thanks! Greatly appreciated guys. I'll kick a test xenial image as soon as it's available.

Hello Łukasz, or anyone else affected,

Accepted lxc into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/2.0.6-0ubuntu1~ubuntu16.10.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lxc (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in lxc (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello Łukasz, or anyone else affected,

Accepted lxc into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lxc/2.0.6-0ubuntu1~ubuntu16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Paul Larson (pwlars) wrote :

I was able to test this on a m10 tablet. The fix seems to have gone through to the cooler image I was trying to test - r13 in ubuntu-touch/staging/bq-aquaris-pd.en, and now no longer hangs on install.

The verification of the Stable Release Update for lxc has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 2.0.6-0ubuntu1~ubuntu16.10.2

---------------
lxc (2.0.6-0ubuntu1~ubuntu16.10.2) yakkety; urgency=medium

  * Cherry-pick upstream bugfix:
    - 0003-tools-only-check-for-O_RDONLY.patch (LP: #1653725)

 -- Stéphane Graber <email address hidden> Wed, 04 Jan 2017 19:51:22 -0500

Changed in lxc (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 2.0.6-0ubuntu1~ubuntu16.04.2

---------------
lxc (2.0.6-0ubuntu1~ubuntu16.04.2) xenial; urgency=medium

  * Cherry-pick upstream bugfix:
    - 0003-tools-only-check-for-O_RDONLY.patch (LP: #1653725)

 -- Stéphane Graber <email address hidden> Wed, 04 Jan 2017 19:52:32 -0500

Changed in lxc (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers