Disallow updating baymodel when it is referenced

Bug #1517259 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
HouMing Wang

Bug Description

It is very dangerous to update a baymodel when it is referenced by bay(s). Consider the following workflow as an example:

$ magnum baymodel-create --name k8sbaymodel \
                       --image-id fedora-21-atomic-5 \
                       --keypair-id testkey \
                       --external-network-id public \
                       --dns-nameserver 8.8.8.8 \
                       --flavor-id m1.small \
                       --docker-volume-size 5 \
                       --network-driver flannel \
                       --coe kubernetes
$ magnum bay-create --name k8sbay --baymodel k8sbaymodel --node-count 1
$ magnum baymodel-update bccc2a4b-fa19-42c1-8327-6d2b026f6f9a replace coe=swarm

The COE changes after a bay is created. When the bay is updated, it will use a swarm templates to update a k8s bay which is bad.

We should disallow updating a baymodel if it is referenced by one or multiple bays.

Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
hongbin (hongbin034)
tags: added: low-hanging-fruit
Changed in magnum:
assignee: nobody → HouMing Wang (houming-wang)
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/266420

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/266420
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=aa5c392f0ab0604817ab6354a19d00b475ed9807
Submitter: Jenkins
Branch: master

commit aa5c392f0ab0604817ab6354a19d00b475ed9807
Author: houming-wang <email address hidden>
Date: Tue Jan 12 04:52:19 2016 -0500

    Disallow updating baymodel when it is referenced

    It is very dangerous to update a baymodel when it is referenced by
    bay(s). We should disallow updating a baymodel if it is referenced
    by one or multiple bays. A BayModelReferenced exception will be raised
    when do this action.

    DocImpact
    Closes-Bug: #1517259
    Change-Id: I6c6cd1eebbb6e1f4b5e1657d3909b1bc8d287a35

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 2.0.0

This issue was fixed in the openstack/magnum 2.0.0 release.

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.