diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 95fbced5e12..91886fff93d 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -83,7 +83,9 @@ volume_opts = [ help='Method used to wipe old volumes'), cfg.IntOpt('volume_clear_size', default=0, - help='Size in MiB to wipe at start of old volumes. 0 => all'), + max=1024, + help='Size in MiB to wipe at start of old volumes. 1024 MiB' + 'at max. 0 => all'), cfg.StrOpt('volume_clear_ionice', help='The flag to pass to ionice to alter the i/o priority ' 'of the process used to zero a volume after deletion, ' diff --git a/releasenotes/notes/reject-volume_clear_size-settings-larger-than-1024MiB-30b38811da048948.yaml b/releasenotes/notes/reject-volume_clear_size-settings-larger-than-1024MiB-30b38811da048948.yaml new file mode 100644 index 00000000000..9ad9eac8651 --- /dev/null +++ b/releasenotes/notes/reject-volume_clear_size-settings-larger-than-1024MiB-30b38811da048948.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Fix 'No Space left' of dd command when users set the config item + volume_clear_size to larger value than a size of a volume.