Misconfiguration of OPENSTACK_API_VERSIONS is hard to debug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Low
|
Gabriel Hurley |
Bug Description
In local_settings.py we allow operators to specify the preferred API versions for their service endpoints. The values provided are then fed directly into a dict key lookup in the APIVersionManager code. Any misconfiguration here results in a KeyError which provides no guidance as to what an acceptable value might be.
Instead, we can:
1. Verify that the value provided is of the right type (currently all version keys are ints or floats, not strings as one might expect).
2. Provide a list of the keys which would be acceptable if an invalid key is provided.
3. Raise a useful and explanatory exception if these values are incorrect.
As a correlated issue, it also turns out that the way the metadata_defs panel checks for the Glance active version triggers an error since Glance (and other APIs for which only one version is supported) don't actually bother to declare their supported versions.
Changed in horizon: | |
assignee: | nobody → Gabriel Hurley (gabriel-hurley) |
milestone: | none → kilo-2 |
Changed in horizon: | |
importance: | Undecided → Low |
Changed in horizon: | |
milestone: | kilo-2 → kilo-3 |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | kilo-3 → 2015.1.0 |
Fix proposed to branch: master /review. openstack. org/147670
Review: https:/