Bug 1311629

Summary: Introspection on a node already introspected does not update the ironic node extra field
Product: Red Hat OpenStack Reporter: Sid Ahmed Sadouni <sisadoun>
Component: rhosp-directorAssignee: Angus Thomas <athomas>
Status: CLOSED CURRENTRELEASE QA Contact: Arik Chernetsky <achernet>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dbecker, dtantsur, jcoufal, mburns, morazi, rhel-osp-director-maint
Target Milestone: ---   
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-14 15:49:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sid Ahmed Sadouni 2016-02-24 15:53:54 UTC
Description of problem:

I did the introspection on my nodes and did a successful deployment.
Then I needed to modify the number of logical drive on my ceph node (from 7 to 6 logical drive).
Before redeploying, I wanted to run the introspection manually on the 6 nodes concerned by this modification.
The ironic node-show command show a non up to date extra field with still 7 disk.
But when we look at the swift object associated to this node, we can see that this one is up to date.
So we have a difference between what is displayed by ironic command and what is stored in the swift object.

Version-Release number of selected component (if applicable):

I am deploying with OSPD 7.2

How reproducible:

Was reproducible for all my 6 ceph nodes.


Steps to Reproduce:
1. Do instrospection
2. Modify the hardware disk configuration (moved from 7 to 6 logical drives)
3. Run introspection manually
4. Notice with ironic node-show command that the extra field is not updated.

Find the step by step info here : http://pastebin.test.redhat.com/351450

Actual results:

The information displayed in the extra field is not updated with the new introspected information.
The swift object linked to the node is correctly updated

Expected results:
the extra field should display the correct information about the node.

Additional info:
You can find a step by step demonstration of the bug here : http://pastebin.test.redhat.com/351450

We can have a correct value if we set the extra field value to empty with the following command :
ironic node-update ac2cad36-2ffd-4509-b51c-51c89fd09e74 replace extra='{}'

result :
+------------------------+-----------------------------------------------------------------------+
| Property               | Value                                                                 |
+------------------------+-----------------------------------------------------------------------+
| target_power_state     | None                                                                  |
| extra                  | {}                                                                    |

Now, if we re run an introspection it will update correctly this field :
openstack baremetal introspection start ac2cad36-2ffd-4509-b51c-51c89fd09e74
ironic node-show ac2cad36-2ffd-4509-b51c-51c89fd09e74
+------------------------+-----------------------------------------------------------------------+
| Property               | Value                                                                 |
+------------------------+-----------------------------------------------------------------------+
| target_power_state     | None                                                                  |
| extra                  | {u'on_discovery': u'true'}   

then :
extra                  | {u'newly_discovered': u'true', u'block_devices': {u'serials':         |
|                        | [u'600508b1001cddbff263e9d8d23d4233',                                 |
|                        | u'600508b1001c6f0f063af2ebd7818ce6',                                  |
|                        | u'600508b1001cd44cdd1630a8130fc3a2',                                  |
|                        | u'600508b1001c454ea69b9809d710fff2',                                  |
|                        | u'600508b1001ccd0c3314b4e840772cda',                                  |
|                        | u'600508b1001cc834a30f7c1717af1604']}, u'hardware_swift_object': u    |
|                        | 'extra_hardware-ac2cad36-2ffd-4509-b51c-51c89fd09e74'}

Comment 2 Mike Burns 2016-02-24 15:56:25 UTC
*** Bug 1311628 has been marked as a duplicate of this bug. ***

Comment 3 Mike Burns 2016-04-07 21:11:06 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 4 Dmitry Tantsur 2016-10-14 15:49:10 UTC
Hi! Starting with OSP8, we've changed the way we store the introspection data, and I believe that this problem is fixed. Please feel free to reopen with more details, if it's not the case.

P.S.
Keep in mind that we no longer store the introspection data directly on the node. It was moved to swift back in OSP7 IIRC.