Use node UUID in logs instead of node ID (which is internal)

Bug #1436366 reported by Zhenguo Niu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Zhenguo Niu

Bug Description

we usually log node_id as a node when attempting to lock it:
"Attempting to reserve node 1"

but I can't get any information about '1' using node-list and node-show as below, so this will confuse users
when debuging with the log message.

(venv)root@zhenguo-MacBookPro:~/myenv/python-ironicclient# ironic node-list
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| 87f03e9f-6016-49dd-b376-5d735c626261 | | None | None | None | True |
| 80a86455-8c12-4e83-bd25-9ab3770c336e | | None | None | None | True |
| fbd5903e-bcba-41ff-af13-f5e6e252afcd | | None | None | None | False |
| 84147fb7-90ee-4912-b398-fc247067c040 | | None | None | None | True |
| 23aa74b4-5ac7-4708-b65a-a89ea7139e1b | | None | None | None | True |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+

(venv)root@zhenguo-MacBookPro:~/myenv/python-ironicclient# ironic node-show 23aa74b4-5ac7-4708-b65a-a89ea7139e1b
+------------------------+----------------------------------------------------------------------+
| Property | Value |
+------------------------+----------------------------------------------------------------------+
| target_power_state | None |
| extra | {} |
| last_error | During sync_power_state, max retries exceeded for node |
| | 23aa74b4-5ac7-4708-b65a-a89ea7139e1b, node state None does not match |
| | expected state 'None'. Updating DB state to 'None' Switching node to |
| | maintenance mode. |
| updated_at | 2015-03-24T08:15:41+00:00 |
| maintenance_reason | During sync_power_state, max retries exceeded for node |
| | 23aa74b4-5ac7-4708-b65a-a89ea7139e1b, node state None does not match |
| | expected state 'None'. Updating DB state to 'None' Switching node to |
| | maintenance mode. |
| provision_state | None |
| uuid | 23aa74b4-5ac7-4708-b65a-a89ea7139e1b |
| console_enabled | False |
| target_provision_state | None |
| maintenance | True |
| inspection_started_at | |
| inspection_finished_at | |
| power_state | None |
| driver | pxe_ipmitool |
| reservation | None |
| properties | {} |
| instance_uuid | None |
| name | |
| driver_info | {u'ipmi_address': u'172.28.2.133', u'ipmi_username': u'root', |
| | u'ipmi_password': u'******'} |
| created_at | 2015-03-23T02:02:40+00:00 |
| driver_internal_info | |
| chassis_uuid | |
| instance_info | {} |
+------------------------+----------------------------------------------------------------------+

Changed in ironic:
assignee: nobody → Zhenguo Niu (niu-zglinux)
Changed in python-ironicclient:
assignee: nobody → Zhenguo Niu (niu-zglinux)
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/167623

Changed in ironic:
status: New → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

I've updated the report to reflect the fact that we don't want to expose node ID to users.

summary: - we use node_id as the key of a node in logs but don't expose it to users
+ Use node UUID in logs instead of node ID (which is internal)
Changed in ironic:
importance: Undecided → Low
Changed in python-ironicclient:
status: New → Won't Fix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: Won't Fix → In Progress
no longer affects: python-ironicclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

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

commit a0d30dca3442628f79b9dfec60c6564e6dfb8d0b
Author: Zhenguo Niu <email address hidden>
Date: Wed Mar 25 22:42:44 2015 +0800

    Use node UUID in logs instead of node ID

    currently we use node ID in logs which is internal, so
    change to use UUID instead

    Change-Id: I6fc7f73ecc8d15c7b42c1715878ec0231eddbd03
    Partial-Bug: #1436366

Revision history for this message
Zhenguo Niu (niu-zglinux) wrote :

manually set status to 'Fix Commited', if you find more logs print node uuid, please correct me.

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
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.