node.instance_uuid can not be replaced by JSON PATCH "add" operator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Triaged
|
Low
|
Unassigned |
Bug Description
The RFC for a JSON PATCH operation specifies that the "add" operator should also replace existing values. This works for most of Ironic's API. However, it is prevented from working on the node.instance_uuid property by this section in db.sqlalchemy.api
https:/
def update_node(self, node_id, values):
...
# Prevent instance_uuid overwriting
if values.
The reason for this is clear: prevent a race whereby two nova-compute agents might try to associate the same node to different Nova instances, by serializing this process at Ironic's database (on a per-node level, not globally).
However, this is not obvious from the API itself, or from our API documentation.
We should document that the node.instance_uuid property does not adhere to the JSON PATCH RFC spec.
Changed in ironic: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in ironic: | |
assignee: | nobody → Anusha (anusha-iiitm) |
Changed in ironic: | |
assignee: | Anusha (anusha-iiitm) → nobody |
Changed in ironic: | |
assignee: | nobody → Polly Zhou (polly-zhou) |
Changed in ironic: | |
assignee: | Polly Zhou (polly-zhou) → nobody |
tags: | added: documentation low-hanging-fruit |