doc: setting [compute]max_disk_devices_to_attach = 0 prevents instances from booting

Bug #1897950 reported by melanie witt on 2020-09-30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
melanie witt
Stephen Finucane
Stephen Finucane
Stephen Finucane

Bug Description

This is a bug to track the addition of a note to the config option help for [compute]max_disk_devices_to_attach. An issue was raised downstream [1] around the fact that setting this option to 0 will cause instances not to boot because they will be allowed 0 disk devices.

The CONF.max_disk_devices_to_attach option controls the maximum number
of disk devices allowed to attach to an instance. If it is set to 0, it
will literally allow no disk device for instances, preventing them from
being able to boot.

There doesn't appear to be any way to disallow particular values
in a oslo.config IntOpt other than the min/max values. Here we need the
min value to be -1 to represent unlimited. There is a 'choices' kwarg
available but that is only for enumerating valid values and we need to
allow any integer >= 1 as well. Finally, there doesn't seem to be a
good way to validate this option setting as -1 or >= 1 because it's a
nova-compute config option and our choices there are likely: prevent
nova-compute from starting because of value 0 or log a WARNING about
it, both of which seem like they might be overkill. So, highlighting
the behavior of value 0 in the documentation might be the best way to
handle the issue.


Changed in nova:
status: New → In Progress
melanie witt (melwitt) wrote :

I have updated the patch to raise InvalidConfiguration during nova-compute init_host based on seeing other usage of InvalidConfiguration around CPU pinning config validation.

tags: added: compute
melanie witt (melwitt) wrote :
Changed in nova:
status: In Progress → Fix Released
melanie witt (melwitt) wrote :
melanie witt (melwitt) wrote :
melanie witt (melwitt) wrote :

This issue was fixed in the openstack/nova 21.2.0 release.

This issue was fixed in the openstack/nova 22.2.0 release.

This issue was fixed in the openstack/nova 20.6.0 release.

This issue was fixed in the openstack/nova release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers