Plugins are incorrectly updated

Bug #1626855 reported by Georgy Kibardin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Bulat Gaifullin
Mitaka
Fix Released
High
Bulat Gaifullin

Bug Description

1. Take a plugin with non empty tasks.yaml (detach-rabbitmq is a good option)
2. Install it on 9.0
3. Upgrade to 9.1
4. Empty tasks.yaml file
5. Bump a version, rebuild and update a plugin.
6. Try to enable the plugin.
Actual result: "Cannot enable a plugin with legacy tasks....."
Expected result: plugin is enabled successfully.

The reason is that nailgun doesn't update Plugin.tasks when tasks.yaml is empty (or contains empty list).

Revision history for this message
Georgy Kibardin (gkibardin) wrote :

The tasks field is only an example - the same would happens with other fields.

Changed in fuel:
importance: Undecided → High
status: New → Confirmed
tags: added: area-plugins area-python
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/375290

Revision history for this message
Georgy Kibardin (gkibardin) wrote :

Workarounds:
1. Uninstall/Install problematic plugin.
2. Manually update Plugins table (update plugins set tasks = "[]")

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: nobody → Fuel Toolbox (fuel-toolbox)
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: none → 10.0
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :
Changed in fuel:
assignee: Fuel Toolbox (fuel-toolbox) → Ilya Kutukov (ikutukov)
status: Confirmed → In Progress
status: In Progress → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in fuel:
assignee: Ilya Kutukov (ikutukov) → Bulat Gaifullin (bgaifullin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

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

commit c910f056a989f1c7c3149cb62d289dc974beb1c3
Author: Ilya Kutukov <email address hidden>
Date: Wed Aug 31 19:45:17 2016 +0300

    Empty fields processed correctly in plugin adapters

    Before this patch all empty but existing plugin metadata properties was
    removed from output as well as `tasks` field that was not respecting
    not null constraint at DB level.

    As a minor patch payload missing InvalidFileFormat error was added.

    Change-Id: I6a21e347fefb7a9a30be562b7fb3e4a8c5c61a36
    Partial-Bug: 1616722
    Closes-Bug: 1626855

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

Change abandoned by Georgy Kibardin (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/375290
Reason: Nobody likes this :(

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

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

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

Reviewed: https://review.openstack.org/378574
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=222dc9a335739b4f64eed8197993d86dabeeefeb
Submitter: Jenkins
Branch: stable/mitaka

commit 222dc9a335739b4f64eed8197993d86dabeeefeb
Author: Ilya Kutukov <email address hidden>
Date: Wed Aug 31 19:45:17 2016 +0300

    Empty fields processed correctly in plugin adapters

    Before this patch all empty but existing plugin metadata properties was
    removed from output as well as `tasks` field that was not respecting
    not null constraint at DB level.

    As a minor patch payload missing InvalidFileFormat error was added.

    Change-Id: I6a21e347fefb7a9a30be562b7fb3e4a8c5c61a36
    Partial-Bug: 1616722
    Closes-Bug: 1626855

Oleksandr (oivashchenko)
tags: added: on-verification
Oleksandr (oivashchenko)
tags: removed: on-verification
tags: added: on-verification
Revision history for this message
Alexey. Kalashnikov (akalashnikov) wrote :

Verified on 9.2 snapshot #514

tags: removed: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/fuel-web 10.0.0

This issue was fixed in the openstack/fuel-web 10.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-web (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/408300

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

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

commit daa2799ab49d6dd610ae3266b44a225b121c5ae1
Author: Evgeny L <email address hidden>
Date: Tue Dec 6 17:59:00 2016 +0000

    Set legacy tasks to empty if file is removed or empty

    During plugin synchronisation or plugin update, if legacy
    tasks (tasks.yaml) are removed, they should be set to empty
    value [] in the database.

    Closes-bug: #1648223
    Related-bug: #1626855
    Change-Id: I4c6a61eb6ac0bb4395b843c4ba7df5bcd8ab2f7b

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

Related fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/415269

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

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/415270

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

Reviewed: https://review.openstack.org/415269
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=293764c84c605f8a1f658e347feb6f2c9dafdffa
Submitter: Jenkins
Branch: stable/mitaka

commit 293764c84c605f8a1f658e347feb6f2c9dafdffa
Author: Evgeny L <email address hidden>
Date: Tue Dec 6 17:59:00 2016 +0000

    Set legacy tasks to empty if file is removed or empty

    During plugin synchronisation or plugin update, if legacy
    tasks (tasks.yaml) are removed, they should be set to empty
    value [] in the database.

    Closes-bug: #1648223
    Related-bug: #1626855
    Change-Id: I4c6a61eb6ac0bb4395b843c4ba7df5bcd8ab2f7b
    (cherry picked from commit daa2799ab49d6dd610ae3266b44a225b121c5ae1)

tags: added: in-stable-mitaka
tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-web (stable/newton)

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

commit 6c2167efc4c4f7caa423ee41345113f5a6d92d76
Author: Evgeny L <email address hidden>
Date: Tue Dec 6 17:59:00 2016 +0000

    Set legacy tasks to empty if file is removed or empty

    During plugin synchronisation or plugin update, if legacy
    tasks (tasks.yaml) are removed, they should be set to empty
    value [] in the database.

    Closes-bug: #1648223
    Related-bug: #1626855
    Change-Id: I4c6a61eb6ac0bb4395b843c4ba7df5bcd8ab2f7b
    (cherry picked from commit daa2799ab49d6dd610ae3266b44a225b121c5ae1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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