Fix size exceed of dd action when clearing a volume
This patch closes a bug that may result in "No space left" error of dd command. If user set the config item volume_clear_size to larger value than a size of a volume, the "dd" command will get "No space left" error when deleting the volume. This change rejects volume_clear_size settings that are larger than 1GiB, because there isn't really a reason to set that. That would be safer all-around. DocImpact Closes-Bug: #1588310 Change-Id: I690d62bc728c85c9795a87f84b52f1a14474933d
This commit is contained in:
parent
fa8201b7ce
commit
50e1f161fb
@ -83,7 +83,9 @@ volume_opts = [
|
|||||||
help='Method used to wipe old volumes'),
|
help='Method used to wipe old volumes'),
|
||||||
cfg.IntOpt('volume_clear_size',
|
cfg.IntOpt('volume_clear_size',
|
||||||
default=0,
|
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',
|
cfg.StrOpt('volume_clear_ionice',
|
||||||
help='The flag to pass to ionice to alter the i/o priority '
|
help='The flag to pass to ionice to alter the i/o priority '
|
||||||
'of the process used to zero a volume after deletion, '
|
'of the process used to zero a volume after deletion, '
|
||||||
|
@ -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.
|
Loading…
x
Reference in New Issue
Block a user