From 0c03889e4bc5236c841683762d46429310c0dee7 Mon Sep 17 00:00:00 2001 From: QiLiang Date: Fri, 28 Oct 2016 06:34:56 +0800 Subject: Fix glance images dir mount issue on centos/rhel JIRA: - The directory /var/lib/glance/images is not created on centos/rhel system, create it before fs mount. Change-Id: Iec070ad834d6a6206f11923088a73a8dcfe173f9 Signed-off-by: QiLiang --- .../ansible/openstack_mitaka_xenial/roles/glance/tasks/nfs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'deploy/adapters/ansible/openstack_mitaka_xenial/roles/glance') diff --git a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/glance/tasks/nfs.yml b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/glance/tasks/nfs.yml index deec81f8..9dc72e31 100644 --- a/deploy/adapters/ansible/openstack_mitaka_xenial/roles/glance/tasks/nfs.yml +++ b/deploy/adapters/ansible/openstack_mitaka_xenial/roles/glance/tasks/nfs.yml @@ -57,7 +57,8 @@ - name: mount image directory shell: | - mount -t nfs -onfsvers=3 {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images + mkdir -p /var/lib/glance/images + mount -t nfs -onfsvers=3 {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images sed -i '/\/var\/lib\/glance\/images/d' /etc/fstab #echo {{ ip_info.stdout_lines[0] }}:/opt/images /var/lib/glance/images/ nfs nfsvers=3 >> /etc/fstab when: mount_info.stdout.find('images') == -1 -- cgit 1.2.3-korg