plugin role attribute has_primary:true is not recognized

Bug #1655264 reported by Illia Polliul
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Alexander Kislitsky
Mitaka
Fix Released
High
Alexander Kislitsky
Newton
Fix Committed
High
Alexander Kislitsky

Bug Description

In our plugin there's a role `contrail-controller` with `has_primary: true`, but in the env with one such node it turned to be non-primary:

root@node-1:~# hiera roles
[”contrail-controller”]

This breaks task execution ordering.

Logs snapshot is downloading, will attach when available.

Illia Polliul (ipolliul)
description: updated
Changed in fuel:
assignee: nobody → Fuel for Openstack (fuel)
description: updated
description: updated
Changed in fuel:
assignee: Fuel for Openstack (fuel) → Fuel Sustaining (fuel-sustaining-team)
Revision history for this message
Illia Polliul (ipolliul) wrote :

here is a link to log snapshot https://drive.google.com/file/d/0BzdcP1_NuusEeGdlRndNUE82Ylk/view?usp=sharing

only one plugin in the env: contrail
version of the plugin 5.0.0

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin)
Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

We are checked the problem env and there was wierd data in the DB. In plugins.roles_metadadata there wasn't 'tags' for roles, but this data is added by migration for existed plugins: https://github.com/openstack/fuel-web/blob/stable/mitaka/nailgun/nailgun/db/migration/alembic_migrations/versions/fuel_9_2.py#L805. I've improved migration test for this case: https://review.openstack.org/#/c/418473/

For the new plugins 'tags' data added to the plugins.roles_metadata by: https://github.com/openstack/fuel-web/blob/stable/mitaka/nailgun/nailgun/objects/plugin.py#L84

On the problem env we have no 'tags' in the plugins.roles_metadata, but last DB migration is applied accordingly to the data in the alembic_migrations table.

After removing/installing the plugin primary_tags were set correctlly.

It is unable to reproduce the bug without detailed steps to reproduce. Marking the bug as Incomplete.

Changed in fuel:
status: Confirmed → Incomplete
Changed in fuel:
assignee: Georgy Kibardin (gkibardin) → Alexander Kislitsky (akislitsky)
importance: Critical → High
Changed in fuel:
status: Incomplete → In Progress
Revision history for this message
Alexander Kislitsky (akislitsky) wrote :

The reason of inconsistent data in the DB - bug in the plugins synchronisation. When plugin is synced, roles_metadata is just rewritten without tags info.

Changed in fuel:
milestone: 9.2 → 11.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/418982

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/418983

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

Reviewed: https://review.openstack.org/418473
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=6b4d6acac1b9358c74a2706e9fdedf81b4c50e61
Submitter: Jenkins
Branch: master

commit 6b4d6acac1b9358c74a2706e9fdedf81b4c50e61
Author: Alexander Kislitsky <email address hidden>
Date: Tue Jan 10 17:59:33 2017 +0300

    Tags info calculation is supported on plugins update

    For instance we made plugins sync operation. In this case
    tags info should be processed on the same way as on plugin
    creation.
    Also test for tags metadata migration improved.

    Change-Id: I937bb581f61034d027b28a8e4fd5b42a35fcd7f6
    Closes-Bug: #1655264

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/mitaka)

Reviewed: https://review.openstack.org/418982
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=3850bba4832916938419f4d499b023ce6e59e1be
Submitter: Jenkins
Branch: stable/mitaka

commit 3850bba4832916938419f4d499b023ce6e59e1be
Author: Alexander Kislitsky <email address hidden>
Date: Wed Jan 11 17:40:58 2017 +0300

    Tags info calculation is supported on plugins update

    For instance we made plugins sync operation. In this case
    tags info should be processed on the same way as on plugin
    creation.
    Also test for tags metadata migration improved.

    Change-Id: I2eebc40af3c3f360e2ef96958a38c7eae0da43d5
    Closes-Bug: #1655264

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/newton)

Reviewed: https://review.openstack.org/418983
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=baa107f31873624e98da76a85dd6a60205899050
Submitter: Jenkins
Branch: stable/newton

commit baa107f31873624e98da76a85dd6a60205899050
Author: Alexander Kislitsky <email address hidden>
Date: Tue Jan 10 17:59:33 2017 +0300

    Tags info calculation is supported on plugins update

    For instance we made plugins sync operation. In this case
    tags info should be processed on the same way as on plugin
    creation.
    Also test for tags metadata migration improved.

    Change-Id: I937bb581f61034d027b28a8e4fd5b42a35fcd7f6
    Closes-Bug: #1655264

tags: added: hard-to-verify
Revision history for this message
Yevgeniy (yshapovalov) wrote :

verified for mos9.2 with contrail plugin 5.0.1

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-web 11.0.0.0rc1

This issue was fixed in the openstack/fuel-web 11.0.0.0rc1 release candidate.

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.