Support mode in named volumes when using podman
Volumes with a mode specifier were causing the container to fail to start with the error: "Wrong format of volume". ironic-dnsmasq was one services affected by this issue, but you could also hit this issue when using the volume customisation variables. Closes-Bug: #2054834 Change-Id: I848bd2838a17756f1c71b07befe1e3d966f5b6c2
This commit is contained in:
parent
ce3a6aff09
commit
9b3428c504
@ -176,6 +176,10 @@ class PodmanWorker(ContainerWorker):
|
|||||||
mounts.append(mount_item)
|
mounts.append(mount_item)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
mode = 'rw'
|
||||||
|
if item.count(':') == 2:
|
||||||
|
src, dest, mode = item.split(':')
|
||||||
|
else:
|
||||||
src, dest = item.split(':')
|
src, dest = item.split(':')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
self.module.fail_json(
|
self.module.fail_json(
|
||||||
@ -191,7 +195,7 @@ class PodmanWorker(ContainerWorker):
|
|||||||
else:
|
else:
|
||||||
filtered_volumes[src] = dict(
|
filtered_volumes[src] = dict(
|
||||||
bind=dest,
|
bind=dest,
|
||||||
mode='rw'
|
mode=mode
|
||||||
)
|
)
|
||||||
|
|
||||||
def parse_dimensions(self, dimensions):
|
def parse_dimensions(self, dimensions):
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue, when using podman, with named volumes that use a mode
|
||||||
|
specifier. See `LP#2054834
|
||||||
|
<https://bugs.launchpad.net/kolla-ansible/+bug/2054834>`_ for more details.
|
Loading…
Reference in New Issue
Block a user