Add minimum value in maximum_instance_delete_attempts
Add minimum value 1 in the maximum_instance_delete_attempts option. Change-Id: Ic2ce1973971a6827f1a7d00c8c054b6561ab7e72
This commit is contained in:
parent
bcc4d233ef
commit
25477e6771
nova
releasenotes/notes
@ -8138,14 +8138,6 @@ class ComputeManager(manager.Manager):
|
|||||||
context, filters, expected_attrs=attrs, use_slave=True)
|
context, filters, expected_attrs=attrs, use_slave=True)
|
||||||
LOG.debug('There are %d instances to clean', len(instances))
|
LOG.debug('There are %d instances to clean', len(instances))
|
||||||
|
|
||||||
# TODO(raj_singh): Remove this if condition when min value is
|
|
||||||
# introduced to "maximum_instance_delete_attempts" cfg option.
|
|
||||||
if CONF.maximum_instance_delete_attempts < 1:
|
|
||||||
LOG.warning('Future versions of Nova will restrict the '
|
|
||||||
'"maximum_instance_delete_attempts" config option '
|
|
||||||
'to values >=1. Update your configuration file to '
|
|
||||||
'mitigate future upgrade issues.')
|
|
||||||
|
|
||||||
for instance in instances:
|
for instance in instances:
|
||||||
attempts = int(instance.system_metadata.get('clean_attempts', '0'))
|
attempts = int(instance.system_metadata.get('clean_attempts', '0'))
|
||||||
LOG.debug('Instance has had %(attempts)s of %(max)s '
|
LOG.debug('Instance has had %(attempts)s of %(max)s '
|
||||||
|
@ -1230,9 +1230,9 @@ Related options:
|
|||||||
]
|
]
|
||||||
|
|
||||||
instance_cleaning_opts = [
|
instance_cleaning_opts = [
|
||||||
# TODO(macsz): add min=1 flag in P development cycle
|
|
||||||
cfg.IntOpt('maximum_instance_delete_attempts',
|
cfg.IntOpt('maximum_instance_delete_attempts',
|
||||||
default=5,
|
default=5,
|
||||||
|
min=1,
|
||||||
help="""
|
help="""
|
||||||
The number of times to attempt to reap an instance's files.
|
The number of times to attempt to reap an instance's files.
|
||||||
|
|
||||||
@ -1242,8 +1242,6 @@ that can be made.
|
|||||||
Possible values:
|
Possible values:
|
||||||
|
|
||||||
* Any positive integer defines how many attempts are made.
|
* Any positive integer defines how many attempts are made.
|
||||||
* Any value <=0 means no delete attempts occur, but you should use
|
|
||||||
``instance_delete_interval`` to disable the delete attempts.
|
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|
|
||||||
|
5
releasenotes/notes/maximum_instance_delete_attempts-option-force-minimum-value-2ce74351650e7b21.yaml
Normal file
5
releasenotes/notes/maximum_instance_delete_attempts-option-force-minimum-value-2ce74351650e7b21.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- The ``maximum_instance_delete_attempts`` configuration option has been
|
||||||
|
restricted by the minimum value and now raises a ValueError
|
||||||
|
if the value is less than 1.
|
Loading…
x
Reference in New Issue
Block a user