DB-API allows changing UUID for Node, Chassis and Port

Bug #1333683 reported by Dmitry Tantsur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Dmitry Tantsur

Bug Description

DB-API allows changing UUID for Node, Chassis and Port. There is even a unit test on changing a Chassis UUID. I think it's a vague "feature", because users will expect UUID to be kind of primary key (we don't disclose real pkey) and won't expect them to change. DB-API should explicitly forbid this behavior, raising InvalidParameterError.

Not impact on end user features, as it's impossible to change UUID via client.

Tags: db
Dmitry Tantsur (divius)
summary: - Database level code allows changing UUID for Node, Chassis and Port
+ Database API level code allows changing UUID for Node, Chassis and Port
description: updated
Dmitry Tantsur (divius)
summary: - Database API level code allows changing UUID for Node, Chassis and Port
+ DB-API allows changing UUID for Node, Chassis and Port
description: updated
Revision history for this message
Dmitry Tantsur (divius) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit b955aa685c1000d192d1443f9a3971b44a764a77
Author: Dmitry Tantsur <email address hidden>
Date: Tue Jun 24 15:18:13 2014 +0200

    Prevent updating UUID of Node, Port and Chassis on DB API level

    UUID is seen as something similar to pkey and is not expected
    to be updated after creation.
    This patch makes update_{node,chassis,port} raise InvalidParameterValue,
    if 'uuid' field is passed in.

    Closes-Bug: #1333683
    Change-Id: I7312036a5144cebe3da7f033f73e881e79e8a2ca

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