-
Notifications
You must be signed in to change notification settings - Fork 15
[WIP] Install gather support for baremetal platform #104
Conversation
This release includes support for gathering data from introspection, and storing it in the tfstate.
This adds support to the 'gather' command for baremetal. The bootstrap node's IP address is retrieved via libvirt's DHCP records. The master's IP's are retrieved using Ironic introspection data, that is stored in the terraform state's introspection data source (added in terraform-provider-ironic v0.1.4)
|
||
// BootstrapIP returns the ip address for bootstrap host. Baremetal relies on a libvirt bootstrap node, that gets it's | ||
// IP from DHCP. | ||
func BootstrapIP(tfs *terraform.State, config *types.InstallConfig) (string, error) { |
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.
This is all bit complex, since we have to retrieve the lease information from libvirt. The libvirt platform generates the IP's: https://github.com/openshift/installer/blob/master/pkg/tfvars/libvirt/libvirt.go, maybe we could use that approach instead.
We're also affected by openshift-metal3/dev-scripts#512 here
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.
What do we need the BootstrapIP for? I'm wondering if we can use the static IP configured for the provisioning network in #100 instead?
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.
Debug gathering gets logs from bootstrap if install fails while bootstrap is still up, I think it also uses it as a bastion host to get to the masters in that case as well.
But we can definitely use the static IP instead of this.
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've run into issues getting ironic to work reliably on the boostrap VM, but I may try breaking #100 into two or three PRs, then we can enable the provisioning nic so that this PR can use it, then potentially host the images to allow fixing #58, and finally switch the ironic endpoint over to the bootstrap VM.
@stbenjam let me know if the above decoupling of PRs would be helpful, if so I'll rebase and open some additional PRs.
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 think that makes sense. I don't think we need install gather to open the first PR to openshift/installer but we do need it eventually.
Could we move the masters to static IP's as well? Or do you think the approach of getting them out of ironic introspection data is reliable?
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.
Yes I think we'll need to switch the masters to static IPs to enable self-hosted ironic where we'll need to run dnsmasq and the other ironic bits on a master to deploy the workers - ref discussion on metal3-io/metal3-docs#39
I'm not yet sure what the best way to inject that configuration is though, e.g we could use ignition, something run via the BMO or perhaps the MCO, and there's the nmstate operator to investigate too.
Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/746/ |
Marking this WIP again, as it sounds like we can just use static IP's |
I'm going to close this, we can open a PR to enable gather when we're using static ip's. |
Note that openshift/installer#1941 landed yesterday, I'm testing locally with the new RHCOS version and plan to update #100 soon, so that should hopefully provide the static provisioning IP needed for the bootstrap VM. |
We're going to move to static IP's for masters on the provisioning network as well, aren't we? Or do we let DHCP handle it and just get the data from introspection for install-gather? |
fixes #79
This adds support to the 'gather' command for baremetal. The bootstrap
node's IP address is retrieved via libvirt's DHCP records. The master's
IP's are retrieved using Ironic introspection data, that is stored in
the terraform state's introspection data source (added in
terraform-provider-ironic v0.1.4)
How to test this:
KNI_INSTALL_FROM_GIT=true
env variable