diff --git a/doc/source/user/index.rst b/doc/source/user/index.rst index 3195c9a508..a22b659dea 100644 --- a/doc/source/user/index.rst +++ b/doc/source/user/index.rst @@ -213,8 +213,9 @@ They are loosely grouped as: mandatory, infrastructure, COE specific. If specified, container images will be stored in a cinder volume of the specified size in GB. Each cluster node will have a volume attached of the above size. If not specified, images will be stored in the compute - instance's local disk. For the 'devicemapper' storage driver, the minimum - value is 3GB. For the 'overlay' storage driver, the minimum value is 1GB. + instance's local disk. For the 'devicemapper' storage driver, must specify + volume and the minimum value is 3GB. For the 'overlay' and 'overlay2' + storage driver, the minimum value is 1GB or None(no volume). This value can be overridden at cluster creation. --docker-storage-driver \ diff --git a/magnum/api/validation.py b/magnum/api/validation.py index a7c6a4f306..5c028e796d 100644 --- a/magnum/api/validation.py +++ b/magnum/api/validation.py @@ -205,11 +205,10 @@ def _enforce_volume_driver_types(cluster_template): def _enforce_volume_storage_size(cluster_template, cluster): volume_size = cluster.get('docker_volume_size') \ or cluster_template.get('docker_volume_size') - if not volume_size: - return storage_driver = cluster_template.get('docker_storage_driver') + if storage_driver == 'devicemapper': - if volume_size < 3: + if not volume_size or volume_size < 3: raise exception.InvalidParameterValue( 'docker volume size %s GB is not valid, ' 'expecting minimum value 3GB for %s storage '