errors.CannotUpdate exception doesn't exist

Bug #1508876 reported by Alexander Saprykin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Saprykin

Bug Description

In file nailgun/objects/node.py:447 code

                elif new_cluster_id != instance.cluster_id:
                    # changing node cluster to another
                    # (is currently not allowed)
                    raise errors.CannotUpdate(
                        u"Changing cluster on the fly is not allowed"
                    )

refers to exception that doesn't exist anywhere in the nailgun project.

Need to add this exception to

nailgun/errors/__init__.py

tags: added: module-nailgun
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Nailgun version: b09d472543c819bc5b4450f0709a30cc40eb6f7c (10/22/2015)

Changed in fuel:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 8.0
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Alexander Saprykin (cutwater)
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

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

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

commit 6fe73c5d57de5b5950dd388f1721a99a40c6a049
Author: Alexander Saprykin <email address hidden>
Date: Thu Oct 22 13:08:47 2015 +0200

    Add missing CannotUpdate exception

    * Add missing exception CannotUpdate
    * Add unit tests to verify that exception is called

    Closes-Bug: #1508876
    Change-Id: I9b69ac2bb683a01d5c55d11c9df2657ef23da2e8

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :

Verified on 361 by unittest

Also I suppose that it is impossible to change cluster_id without unassignment.

[root@nailgun ~]# fuel --env 4 nodes
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|------------|-------------------|-------|---------------|--------|---------
11 | discover | Untitled (80:61) | 4 | 10.109.0.4 | 64:9c:69:f4:80:61 | | controller | True | 5
[root@nailgun ~]# fuel --env 5 node set --node 11 --role controller
400 Client Error: Bad Request (Nodes with ids <nailgun.db.sqlalchemy.models.node.Node object at 0x5408190> already assigned to environments. Nodes must be unassigned before they can be assigned again.)

NodeAssignmentValidator error will be raised before "CannotUpdate".

Changed in fuel:
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.