From 323523b95aad4d43b7d392b4853fd1b73106bc5e Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 26 Aug 2015 01:18:23 -0700 Subject: [PATCH] Install lvm in Cinder from-source containers lvm is required to integrate with Cinder with local storage. Since local storage is an operation we support, we need this package whether or not we keep udev sync disabled. Tested all variants of centos+ubuntu+binary+source in template and dockerfile format. Change-Id: Icaeb2eeb588816d2f8a4b57f35fd43ddc56ff269 Partially-Implements: blueprint gate-source-builds --- docker/centos/source/cinder/cinder-base/Dockerfile | 4 +++- docker_templates/cinder/cinder-base/Dockerfile.j2 | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docker/centos/source/cinder/cinder-base/Dockerfile b/docker/centos/source/cinder/cinder-base/Dockerfile index b9486d6b63..209895b17a 100644 --- a/docker/centos/source/cinder/cinder-base/Dockerfile +++ b/docker/centos/source/cinder/cinder-base/Dockerfile @@ -4,7 +4,9 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./cinder.tar / RUN ln -s /cinder-* /cinder -RUN cd /cinder \ +RUN yum -y install lvm2 \ + && yum clean all \ + && cd /cinder \ && useradd --user-group cinder \ && pip install -r requirements.txt \ && pip install /cinder \ diff --git a/docker_templates/cinder/cinder-base/Dockerfile.j2 b/docker_templates/cinder/cinder-base/Dockerfile.j2 index e0ed18acbd..34d72b6e1b 100644 --- a/docker_templates/cinder/cinder-base/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-base/Dockerfile.j2 @@ -6,6 +6,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-cinder \ python-automaton \ + lvm2 \ && yum clean all \ && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf @@ -20,6 +21,17 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install lvm2 \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends lvm2 \ + && apt-get clean + + {% endif %} ADD ./cinder.tar / RUN ln -s /cinder-* /cinder