New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore script to set address information to link machines and nodes #730
Restore script to set address information to link machines and nodes #730
Conversation
This reverts commit a991cca. Some of the removed code is still needed. In particular, we still need to set the IPs on master Machines, as we have no other mechanism to do that. Without it, the master Machines and Nodes will not get linked, which the UI depends on. Related to issue openshift-metal3#260
We should no longer set IPs on the worker Machine objects, as cluster-api-provider-baremetal should be doing that automatically. Since we're not setting IPs, there's no requirement for the script to wait for the worker to come up, either. This is still a useful verification, so move it to run_ci.sh, instead. Related to issue openshift-metal3#260
This replaces #714 |
@e-minguez it doesn't look like you're in the openshift-metal3 org so I can't assign you as a reviewer on this. |
f6a2fa8
to
e147cdc
Compare
This version of the script works, but we have to wait for the master nodes to be reconciled enough that their status blocks are more fully populated before patching the hardware settings. |
My nodes:
My machines:
The
If I execute the link-machine-and-node script manually:
And the baremetal hosts now have an IP (only 1 and it should have 2):
And the console shows some stats as well. Also, the power status says powered off, but I've modified the script to include the powerstate and after running it again, it now says on:
|
|
||
host_patch=' | ||
{ | ||
"status": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say to add "poweredOn": true,
to also mark the hosts as on (otherwise they say powered off)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ironic will update that field when they are adopted correctly.
The actuator will copy the address and hostname information from the host object onto the machine, which allows the machine to be linked to the node. If we edit the machine directly, the actuator overwrites it with empty data, so edit the host instead. We now need to wait for the hosts to be registered in order to link them to machines and nodes, so do this step last.
Worker hosts should have IPs gathered as part of the inspection process so we shouldn't need to use this hack.
e147cdc
to
0f5a50f
Compare
@e-minguez it looks like the nodes in your environment are using fully qualified names, which the scripts aren't expecting. I don't think we can reliably predict every possible configuration there, so we might just have to say that users in those environments need to run the linking script manually instead of relying on the build script. I'm open to ideas about how to improve the scripts, of course. I'm reluctant to modify the power status flag for 2 reasons. First, the operator is just going to reset it the next time it polls ironic, so the setting won't stick. More importantly, it covers up an issue with the way the hosts were adopted and managed by ironic and I think we should fix that bug instead. The node only reports 1 IP address, and that's the one we care about here, so the script only adds that address to the host. That is going to make it look like the host has 1 NIC, but that issue will be fixed when we can start collecting the inspection data properly in a future version. |
@russellb I think this is ready for review now. |
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/1022/ |
lgtm - I wonder if |
No description provided.