[openstack-dev] [devstack][zuul] About devstack plugin orders and the log to contain the running local.conf

James E. Blair corvus at inaugust.com
Mon Oct 30 15:12:44 UTC 2017

"gong_ys2004" <gong_ys2004 at aliyun.com> writes:

> Hi, everyone
> I am trying to migrate tacker's functional CI job into new zuul v3 framework, but it seems:
> 1. the devstack plugin order is not the one I specified in the .zuull.yaml
> https://review.openstack.org/#/c/516004/4/.zuul.yaml:I have:      devstack_plugins:
>         heat: https://git.openstack.org/openstack/heat
>         networking-sfc:  https://git.openstack.org/openstack/networking-sfc
>         aodh: https://git.openstack.org/openstack/aodh
>         ceilometer: https://git.openstack.org/openstack/ceilometer
>         barbican: https://git.openstack.org/openstack/barbican
>         mistral: https://git.openstack.org/openstack/mistral
>         tacker: https://git.openstack.org/openstack/tacker
> but the running order seems:http://logs.openstack.org/04/516004/4/check/tacker-functional-devstack/f365f21/job-output.txt.gz:
> local plugins=,ceilometer,aodh,mistral,networking-sfc,heat,tacker,barbican
> I need barbican to start before tacker.

[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:

      enabled: true
      url: https://git.openstack.org/openstack/barbican
      branch: testing
      enabled: true
      url: https://git.openstack.org/openstack/tacker
        barbican: true

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.


More information about the OpenStack-dev mailing list