rcbops / ansible-lxc-rpc

Ansible Playbooks to deploy openstack
https://rcbops.github.io/ansible-lxc-rpc/
Apache License 2.0
38 stars 31 forks source link

Enable user to specify cinder volume container size #662

Closed hughsaunders closed 9 years ago

hughsaunders commented 9 years ago

Cinder requires temporary working space to convert images. This patch exposes cinder_volume_lv_size_gb to the user config file, so the user can decide how large the cinder volumes container should be based on available space and the size of images that will need to be converted.

cinder_volume_lv_size_gb is used to override container_lvm_fssize in group_vars/cinder_volume. Simple enough but doesn't work because templated variables (or indirect variables) are not expanded when accessed via hostvars[] see: https://github.com/ansible/ansible/issues/7844. In order to work around that, I have eliminated hostvars[] usage from the container creation mechanism. This may have positive speed implications as the limit of container creation parallelism is now forks rather than number of hosts. However it does make this change larger than a small bug fix.

Also note that this patch makes use of delegate_to, so specific ansible versions must be used to avoid https://github.com/ansible/ansible/issues/8705. Our requirements file currently specifies a version before this bug was introduced.

There are two commits in this PR as one is the actual bugfix, the other is infrastructure changes required for that bugfix to work. Also only the bugfix may be needed if the upstream bugs are fixed.

Related: #166

cloudnull commented 9 years ago

This gate job failed for other spectacular reasons not due to the container build process. This should be merged.

dolph commented 9 years ago

Moved to:

https://review.openstack.org/139241 https://review.openstack.org/139242