LXC containers missing rootfs dir

Bug #1470101 reported by Matt Thompson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Medium
Matt Thompson
Kilo
Fix Released
Medium
Matt Thompson
Trunk
Fix Released
Medium
Matt Thompson

Bug Description

I've noticed something odd and believe it's a result of https://review.openstack.org/#/c/190048/8. Currently, a container's rootfs is in /var/lib/lxc/<container>. For example:

root@jenk-heat-350-node1:/var/lib/lxc# ls -al jenk-heat-350-node1_cinder_api_container-32e9101e
total 104
drwxr-xr-x 22 root root 4096 Jun 29 14:57 .
drwx------ 27 root root 4096 Jun 29 14:17 ..
drwxr-xr-x 2 root root 4096 Jun 29 14:22 bin
drwxr-xr-x 2 root root 4096 Apr 10 2014 boot
-rw-r--r-- 1 root root 1370 Jun 29 14:57 config
-rw-r--r-- 1 root root 1219 Jun 29 14:18 config.2015-06-29@14:18:45~
drwxr-xr-x 5 root root 4096 Jun 29 15:00 dev
drwxr-xr-x 77 root root 4096 Jun 29 15:00 etc
-rw-r--r-- 1 root root 512 Jun 29 14:18 eth1.ini
-rw-r--r-- 1 root root 515 Jun 29 14:18 eth2.ini
-rw-r--r-- 1 root root 0 Jun 29 14:17 fstab
drwxr-xr-x 3 root root 4096 Jun 29 14:17 home
drwxr-xr-x 14 root root 4096 Jun 29 14:58 lib
drwxr-xr-x 2 root root 4096 May 31 20:07 lib64
drwxr-xr-x 2 root root 4096 Jul 29 2014 media
drwxr-xr-x 2 root root 4096 Apr 10 2014 mnt
drwxr-xr-x 2 root root 4096 Jun 29 14:57 opt
drwxr-xr-x 2 root root 4096 Apr 10 2014 proc
drwx--S--- 6 root root 4096 Jun 29 14:58 root
drwxr-xr-x 2 root root 4096 Jun 29 14:16 rootfs
drwxr-xr-x 9 root root 4096 Jun 29 14:17 run
drwxr-xr-x 2 root root 4096 Jun 29 14:58 sbin
drwxr-xr-x 2 root root 4096 Jul 29 2014 srv
drwxr-xr-x 2 root root 4096 Mar 13 2014 sys
drwxrwxrwt 2 root root 4096 Jun 30 09:17 tmp
drwxr-xr-x 10 root root 4096 Jul 29 2014 usr
drwxr-xr-x 12 root root 4096 Jun 15 12:38 var
root@jenk-heat-350-node1:/var/lib/lxc#

Previously, the rootfs would have been in /var/lib/lxc/<container>/rootfs.

This new behaviour is quite messy as it's going to become difficult to determine what files are LXC configuration versus files within the rootfs.

Changed in openstack-ansible:
status: Triaged → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (kilo)

Reviewed: https://review.openstack.org/197074
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=6a7a2ffbd1b2becbf2ebd3f41c37e1365d53cee9
Submitter: Jenkins
Branch: kilo

commit 6a7a2ffbd1b2becbf2ebd3f41c37e1365d53cee9
Author: Matt Thompson <email address hidden>
Date: Tue Jun 30 13:57:57 2015 +0100

    Create LXC containers with a rootfs dir

    Previously, an LXC container's rootfs was being placed into
    /var/lib/lxc/<container>/rootfs. Commit
    https://review.openstack.org/#/c/190048/8 inadvertently changed this so
    that a container's rootfs is now placed into /var/lib/lxc/<container/.
    The downside here is that we now have a directory containing a
    container's root fs and the LXC configuration for the container.

    This change creates a new role-level variable called
    lxc_container_rootfs_directory which defaults to
    "{{ lxc_container_directory }}/{{ container_name }}/rootfs" and passes
    this variable when creating the container.

    Change-Id: Ibbaa879166f5efaf7ca96add131cc3762dd88653
    Closes-Bug: #1470101
    (cherry picked from commit 04149af86b300bb90d5517afa6c54307e3c69baf)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.11

This issue was fixed in the openstack/openstack-ansible 11.2.11 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 11.2.12

This issue was fixed in the openstack/openstack-ansible 11.2.12 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.14

This issue was fixed in the openstack/openstack-ansible 11.2.14 release.

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.