user can do add operation when update a cluster

Bug #1509656 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Eli Qiao

Bug Description

currently seems we only support node_count when update cluster, I try add/replace , they are acted as same behavior.

so I can try this:

taget@taget-ThinkStation-P300:~/devstack$ magnum bay-list
+--------------------------------------+---------------+------------+--------------+-----------------+
| uuid | name | node_count | master_count | status |
+--------------------------------------+---------------+------------+--------------+-----------------+
| 71d00b0e-9325-4d5c-b6f5-0b644bd16023 | swarmbay-1 | 2 | 1 | UPDATE_COMPLETE |
| cac24024-13ab-4a24-b16d-19a8ad431afc | k8s-proxy-new | 1 | 1 | CREATE_COMPLETE |
+--------------------------------------+---------------+------------+--------------+-----------------+
taget@taget-ThinkStation-P300:~/devstack$ magnum --debug bay-update swarmbay-1 add node_count=1

seems we need to deny this operation.

if that attr has been exist, reminder user to use op=replace will make more sense.

Eli Qiao (taget-9)
Changed in magnum:
assignee: nobody → Eli Qiao (taget-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/239200
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=98371e52d4df78f7bbfcefc19bc323c076d6c3cf
Submitter: Jenkins
Branch: master

commit 98371e52d4df78f7bbfcefc19bc323c076d6c3cf
Author: Eli Qiao <email address hidden>
Date: Sun Oct 25 08:21:02 2015 +0800

    Raise exception when adding an existed attribute while update bay

    This patch raises a reasonable ClientSideError exception when adding
    an existed attribute while doing update bay.

    Besides, several apply_jsonpatch unit test cased added.
    Remove all related add_(existed) attr case of api side.

    Closes-Bug: #1509656
    Change-Id: Ifb0c8c7ca6cfe44481a436b9a8bbdb9143bb6d94

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → 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.