succeed to delete port and create port when node is active

Bug #1736373 reported by wangzhengwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
In Progress
High
wangzhengwei

Bug Description

When the ironic node is active,we can not update the port, but we can delete and create the port. Should we limit delete and create action?

Below is the failed update and the successful delete and create.

Steps to reproduce:

1. create a BM instance and the ironic node become active:
# openstack baremetal node list

+--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+
| fa3b601c-dcf4-46d9-a4dc-6c3432324c22 | VirtBM1 | 7fdddca0-b639-460a-8fbd-1edbdbdbf55d | power on | active | False |
+--------------------------------------+---------+--------------------------------------+-------------+--------------------+-------------+

2. show ironic port:
# openstack baremetal port show a77050ff-15c8-4edd-9009-4a3a15b1cf9b

+-----------------------+------------------------------------------------------------------+
| Field | Value |
+-----------------------+------------------------------------------------------------------+
| address | 52:54:00:16:36:d5 |
| created_at | 2017-12-05T09:31:08+00:00 |
| extra | {} |
| internal_info | {u'tenant_vif_port_id': u'a308ecb5-15eb-46c0-8c1f-026948b388d1'} |
| local_link_connection | {} |
| node_uuid | fa3b601c-dcf4-46d9-a4dc-6c3432324c22 |
| physical_network | None |
| portgroup_uuid | None |
| pxe_enabled | True |
| updated_at | 2017-12-05T09:50:17+00:00 |
| uuid | a77050ff-15c8-4edd-9009-4a3a15b1cf9b |
+-----------------------+------------------------------------------------------------------+

3. update ironic port, failed:

# openstack baremetal port set --address 52:54:00:16:36:d0 a77050ff-15c8-4edd-9009-4a3a15b1cf9b

Error contacting Ironic server: Cannot update hardware address for port a77050ff-15c8-4edd-9009-4a3a15b1cf9b as node fa3b601c-dcf4-46d9-a4dc-6c3432324c22 is active or has instance UUID assigned (HTTP 409). Attempt 6 of 6
Cannot update hardware address for port a77050ff-15c8-4edd-9009-4a3a15b1cf9b as node fa3b601c-dcf4-46d9-a4dc-6c3432324c22 is active or has instance UUID assigned (HTTP 409)

4. delete ironic port, successful:

# openstack baremetal port delete a77050ff-15c8-4edd-9009-4a3a15b1cf9b

Deleted port a77050ff-15c8-4edd-9009-4a3a15b1cf9b

5. create ironic port, successful:
# openstack baremetal port create --node fa3b601c-dcf4-46d9-a4dc-6c3432324c22 52:54:00:16:36:d5

+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| address | 52:54:00:16:36:d5 |
| created_at | 2017-12-05T10:07:44+00:00 |
| extra | {} |
| internal_info | {} |
| local_link_connection | {} |
| node_uuid | fa3b601c-dcf4-46d9-a4dc-6c3432324c22 |
| physical_network | None |
| portgroup_uuid | None |
| pxe_enabled | True |
| updated_at | None |
| uuid | 36369f3f-63f1-4f36-ab01-2637cfb3f784 |
+-----------------------+--------------------------------------+

Changed in ironic:
status: New → Confirmed
status: Confirmed → Triaged
assignee: nobody → wangzhengwei (wangsansui)
Changed in ironic:
importance: Undecided → High
Changed in ironic:
status: Triaged → New
Revision history for this message
wangzhengwei (wangsansui) wrote :

Update port action, only when the ironic node is active and maintenance is True, we can update the port.

But delete and create port action, we can do it at will.

Should we limit delete and create port action?

Limit delete and create port action, only when the node is active and maintenance is True, we can do it.

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/526831

Changed in ironic:
status: New → In Progress
Revision history for this message
Julia Kreger (juliaashleykreger) wrote :

Greetings, I've added this to the weekly meeting agenda, and it should be discussed in the ironic team meeting on December 11th.

Revision history for this message
Ruby Loo (rloo) wrote :

Looks like we discussed in ironic team meeting [1], but I honestly don't know what was decided :-(

[1] http://eavesdrop.openstack.org/meetings/ironic/2017/ironic.2017-12-11-17.00.log.html#l-229

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Riccardo Pittau (<email address hidden>) on branch: master
Review: https://review.opendev.org/526831
Reason: obsolete

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.