"gong_ys2004" email@example.com writes:
[I changed the subject to replace the 'openstack' tag with 'devstack',
which is what I assume was intended.]
As Yatin Karel later notes, this is handled as a regular python
dictionary which means we process the keys in an indeterminate order.
I can think of a few ways we can address this:
1) Add dependency information to devstack plugins so that devstack
itself is able to work out the correct order. This is perhaps the ideal
solution from a user experience perspective, but perhaps the most
2) Add dependency information to the Ansible role so that it resolves
the order on its own. This is attractive because it solves a problem
that is unique to this Ansible role entirely within the role. However,
it means that new plugins would need to also update this role which is
in devstack itself, which partially defeats the purpose of plugins.
3) Add dependency information to devstack plugins, but rather than
having devstack resolve it, have the Ansible role which writes out the
local.conf read that information and resolve the order. This lets us
keep the actual information in plugins so we don't have to continually
update the role, but it lets us perform the processing in the role
(which is in Python) when writing the config file.
4) Alter Zuul's handling of this to an ordered dictionary. Then when
you specify a series of plugins, they would be processed in that order.
However, I'm not sure this works very well with Zuul job inheritance.
Imagine that a parent job enabled the barbican plugin, and a child job
enabled ceilometer, needed ceilometer to start before barbican. There
would be no way to express that.
5) Change the definition of the dictionary to encode ordering
information. Currently the dictionary schema is simply the name of the
plugin as the key, and either the contents of the "enable_plugin" line,
or "null" if the plugin should be disabled. We could alter it to be:
This option is very flexible, but makes using the jobs somewhat more
difficult because of the complexity of the data structure.
After considering all of those, I think I favor option 3, because we
should be able to implement it without too much difficulty, it will
improve things by providing a known and documented location for plugins
to specify dependencies, and once it is in place, we can still implement
option 1 later if we want, using the same declaration.