Skip to content
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

baremetal: send full ignition to masters #4359

Closed
wants to merge 1 commit into from
Closed

baremetal: send full ignition to masters #4359

wants to merge 1 commit into from

Conversation

kirankt
Copy link
Contributor

@kirankt kirankt commented Nov 9, 2020

This PR is an old revert which sends full ignition to the masters via the ironic terraform provider.

See PR: #3276

co-authored-by: Steve Hardy [email protected]

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 9, 2020
@kirankt
Copy link
Contributor Author

kirankt commented Nov 9, 2020

/label platform/baremetal

@openshift-ci-robot openshift-ci-robot added the platform/baremetal IPI bare metal hosts platform label Nov 9, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign staebler after the PR has been reviewed.
You can assign the PR to them by writing /assign @staebler in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kirankt
Copy link
Contributor Author

kirankt commented Nov 9, 2020

/assign @hardys

Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me a synopsis of what has been done to get around the reasons for the revert?

pkg/asset/cluster/tfvars.go Outdated Show resolved Hide resolved
@romfreiman
Copy link

@eranco74 @yevgeny-shnaidman @carbonin FYI

if err := json.Unmarshal([]byte(ignition), &masterIgn); err != nil {
return nil, err
}
ignitionURL := masterIgn.Ignition.Config.Merge[0].Source
Copy link
Member

@stbenjam stbenjam Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we're extracting the merge out of the stub ignition: what happens to user customizations? Does the ignition from MCS contain them? I know there were some discussions about that but I haven't followed the progress.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is just a minor rework of extracting the URL and CA cert. Regarding user customizations, the current idea is to compare the original stub with any user customizations and, if they are different, the installer will create the appropriate machineconfig manifest for the change. This way when MCO becomes active, the final rendered ignition will contain the user's modification. This PR will go to work as usual and pass the URL and cert to the TF provider, which will extract the rendered ignition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mention that there will be another PR that will be responsible for creating the machineconfig to reconcile any changes to the stub ignition.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any customizations should be accessible via the MCS rendered config if we rebase this on #4413

@kirankt kirankt changed the title [WIP] baremetal: send full ignition to masters baremetal: send full ignition to masters Nov 20, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 20, 2020
@kirankt
Copy link
Contributor Author

kirankt commented Nov 20, 2020

/assign @abhinavdahiya . Hi Abhinav. This is an old revert (reworked a little bit), where in baremetal platform, we send pointer ignition url and root ca cert to our terraform provider for fetching full ignition. Context: we need this to be able to support more complex networking setups (bonds, vlans, etc) prior to booting in baremetal infrastructure.

@staebler
Copy link
Contributor

@kirankt As asked here, I am still looking for a synopsis of how this overcomes the reason for the initial revert. Is it the future PR mentioned here that is expected to overcome the deficiency? If so, then I don't see how we can merge this PR without having the resolution of the future PR in place first. If not, then please help me understand more clearly.

@kirankt
Copy link
Contributor Author

kirankt commented Nov 20, 2020

@kirankt As asked here, I am still looking for a synopsis of how this overcomes the reason for the initial revert. Is it the future PR mentioned here that is expected to overcome the deficiency? If so, then I don't see how we can merge this PR without having the resolution of the future PR in place first. If not, then please help me understand more clearly.

Hi @staebler

I'm sorry I completely missed that comment.

The original idea for this PR was to pass the ignition url and its cert to our terraform provider (ironic), which fetched the full config from MCS and built the config drive for baremetal. We did something similar in cluster-api-provider-baremetal (CAPBM) for workers and day 2. Couple things misfired. 1. The CAPBM was not able to contact the MCS from within the cluster. This was by design (an explicit iptables OUTPUT rule on the workers). 2. End users were customizing the pointer ignition configs. e.g

https://github.com/openshift/installer/blob/master/docs/user/customization.md#os-customization-unvalidated
https://bugzilla.redhat.com/show_bug.cgi?id=1833483

and our changes broke that interface. So, we reverted.

Now, we have couple options we are pursuing. We have couple enhancements we are pursuing:
openshift/enhancements#467 and openshift/enhancements#540. The latter idea is to save the pointer ignition (which may be been customized) as a machineobject, whilst warning the user to stop customizing ignition directly and encourage them to use of machineconfig manifests instead. We have a WIP branch linked there. If we cannot push this idea through our plan B is to re-work our TF code to do a fetch full ignition and merge with the pointer ignition. We will pursue a similar goal with the CAPBM code.

Speaking of CAPBM, rather than using MCS to fetch the full ignition, we plan on fetching the rendered machineconfig object directly and using it to create the config drive for the machines. The work is pending. We still need to sort out RBAC rules to fetch the object.

Hope this helps. And thank you for reviewing this PR.

remove need for sending url and rootca. extract these from stub ignition

co-authored-by: Steve Hardy <[email protected]>
@openshift-merge-robot
Copy link
Contributor

@kirankt: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-ovirt 5067123 link /test e2e-ovirt
ci/prow/e2e-aws-upgrade 5067123 link /test e2e-aws-upgrade
ci/prow/e2e-aws-workers-rhel7 5067123 link /test e2e-aws-workers-rhel7
ci/prow/e2e-openstack 5067123 link /test e2e-openstack
ci/prow/e2e-crc 5067123 link /test e2e-crc
ci/prow/e2e-aws-fips 5067123 link /test e2e-aws-fips
ci/prow/e2e-metal-ipi 5067123 link /test e2e-metal-ipi
ci/prow/e2e-libvirt 5067123 link /test e2e-libvirt

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@hardys
Copy link

hardys commented Nov 24, 2020

@staebler this should wait until we have a PR merged for openshift/enhancements#540 - planning to get a PR up based on https://github.com/kirankt/installer/tree/ignition-update-check ASAP then we can rebase this PR on top

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2020
@hardys
Copy link

hardys commented Nov 24, 2020

@staebler this should wait until we have a PR merged for openshift/enhancements#540 - planning to get a PR up based on https://github.com/kirankt/installer/tree/ignition-update-check ASAP then we can rebase this PR on top

/hold

#4413 now posted for review, I'll rebase this on top and re-test

return nil, err
}
ignitionURL := masterIgn.Ignition.Config.Merge[0].Source
ignitionURLCACert := masterIgn.Ignition.Security.TLS.CertificateAuthorities[0].Source
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

terraform-provider-ignition currently expects just the base64 encoded cert, but this passes the entire dataurl - we need to strip the dataurl prefix here until/unless we rework the provider to accept the full dataurl

@hardys
Copy link

hardys commented Nov 27, 2020

@kirankt I tested this and found it to be incomplete for what is needed with the latest MCS - I can't push to your branch so I replaced this PR with #4427

/close

@openshift-ci-robot
Copy link
Contributor

@hardys: Closed this PR.

In response to this:

@kirankt I tested this and found it to be incomplete for what is needed with the latest MCS - I can't push to your branch so I replaced this PR with #4427

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. platform/baremetal IPI bare metal hosts platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants