← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1411427] [NEW] Misconfiguration of OPENSTACK_API_VERSIONS is hard to debug

 

Public bug reported:

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.

** Affects: horizon
     Importance: Undecided
     Assignee: Gabriel Hurley (gabriel-hurley)
         Status: New

** Changed in: horizon
     Assignee: (unassigned) => Gabriel Hurley (gabriel-hurley)

** Changed in: horizon
    Milestone: None => kilo-2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1411427

Title:
  Misconfiguration of OPENSTACK_API_VERSIONS is hard to debug

Status in OpenStack Dashboard (Horizon):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1411427/+subscriptions


Follow ups

References