Create missing directories before mounting them

When deploying with podman, we need to create directories if they don't
exist before trying to mount them later when containers are starting.
Otherwise, podman fails with this kind of error:
error checking path \"/etc/iscsi\": stat /etc/iscsi: no such file or directory"

Related-Bug: #1811713
Change-Id: I7dbdc7f3646dda99c8014b4c8ca2edd48778b392
(cherry picked from commit 24f5a255c9)
This commit is contained in:
Emilien Macchi 2018-08-23 12:28:46 -04:00 committed by Grzegorz Grasza
parent 82d0b03d23
commit 84beb53b79
4 changed files with 14 additions and 1 deletions

View File

@ -251,6 +251,10 @@ outputs:
file:
path: /etc/ceph
state: directory
- name: ensure /var/lib/glance exists
file:
path: /var/lib/glance
state: directory
upgrade_tasks:
- when: step|int == 0
tags: common

View File

@ -106,6 +106,10 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: ensure /etc/iscsi exists
file:
path: /etc/iscsi
state: directory
- name: stat /lib/systemd/system/iscsid.socket
stat: path=/lib/systemd/system/iscsid.socket
register: stat_iscsid_socket

View File

@ -124,7 +124,11 @@ outputs:
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
host_prep_tasks:
- name: create persistent directories
- name: create /var/lib/mistral directory
file:
path: /var/lib/mistral
state: directory
- name: create persistent logs directory
file:
path: "{{ item.path }}"
state: directory

View File

@ -446,6 +446,7 @@ outputs:
state: directory
with_items:
- /srv/node
- /var/cache/swift
- /var/log/swift
- /var/log/containers
- name: Set swift_use_local_disks fact