plugin_requires doens't work on networking-baremetal

Bug #1809016 reported by Iury Gregory Melo Ferreira
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
devstack
Fix Released
High
Dr. Jens Harbott

Bug Description

In Ironic while trying to move networking-baremetal to use zuulv3 [1] we have found a problem with the order that the plugins are added to the local_conf for devstack.

The correct order for plugins would be the one described below:
enable_plugin ironic git://git.openstack.org/openstack/ironic
enable_plugin networking-generic-switch git://git.openstack.org/openstack/networking-generic-switch
enable_plugin networking-baremetal git://git.openstack.org/openstack/networking-baremetal

We tried to use the plugin_requires[2] functionality to test on the OpenStack Gate in another patch since it would allow [3] but the order still the same (alphabetical order) in the generated local_conf [4]

An example of local_conf that works can be found in [5]
To set up a standalone devstack follow the steps below:
1- git clone https://git.openstack.org/openstack-dev/devstack.git devstack
2- sudo ./devstack/tools/create-stack-user.sh
3- sudo su - stack
4- git clone https://git.openstack.org/openstack-dev/devstack.git devstack
5- git clone https://git.openstack.org/openstack/ironic-tempest-plugin

[1] https://review.openstack.org/#/c/614026
[2] https://docs.openstack.org/devstack/latest/plugins.html#plugin-interface
[3] https://review.openstack.org/#/c/625211/
[4] http://logs.openstack.org/11/625211/9/check/networking-baremetal-dsvm-multitenant-vlans-python2/fc1bcc6/controller/logs/local_conf.txt
[5] http://paste.openstack.org/show/737589/

description: updated
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

There is a bug in the ordering code that is triggered when the plugin name contains a hyphen (or any non-letter in fact).

There are further bugs in that the testing is incomplete and the docs need updating. Working on a fix for all of these now.

Changed in devstack:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dr. Jens Harbott (j-harbott)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/626169

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/626169
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=0b855007f8d44662ad4fd52bda7df85f94b241c2
Submitter: Zuul
Branch: master

commit 0b855007f8d44662ad4fd52bda7df85f94b241c2
Author: Jens Harbott <email address hidden>
Date: Wed Dec 19 12:20:51 2018 +0000

    Allow plugin names to contain non-letter characters

    There are already devstack plugins that contain a hyphen in the name,
    like `networking-baremetal`. In order to allow ordering for these to
    work properly, amend the regexes we are using to match any
    non-whitespace characters instead of only alphanumerics.

    Amend the test to cover this use case.

    Change-Id: I91093a424f8d5e8007f140083e1ea36a81fe849f
    Closes-Bug: 1809016

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/673421

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/673426

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.opendev.org/673431

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/rocky)

Reviewed: https://review.opendev.org/673421
Committed: https://git.openstack.org/cgit/openstack/devstack/commit/?id=03d90d452c5b44d89733f247a7cd322b1f9bb22c
Submitter: Zuul
Branch: stable/rocky

commit 03d90d452c5b44d89733f247a7cd322b1f9bb22c
Author: Jens Harbott <email address hidden>
Date: Wed Dec 19 12:20:51 2018 +0000

    Allow plugin names to contain non-letter characters

    There are already devstack plugins that contain a hyphen in the name,
    like `networking-baremetal`. In order to allow ordering for these to
    work properly, amend the regexes we are using to match any
    non-whitespace characters instead of only alphanumerics.

    Amend the test to cover this use case.

    Change-Id: I91093a424f8d5e8007f140083e1ea36a81fe849f
    Closes-Bug: 1809016
    (cherry picked from commit 0b855007f8d44662ad4fd52bda7df85f94b241c2)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/queens)

Reviewed: https://review.opendev.org/673426
Committed: https://git.openstack.org/cgit/openstack/devstack/commit/?id=b80c66e730d120e1988d1e09a7cbf9aadb3f959d
Submitter: Zuul
Branch: stable/queens

commit b80c66e730d120e1988d1e09a7cbf9aadb3f959d
Author: Jens Harbott <email address hidden>
Date: Wed Dec 19 12:20:51 2018 +0000

    Allow plugin names to contain non-letter characters

    There are already devstack plugins that contain a hyphen in the name,
    like `networking-baremetal`. In order to allow ordering for these to
    work properly, amend the regexes we are using to match any
    non-whitespace characters instead of only alphanumerics.

    Amend the test to cover this use case.

    Change-Id: I91093a424f8d5e8007f140083e1ea36a81fe849f
    Closes-Bug: 1809016
    (cherry picked from commit 0b855007f8d44662ad4fd52bda7df85f94b241c2)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/pike)

Reviewed: https://review.opendev.org/673431
Committed: https://git.openstack.org/cgit/openstack/devstack/commit/?id=ab661a25f11cf6818da94d5e1db31a6023e9ac59
Submitter: Zuul
Branch: stable/pike

commit ab661a25f11cf6818da94d5e1db31a6023e9ac59
Author: Jens Harbott <email address hidden>
Date: Wed Dec 19 12:20:51 2018 +0000

    Allow plugin names to contain non-letter characters

    There are already devstack plugins that contain a hyphen in the name,
    like `networking-baremetal`. In order to allow ordering for these to
    work properly, amend the regexes we are using to match any
    non-whitespace characters instead of only alphanumerics.

    Amend the test to cover this use case.

    Change-Id: I91093a424f8d5e8007f140083e1ea36a81fe849f
    Closes-Bug: 1809016
    (cherry picked from commit 0b855007f8d44662ad4fd52bda7df85f94b241c2)

tags: added: in-stable-pike
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.