From 03ddc1be8eee1b2b43cef59a84b6b004f609873e Mon Sep 17 00:00:00 2001 From: Chao Guo <guochao@winhong.com> Date: Tue, 21 Feb 2017 17:17:39 +0800 Subject: [PATCH] Add empty volume item check in kolla_docker module A empty docker volume item will cause start_container to fail. This bug is not triggered in current kolla deployment scripts, but only if you pass a empty volume item to kolla_docker module. E.g. Using a if expression in items of volumes list while calling start_container. Like the one in start.yml of iscsi and cinder. Change-Id: I389246fb9650ab5304463e943459ecb68706167f --- ansible/library/kolla_docker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py index e41c9b740c..2c662c5d93 100644 --- a/ansible/library/kolla_docker.py +++ b/ansible/library/kolla_docker.py @@ -496,6 +496,9 @@ class DockerWorker(object): vol_dict = dict() for vol in volumes: + if len(vol) == 0: + continue + if ':' not in vol: vol_list.append(vol) continue