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

Use authentication for Ironic on baremetal bootstrap host #4256

Merged
merged 3 commits into from Nov 2, 2020

Conversation

zaneb
Copy link
Member

@zaneb zaneb commented Oct 9, 2020

No description provided.

@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 Oct 9, 2020
@openshift-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@zaneb zaneb force-pushed the ironic-basic-auth branch 7 times, most recently from 8e03ebd to 4aaf978 Compare October 9, 2020 20:16
@zaneb zaneb marked this pull request as ready for review October 10, 2020 01:44
@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 Oct 10, 2020
@zaneb
Copy link
Member Author

zaneb commented Oct 12, 2020

/retest

2 similar comments
@zaneb
Copy link
Member Author

zaneb commented Oct 12, 2020

/retest

@zaneb
Copy link
Member Author

zaneb commented Oct 13, 2020

/retest

@zaneb
Copy link
Member Author

zaneb commented Oct 13, 2020

/assign @stbenjam

@dhellmann
Copy link
Contributor

/approve

@zaneb
Copy link
Member Author

zaneb commented Oct 14, 2020

/retest

Copy link
Member

@stbenjam stbenjam left a comment

Choose a reason for hiding this comment

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

My main concern is about the way pkg/types/baremetal/auth works -- I think the asset store managed by the installer in pkg/asset provides the facilities you need, and avoids the concurrency concerns you're working around. More docs are here: https://github.com/openshift/installer/blob/master/docs/design/assetgeneration.md

If you used the same logic as the kubeadmin password (pkg/asset/password), we could even get a file written out that contains the creds for debugging ironic. That file could potentially even be in the clouds.yaml format directly.

One other question: could we get the installer to create the secret for MAO/CBO to use? That would mean the bootstrap and cluster provisioning infrastructures end up using the same password, and the generated file in auth would work for both.

pkg/types/baremetal/auth/ironic_auth.go Outdated Show resolved Hide resolved
@openshift-ci-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
ci/prow/e2e-aws-workers-rhel7 0a54275 link /test e2e-aws-workers-rhel7
ci/prow/e2e-libvirt 0a54275 link /test e2e-libvirt
ci/prow/e2e-crc 0a54275 link /test e2e-crc

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.

@zaneb
Copy link
Member Author

zaneb commented Oct 21, 2020

My main concern is about the way pkg/types/baremetal/auth works -- I think the asset store managed by the installer in pkg/asset provides the facilities you need, and avoids the concurrency concerns you're working around. More docs are here: https://github.com/openshift/installer/blob/master/docs/design/assetgeneration.md

Done.

If you used the same logic as the kubeadmin password (pkg/asset/password), we could even get a file written out that contains the creds for debugging ironic. That file could potentially even be in the clouds.yaml format directly.

Instead of this I added a templated clouds.yaml file on the bootstrap host that we can potentially fetch in dev-scripts.

One other question: could we get the installer to create the secret for MAO/CBO to use? That would mean the bootstrap and cluster provisioning infrastructures end up using the same password, and the generated file in auth would work for both.

We could but I don't think it's advisable. The Secret in the cluster is a lot better protected than the one we give to the bootstrap, which gets written to disk in a dozen different places. IMHO it's best if these creds are ephemeral.

@zaneb zaneb force-pushed the ironic-basic-auth branch 2 times, most recently from 6ac404b to 782dca9 Compare October 21, 2020 17:53
@zaneb
Copy link
Member Author

zaneb commented Oct 22, 2020

/retest

@zaneb
Copy link
Member Author

zaneb commented Oct 22, 2020

metal-ipi job is failing with "Internal Server Error" (presumably from Ironic?) in terraform, but I can't reproduce that locally.

@zaneb
Copy link
Member Author

zaneb commented Oct 23, 2020

/retest

2 similar comments
@zaneb
Copy link
Member Author

zaneb commented Oct 23, 2020

/retest

@zaneb
Copy link
Member Author

zaneb commented Oct 26, 2020

/retest

@stbenjam
Copy link
Member

stbenjam commented Oct 26, 2020

metal-ipi job is failing with "Internal Server Error" (presumably from Ironic?) in terraform, but I can't reproduce that locally.

The problem trying to get data out of CI is we don't get installer log bundle when terraform fails early, #3927. My proposed fix was rejected, I have to revisit their feedback.

It seems likely Ironic is failing, I'll try this on my box if I can figure it out.

@zaneb
Copy link
Member Author

zaneb commented Oct 26, 2020

So Ironic is failing when using IPv6. I am yet to figure out how (or, indeed, whether) that is linked to the changes in this PR.

@zaneb
Copy link
Member Author

zaneb commented Oct 27, 2020

So several things combined here to make it fail on recent versions of this PR, even though there's nothing wrong with the code here.

/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 Oct 27, 2020
@zaneb
Copy link
Member Author

zaneb commented Oct 30, 2020

This should be unblocked by openshift/ironic-image#113
/hold cancel
/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 30, 2020
pkg/asset/ignition/bootstrap/baremetal/ironic_creds.go Outdated Show resolved Hide resolved
pkg/asset/ignition/bootstrap/baremetal/ironic_creds.go Outdated Show resolved Hide resolved
pkg/asset/ignition/bootstrap/baremetal/ironic_creds.go Outdated Show resolved Hide resolved
pkg/asset/cluster/tfvars.go Outdated Show resolved Hide resolved
Add an asset to generate the credentials for Ironic on the bootstrap
once and share them with the both Terraform and Ignition.
If it becomes necessary to connect to the ironic or inspector services
from the command line for debugging purposes, it is useful to have a
clouds.yaml file available for the openstack client to use. Generate
this file in the correct format on the bootstrap host for convenience.
@zaneb
Copy link
Member Author

zaneb commented Nov 2, 2020

/retest

@openshift-merge-robot
Copy link
Contributor

openshift-merge-robot commented Nov 2, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-ovirt ef5c494 link /test e2e-ovirt
ci/prow/e2e-aws-workers-rhel7 ef5c494 link /test e2e-aws-workers-rhel7
ci/prow/e2e-crc ef5c494 link /test e2e-crc

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.

@stbenjam
Copy link
Member

stbenjam commented Nov 2, 2020

I'm happy with this version! I'm worried a bit about how many ways we're constructing URL's: in bash, go, and then separately in golang templating but I don't think there's much we can do about it. Hopefully our CI is smart enough to catch regressions when inevitably we screw up building IPv6 URL's correctly.

/lgtm

@stbenjam
Copy link
Member

stbenjam commented Nov 2, 2020

@staebler Can you have another look? We'll need someone from installer team to approve this PR.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2020
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.

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, staebler

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

The pull request process is described 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 2, 2020
@openshift-merge-robot openshift-merge-robot merged commit 9fb1b6b into openshift:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants