lxc rootfs and cache location should be configurable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack-Ansible |
Fix Released
|
Low
|
Shu Shen | ||
Kilo |
Fix Released
|
Low
|
Shu Shen | ||
Trunk |
Fix Released
|
Low
|
Shu Shen |
Bug Description
This bug requests support of configurable lxc-cache and container rootfs folders.
LXC rootfs uses significant amount of disk space, about 800MB per container upon creation. Currently there is no way in the playbooks to specify an alternative location of the rootfs other than the lxc-create default that located under /var/lib/lxc folder.
On hosts where the partition holds /var folder is relatively small and there are storage capacity else where, being able to specify the rootfs folder is the only way to deploy on these hosts.
The request for configurable lxc-cache comes as a consequence of configurable rootfs because of how the lxc-cache works - the lxc-cache is hard-linked to container rootfs which assumes both are on the same file system. lxc-create will fail should the rootfs be located on a different partition from the cache.
Note on the implementation:
The underlying lxc-create template lxc-ubuntu as used by OSAD hard-code the lxc-cache to /var/cache/lxc. Arguably a change shall be requested to lxc upstream for lxc-ubuntu to allow configurable cache location. But until then we need patch lxc-ubuntu in the lxc-host playbook.
Changed in openstack-ansible: | |
status: | New → Confirmed |
importance: | Undecided → Low |
milestone: | none → 11.0.3 |
Changed in openstack-ansible: | |
assignee: | nobody → Shu Shen (shu-shen) |
Reviewed: https:/ /review. openstack. org/190048 /git.openstack. org/cgit/ stackforge/ os-ansible- deployment/ commit/ ?id=de2dc69641d 41f1a1e42dec437 4f708634af55a9
Committed: https:/
Submitter: Jenkins
Branch: master
commit de2dc69641d41f1 a1e42dec4374f70 8634af55a9
Author: Shu Shen <email address hidden>
Date: Wed Jun 10 05:40:56 2015 +0000
Configurable lxc cache and rootfs path
The rootfs of the containers use large disk space and is defaulted to
/var/lib/lxc. It's desirable to configure an alternative rootfs directory on a
partition with large enough free space to hold the rootfs.
The rootfs of a container is hard-linked to the lxc cache when created by lxc
templates. Therefore both have to reside on the same partition and the lxc
cache shall be configurable as well as the rootfs directory.
The lxc-ubuntu template is patched by lxc-host role to use the configured lxc
cache folder. This patch should be removed once the updated upstream lxc with
support of configuring the cache path goes mainstream.
To confgiure these parameters, set the following variables in global_overrides user_config. yml: directory, defaults to /var/lib/lxc cache_path, defaults to /var/cache/lxc
of openstack_
- lxc_container_
- lxc_container_
Closes-Bug: #1463905 5644750e0d70ce6 13265040176
Change-Id: I9ccf0c45e0a187