Bug 1377911

Summary: MAC address appears to be an OPTIONAL parameter in the JSON file.
Product: Red Hat OpenStack Reporter: Darin Sorrentino <dsorrent>
Component: documentationAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0 (Mitaka)CC: dmacpher, dsorrent, dtantsur, lmartins, mburns, srevivo
Target Milestone: ---Keywords: Documentation
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-01 04:50:27 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:

Description Darin Sorrentino 2016-09-21 01:34:13 UTC
Description of problem:

In Section 5.1 of the official installation documentation, where it talks about the JSON file, it appears that the MAC address is now an OPTIONAL parameter.  I've tested deployment with OSP9 by omitting this parameter in the JSON file and it still introspects and deploys fine.

https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/paged/director-installation-and-usage/chapter-5-configuring-basic-overcloud-requirements

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

OSP9 - Mitaka

How reproducible:

Create JSON file without MAC address, import & introspect.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Dan Macpherson 2016-09-21 01:55:39 UTC
Hi Darin,

Thanks for reporting. However, I'm not sure how you've interpreted the MAC address to be optional. The optional fields (cpu, memory, disk, and arch) are all marked "(optional)", but the mac field isn't. Not only that, but the other fields (pm_type, pm_user, pm_password, pm_addr) are also not marked as optional since they're also required.

Can you clarify how you interpreted the mac field was optional?

Comment 3 Darin Sorrentino 2016-09-21 02:11:50 UTC
No, what I am saying is that is IS optional.  I didn't interpret anything, I actually tested it.

I imported a JSON file and did not include the MAC address. I then successfully ran introspection and then deployed.  It looks like when the node boots up, the ironic agent uses IPMI to determine it's local IPMI IP address and then Ironic can use that IP address to determine which node is actually reporting back to Ironic.

If you look at the data being passed from the overcloud node back to the director, you'll see this in the data:

[u'ipmi', u'lan', u'ip-address', u'10.9.57.100'] 

Then after, it matches the IPMI IP address that was stored via the pm_addr to determine which node reported the data:

2016-09-20 20:06:24.830 2085 INFO ironic_inspector.process [-] [node: ebc40c7e-5114-4ff3-8df5-b70bacb68c82 MAC 00:0e:1e:aa:c4:f0 BMC 10.9.57.100] Matching node is ebc40c7e-5114-4ff3-8df5-b70bacb68c82

Does that make sense?

Comment 4 Dan Macpherson 2016-09-21 03:42:17 UTC
Thanks, Darin. Sorry, I misinterpreted what you said in your initial request. It all makes sense now.

Comment 5 Dan Macpherson 2016-09-22 06:50:22 UTC
Hi Darin, I might modify the note slightly because in some cases, like when you have two NICs, you need the MAC address to identify the provisioning network. So if you're using a single NIC configuration, it's optional. If using more than one NIC, it's required.

How does that sound?

Comment 6 Dan Macpherson 2016-09-23 05:15:58 UTC
Actually, after doing some further research on this, it seems that the baremetal import command is supposed to validate and report an error if the MAC address doesn't exist in the JSON file:

https://github.com/openstack/python-tripleoclient/blob/stable/mitaka/tripleoclient/v1/baremetal.py#L104-L111

Needinfo'ing Lucas Martins -- Lucus, just want to check on this. I'm not sure whether the mac address is meant to be a required or optional parameter. It seems like in the code we validate it to be required, but Darin's use case in comment #3 seems to perform node match. Also I thought the MAC address was needed to set up the PXE boot directories for each node on the director host. Is there any chance you can shed some light on whether the mac param is required or not?

Comment 7 Dmitry Tantsur 2016-09-26 16:54:21 UTC
This validation command is essentially abandoned, and anyway I'm not sure Lucas can help you with it. For Ironic, MAC addresses are only required when ssh_* drivers are used or when you don't plan on using introspection. However, TripleO commands may have different opinion.

Comment 8 Dmitry Tantsur 2016-09-26 16:55:44 UTC
This is the actual code for enrolling the nodes: https://github.com/openstack/tripleo-common/blob/stable/mitaka/tripleo_common/utils/nodes.py#L248. I see it can use MAC, but I don't see it being required anywhere. I can't try it myself locally though right now.

Comment 12 Dan Macpherson 2016-12-01 04:50:27 UTC
MAC address now listed as optional:

https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/paged/director-installation-and-usage/chapter-5-configuring-basic-overcloud-requirements

Closing BZ, but please reopen if further changes are required.