summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Komawar <nik.komawar@gmail.com>2016-09-02 14:32:27 -0400
committerNikhil Komawar <nik.komawar@gmail.com>2016-09-06 14:46:27 -0400
commit6eecd21170eac3c059cbe56daad23aa3844387ee (patch)
treee7012c770e09739336f79a39a0151fbda826c8df
parentb5833a87236183444589f3f93fba8641eb6c520a (diff)
downloadglance_store-6eecd21170eac3c059cbe56daad23aa3844387ee.tar.gz
Reason to return sorted list of drivers for opts
This commit adds a note specifying the reason for returning the sorted list of opts, this was missed in change I3146b8597a5d89da49b84d6653edacc3067c2c71. The addition is being done in a private method and we don't have unit tests for those. Having a note in place will ensure no regressions. Co-Authored-By: Nikhil Komawar <nik.komawar@gmail.com> Co-Authored-By: Hemanth Makkapati <hemanth.makkapati@rackspace.com> Change-Id: I4d9563166f8d81098d4d3d57ced7d7a63a6c01df Related-Bug: 1619487
-rw-r--r--glance_store/backend.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/glance_store/backend.py b/glance_store/backend.py
index e06f234..1948161 100644
--- a/glance_store/backend.py
+++ b/glance_store/backend.py
@@ -132,6 +132,12 @@ def _list_opts():
driver_opts = []
mgr = extension.ExtensionManager('glance_store.drivers')
# NOTE(zhiyan): Handle available drivers entry_points provided
+ # NOTE(nikhil): Return a sorted list of drivers to ensure that the sample
+ # configuration files generated by oslo config generator retain the order
+ # in which the config opts appear across different runs. If this order of
+ # config opts is not preserved, some downstream packagers may see a long
+ # diff of the changes though not relevant as only order has changed. See
+ # some more details at bug 1619487.
drivers = sorted([ext.name for ext in mgr])
handled_drivers = [] # Used to handle backwards-compatible entries
for store_entry in drivers: