Module re-apply does not reflect updated values

Bug #1611525 reported by Peter Stachowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Peter Stachowski

Bug Description

If you apply a module, remove it, update the module (with a new name, for example) and apply it again, module-query will still show the old name.

Here's the output:

    > trove module-query myinst
    +-------+------+-----------+---------+--------+---------+------------------------+------------------------+
    | Name | Type | Datastore | Version | Status | Message | Created | Updated |
    +-------+------+-----------+---------+--------+---------+------------------------+------------------------+
    | mynod | ping | all | all | OK | my_msg | 2016-08-09 21:23:13.46 | 2016-08-09 21:23:13.46 |
    +-------+------+-----------+---------+--------+---------+------------------------+------------------------+
    > trove module-remove myinst mynod
    > trove module-query myinst
    +------+------+-----------+---------+--------+---------+---------+---------+
    | Name | Type | Datastore | Version | Status | Message | Created | Updated |
    +------+------+-----------+---------+--------+---------+---------+---------+
    +------+------+-----------+---------+--------+---------+---------+---------+
    > trove module-update mynod --name mymod
    +----------------------+--------------------------------------+
    | Property | Value |
    +----------------------+--------------------------------------+
    | apply_order | 5 |
    | auto_apply | 0 |
    | created | 2016-07-27T14:34:42 |
    | datastore | all |
    | datastore_id | None |
    | datastore_version | all |
    | datastore_version_id | None |
    | description | None |
    | id | 2e48894c-113d-4333-9ce3-92da10afeb01 |
    | is_admin | 1 |
    | live_update | 0 |
    | md5 | ae27d5ebdf04e018d75ee95dfc3feb3c |
    | name | mymod |
    | priority_apply | 0 |
    | tenant | 5b4dc51c7ce4471e97b739e0cfa61f3b |
    | tenant_id | 5b4dc51c7ce4471e97b739e0cfa61f3b |
    | type | ping |
    | updated | 2016-08-09T21:28:41 |
    | visible | 1 |
    +----------------------+--------------------------------------+
    > trove module-apply myinst mymod
    +-------+------+-----------+---------+--------+---------+
    | Name | Type | Datastore | Version | Status | Message |
    +-------+------+-----------+---------+--------+---------+
    | mynod | ping | all | all | OK | my_msg |
    +-------+------+-----------+---------+--------+---------+

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

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

Changed in trove:
assignee: nobody → Peter Stachowski (peterstac)
status: New → In Progress
Changed in trove:
importance: Undecided → Medium
milestone: none → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/353118
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=21f56bc75ce8212e97c9044b6b223bde30eda252
Submitter: Jenkins
Branch: master

commit 21f56bc75ce8212e97c9044b6b223bde30eda252
Author: Peter Stachowski <email address hidden>
Date: Tue Aug 9 17:39:37 2016 -0400

    Module re-apply does not reflect updated values

    If you apply a module, remove it, update the module with a new name,
    and apply it again, module-query will still show the old name.

    This also applies to datastore, datastore_version and type.

    All four attributes are now updated correctly and scenario
    tests added.

    When writing the scenario tests it became evident that resetting
    a module from a datastore to all_datastores was broken too,
    so this was fixed (along with all_datastore_versions). This
    fix required a change to the Trove client as well.

    Change-Id: Ic2e9226bcd31c4a79d84ecb7941a47875eabd73d
    Depends-On: I0f226f09db08f635c542b27d8d2f898050d327fa
    Closes-Bug: #1611525
    Closes-Bug: #1612430

Changed in trove:
status: In Progress → Fix Released
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.