Bug 1365881 - Not able to update/replace the ironic node provisoning MAC address for a live instance
Summary: Not able to update/replace the ironic node provisoning MAC address for a live...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
medium
medium
Target Milestone: zstream
: 9.0 (Mitaka)
Assignee: Dmitry Tantsur
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-10 12:01 UTC by VIKRANT
Modified: 2022-08-10 09:58 UTC (History)
9 users (show)

Fixed In Version: openstack-ironic-5.1.3-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-15 13:16:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1611744 0 None None None 2016-08-10 12:15:17 UTC
OpenStack gerrit 354735 0 'None' MERGED Fix updating port MAC address for active nodes 2020-11-02 18:35:57 UTC
Red Hat Issue Tracker OSP-7733 0 None None None 2022-08-10 09:58:06 UTC
Red Hat Knowledge Base (Solution) 2489371 0 None None None 2016-08-11 05:43:51 UTC
Red Hat Product Errata RHBA-2017:3224 0 normal SHIPPED_LIVE openstack-ironic bug fix advisory 2017-11-15 18:16:38 UTC

Description VIKRANT 2016-08-10 12:01:46 UTC
Description of problem:
After system board replacement on overcloud node, MAC address of provisioning NIC got changed, tried to update the new MAC address on existing ironic-port after putting the ironic node in maintenance mode but no luck. 

Version-Release number of selected component (if applicable):
RHEL OSP 7
RHEL OSP 8

How reproducible:
Everytime.

Steps to Reproduce:
1. Setting the ironic node in maintenance mode.
~~~
[root@instack ~]# ironic node-set-maintenance 81749da2-7d34-4e0f8ceb-4f5cbb26158f True
[root@instack ~]# ironic node-list | grep -i '81749da2-7d34-4e0f-8ceb-4f5cbb26158f'
| 81749da2-7d34-4e0f-8ceb-4f5cbb26158f | None |
4781e6f9-0dfa-4f36-b915-4cf3d6e5524a | power on    | active            
| True        |
~~~

2. Checking the ironic port details.

~~~
[root@instack ~]# ironic port-list --detail | grep
'81749da2-7d34-4e0f-8ceb-4f5cbb26158f'
| cb5fd243-bd78-4522-b27e-0fa0be1e2dea | 00:1a:7a:f5:b5:53 |
2016-07-21T12:49:30+00:00 | {u'vif_port_id':
u'09eba91e-1360-4a16-84bc-382b8630bb89'} |
81749da2-7d34-4e0f-8ceb-4f5cbb26158f | 2016-08-10T09:08:52+00:00 |

[root@instack ~]# ironic port-show cb5fd243-bd78-4522-b27e-0fa0be1e2dea
+------------+-----------------------------------------------------------+
| Property   | Value                                                     |
+------------+-----------------------------------------------------------+
| node_uuid  | 81749da2-7d34-4e0f-8ceb-4f5cbb26158f                      |
| uuid       | cb5fd243-bd78-4522-b27e-0fa0be1e2dea                      |
| extra      | {u'vif_port_id': u'09eba91e-1360-4a16-84bc-382b8630bb89'} |
| created_at | 2016-07-21T12:49:30+00:00                                 |
| updated_at | 2016-08-10T09:08:52+00:00                                 |
| address    | 00:1a:7a:f5:b5:53                                         |
+------------+-----------------------------------------------------------+
~~~

3. Error coming on terminal while updating the MAC address. 

~~~
[root@instack ~]# ironic port-update
cb5fd243-bd78-4522-b27e-0fa0be1e2dea replace address=00:1a:7a:f5:b5:50
Update MAC address on port: 09eba91e-1360-4a16-84bc-382b8630bb89 failed.
(HTTP 500)
~~~

Call trace seen in /var/log/ironic/ironic-api.log

~~~
2016-08-10 10:11:09.909 4890 ERROR wsme.api [req-54c024e0-f46a-49a5-97df-2f04851b1ad3 ] Server-side error: "Update MAC address on port: 
09eba91e-1360-4a16-84bc-382b8630bb89 failed.
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 142, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/ironic/conductor/manager.py", line 1728, in update_port
    token=context.auth_token)

  File "/usr/lib/python2.7/site-packages/ironic/dhcp/neutron.py", line 145, in update_port_address
    raise exception.FailedToUpdateMacOnPort(port_id=port_id)

FailedToUpdateMacOnPort: Update MAC address on port: 09eba91e-1360-4a16-84bc-382b8630bb89 failed.
". Detail: 
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/wsmeext/pecan.py", line 84, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/ironic/api/controllers/v1/port.py", line 402, in patch
    pecan.request.context, rpc_port, topic)

  File "/usr/lib/python2.7/site-packages/ironic/conductor/rpcapi.py", line 435, in update_port
    return cctxt.call(context, 'update_port', port_obj=port_obj)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 158, in call
    retry=self.retry)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 90, in _send
    timeout=timeout, retry=retry)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 431, in send
    retry=retry)

  File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 422, in _send
    raise result

FailedToUpdateMacOnPort_Remote: Update MAC address on port: 09eba91e-1360-4a16-84bc-382b8630bb89 failed.
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 142, in inner
    return func(*args, **kwargs)

  File "/usr/lib/python2.7/site-packages/ironic/conductor/manager.py", line 1728, in update_port
    token=context.auth_token)

  File "/usr/lib/python2.7/site-packages/ironic/dhcp/neutron.py", line 145, in update_port_address
    raise exception.FailedToUpdateMacOnPort(port_id=port_id)

FailedToUpdateMacOnPort: Update MAC address on port: 09eba91e-1360-4a16-84bc-382b8630bb89 failed.
~~~


Actual results:
it's not allowing us to change the MAC address.

Expected results:
It should allow us to change the MAC address. 

Additional info:

as soon as we remove the binding from corresponding to neutron port. Able to update the MAC address without any issue. 

[root@instack ~]# neutron port-update
09eba91e-1360-4a16-84bc-382b8630bb89 --binding:host_id
Updated port: 09eba91e-1360-4a16-84bc-382b8630bb89

Checking the port status.

[root@instack ~]# ironic port-show cb5fd243-bd78-4522-b27e-0fa0be1e2dea
+------------+-----------------------------------------------------------+
| Property   | Value                                                     |
+------------+-----------------------------------------------------------+
| node_uuid  | 81749da2-7d34-4e0f-8ceb-4f5cbb26158f                      |
| uuid       | cb5fd243-bd78-4522-b27e-0fa0be1e2dea                      |
| extra      | {u'vif_port_id': u'09eba91e-1360-4a16-84bc-382b8630bb89'} |
| created_at | 2016-07-21T12:49:30+00:00                                 |
| updated_at | 2016-08-10T09:08:52+00:00                                 |
| address    | 00:1a:7a:f5:b5:53                                         |
+------------+-----------------------------------------------------------+

As neutron binding is removed hence we would be able to update the MAC
address now without deleting and creating the port.

[root@instack ~]# ironic port-update
cb5fd243-bd78-4522-b27e-0fa0be1e2dea replace address=00:1a:7a:f5:b5:50
+------------+-----------------------------------------------------------+
| Property   | Value                                                     |
+------------+-----------------------------------------------------------+
| node_uuid  | 81749da2-7d34-4e0f-8ceb-4f5cbb26158f                      |
| uuid       | cb5fd243-bd78-4522-b27e-0fa0be1e2dea                      |
| extra      | {u'vif_port_id': u'09eba91e-1360-4a16-84bc-382b8630bb89'} |
| created_at | 2016-07-21T12:49:30+00:00                                 |
| updated_at | 2016-08-10T14:16:13+00:00                                 |
| address    | 00:1a:7a:f5:b5:50                                         |
+------------+-----------------------------------------------------------+

Comment 2 Dmitry Tantsur 2016-08-11 11:34:30 UTC
The patch is on review upstream.

Comment 3 Dmitry Tantsur 2016-08-12 14:07:12 UTC
The patch https://review.openstack.org/#/c/353450/ merged into master (OSP10) and will probably get backported upstream into OSP9. If you need other versions, please clone this bug and target to an appropriate version (incl. flags).

Comment 6 Dmitry Tantsur 2017-04-25 09:36:51 UTC
This was merged to stable/mitaka months ago. Jon, any ideas why it's still not in puddles?

Comment 9 Jon Schlueter 2017-10-20 12:01:03 UTC
mitaka eol-tag 5.1.3 includes this fix, rebasing based on request from Dmitry Tantsur

Comment 14 errata-xmlrpc 2017-11-15 13:16:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3224


Note You need to log in before you can comment on or make changes to this bug.