Failure to deploy within a container

Bug #1635659 reported by Chuck Short on 2016-10-21
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack LXD Charm
High
James Page

Bug Description

The /var/log/juju/unit-lxd-0.log on the unit reports:

    2016-10-21 01:09:33 INFO config-changed Traceback (most recent call last):
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/config-changed", line 140, in <module>
    2016-10-21 01:09:33 INFO config-changed main()
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/config-changed", line 134, in main
    2016-10-21 01:09:33 INFO config-changed hooks.execute(sys.argv)
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/charmhelpers/core/hookenv.py", line 715, in execute
    2016-10-21 01:09:33 INFO config-changed self._hooks[hook_name]()
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/config-changed", line 78, in config_changed
    2016-10-21 01:09:33 INFO config-changed configure_lxd_host()
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/charmhelpers/core/decorators.py", line 40, in _retry_on_exception_inner_2
    2016-10-21 01:09:33 INFO config-changed return f(*args, **kwargs)
    2016-10-21 01:09:33 INFO config-changed File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/lxd_utils.py", line 429, in configure_lxd_host
    2016-10-21 01:09:33 INFO config-changed with open(EXT4_USERNS_MOUNTS, 'w') as userns_mounts:
    2016-10-21 01:09:33 INFO config-changed IOError: [Errno 30] Read-only file system: '/sys/module/ext4/parameters/userns_mounts'
    2016-10-21 01:09:33 ERROR juju.worker.uniter.operation runhook.go:107 hook "config-changed" failed: exit status 1

root@juju-456efd-13:~# touch /sys/module/ext4/parameters/temp-file
touch: cannot touch '/sys/module/ext4/parameters/temp-file': Read-only file system
root@juju-456efd-13:~# df -h /sys/module/ext4/parameters/userns_mounts
Filesystem Size Used Avail Use% Mounted on
sys 0 0 0 - /dev/.lxc/sys
root@juju-456efd-13:~# touch /home/ubuntu/temp-file
root@juju-456efd-13:~# ls /home/ubuntu/temp-file
/home/ubuntu/temp-file

Ryan Beisner (1chb1n) on 2016-10-21
tags: added: backport-potential
Ryan Beisner (1chb1n) on 2016-10-21
Changed in charm-lxd:
assignee: nobody → Chuck Short (zulcss)
status: New → In Progress
importance: Undecided → High

Saw the patchset with the fix was reverted after being merged by Jenkins on 10/24. Seems like the fix was moving along nicely up to that point, but it seems to have stalled out now. Any chance of getting an update?

Ryan Beisner (1chb1n) wrote :

Link for tracking changes thus far: https://review.openstack.org/#/q/topic:bug/1635659

James Page (james-page) wrote :

I'm working on a revised fix for this issue.

Changed in charm-lxd:
assignee: Chuck Short (zulcss) → James Page (james-page)
James Page (james-page) wrote :

commit aa8f65275626bd18685bfc2eaae235d9af7a283c
Author: James Page <email address hidden>
Date: Wed Nov 9 11:39:45 2016 +0000

    Guard enablement of ext4 mounts in containers

    Its not possible to enable usernamespace ext4 mounting when LXD
    is being run from inside a container; leverage charm-helpers
    is_container function to guard writes to the /sys filesystem.

    Change-Id: Ie479dcf45cb4834308a055dde22d919830c60671
    Closes-Bug: 1635659

Changed in charm-lxd:
status: In Progress → Fix Released
milestone: none → 17.02
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers