Wrong message when preventing instance_uuid to be overwritten

Bug #1308144 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Lucas Alvares Gomes

Bug Description

When the node already has an instance_uuid associated with it, there's a code in the db/sqlalchemy/api that would prevent it to be overwritten[1], the check is fine, but the message it's returning is wrong.

E.g

A node associated with the instance_uuid: ada550e7-62b6-4f49-aadf-478c261c71d4

When I tried to replace it with another instance: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa, the message returned was saying that the node is associated with the new instance value, which is wrong, it should be the other way around.

ironic node-update $NODE add instance_uuid=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
Node 367a50a3-9adf-4566-8843-1795024d2f5a is associated with instance aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa.

LOGS: http://paste.openstack.org/show/75793/

[1] https://github.com/openstack/ironic/blob/master/ironic/db/sqlalchemy/api.py#L372-L375

Changed in ironic:
importance: Undecided → Low
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/87731
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=209217eb68d1b6880dda71f1df3367ef8f2bcdfc
Submitter: Jenkins
Branch: master

commit 209217eb68d1b6880dda71f1df3367ef8f2bcdfc
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Apr 15 17:36:23 2014 +0100

    Fix message preventing overwrite the instance_uuid

    If a node already has an instance associated with it, we prevent
    the instance_uuid from being updated (one should tear-down the node
    first). When trying to update the instance_uuid the message returned
    was saying that the node was associated with the new instance value,
    this patch fix the message to return the current instance_uuid associated
    with the node.

    Change-Id: Ib8ab6c96b28b49b6259a95e82c83c5fbdeba5f91
    Closes-Bug: #1308144

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-1 → 2014.2
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.