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
This commit is contained in:
Chao Guo 2017-02-21 17:17:39 +08:00
parent 225b1a1dbb
commit 03ddc1be8e

View File

@ -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