Skip to content

[OCPCLOUD-1436] Introduce workflow with IMDSv2 enforced for AWS machines during installation#28236

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
lobziik:imdsv2-install
Jun 7, 2022
Merged

[OCPCLOUD-1436] Introduce workflow with IMDSv2 enforced for AWS machines during installation#28236
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
lobziik:imdsv2-install

Conversation

@lobziik
Copy link
Copy Markdown
Contributor

@lobziik lobziik commented Apr 29, 2022

This pr introduces separate workflow which installs openshift with
enforced auth requirement on metadata service for control-plane and
compute machines. Adds a respective job for installer repo.

Enhancements document with more details:
https://github.com/openshift/enhancements/blob/master/enhancements/machine-api/aws-imds-v2-support.md

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 29, 2022
@lobziik lobziik changed the title [WIP] [OCPCLOUD-1436] Introduce workflow with IMDSv2 enforced for AWS machines during installation [OCPCLOUD-1436] Introduce workflow with IMDSv2 enforced for AWS machines during installation May 2, 2022
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 2, 2022
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 2, 2022

Rebased due to conflicts.

Previous rehearse job finished successfully. Think it should be ready to go.
https://prow.ci.openshift.org/job-history/gs/origin-ci-test/pr-logs/directory/rehearse-28236-pull-ci-openshift-installer-master-e2e-aws-metadata-service-auth-required

/cc @JoelSpeed

@openshift-ci openshift-ci Bot requested a review from JoelSpeed May 2, 2022 12:36
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 2, 2022

The only question which i have is about owners... Who might be there?

Copy link
Copy Markdown
Contributor

@patrickdillon patrickdillon left a comment

Choose a reason for hiding this comment

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

This LGTM, but I would prefer the job name be shorter. Typically for IPI these follow a pattern of:
e2e-- so in this case I suggested e2e-aws-imdsv2 although there might be a better name

Comment thread ci-operator/config/openshift/installer/openshift-installer-master.yaml Outdated
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 2, 2022

I did shorten the name of the installer job. Updated OWNERS, hope it is fine at this point :)

@patrickdillon
Copy link
Copy Markdown
Contributor

/approve

@JoelSpeed
Copy link
Copy Markdown
Contributor

I don't have an objection to adding this right now, but I would like to know if there are any future plans to remove it?

I would expect that once we have proved this is stable, we could turn this on by default for our CI. This would then catch any other components that aren't compliant before they enter payload (because this test doesn't run everywhere).

We may not make this the default in the installer for some time, but that doesn't stop it being the default for our testing IMO

@patrickdillon
Copy link
Copy Markdown
Contributor

I would expect that once we have proved this is stable, we could turn this on by default for our CI. This would then catch any other components that aren't compliant before they enter payload (because this test doesn't run everywhere).

Another way of accomplishing this in the short term could be to create a periodic. That would test the release payload on a regular basis, rather than just indirectly through installer presubmits.

We may not make this the default in the installer for some time, but that doesn't stop it being the default for our testing IMO

This makes sense. Perhaps create a card to check in after a month or x amount of data? If this is going to happen regularly perhaps it is worth defining a process.

@JoelSpeed
Copy link
Copy Markdown
Contributor

That would test the release payload on a regular basis, rather than just indirectly through installer presubmits.

That's a good idea, @lobziik what do you think to adding a release informing job?

Perhaps create a card to check in after a month or x amount of data?

Will do

@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 4, 2022

That's a good idea, @lobziik what do you think to adding a release informing job?

Good idea. ae44ac7 - i used TP periodic jobs as reference, not sure that that is all what needed for setup a periodic. PTAL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

4.5?

Copy link
Copy Markdown
Contributor Author

@lobziik lobziik May 5, 2022

Choose a reason for hiding this comment

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

Dunno why, but all steps all around there have 4.5. Just made it the same, since i don't understand the reasons why it's 4.5 all around and for keep stuff consistent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, good enough reasoning for me

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The proxy setup step pinned to 4.5 back in #11453 because it was writing Ignition config. If you don't have a reason to pin a specific version for your step, I'd strongly recommend not pinning.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why disabled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Who knows. Purposes of this file and directory are a bit cryptic for me. This entry was generated by make release-controllers.

Copy link
Copy Markdown
Contributor Author

@lobziik lobziik May 5, 2022

Choose a reason for hiding this comment

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

All entries here have "disabled": true

@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 5, 2022

/retest

@JoelSpeed
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 5, 2022
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 9, 2022

/retest

@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 10, 2022

@deads2k @smarterclayton @wking Hello! Can you please take a look? :) This pr touches quite a lot around, due to new workflow and informing jobs addition...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not TRT, so not really my business, but... are they really interested in being approvers for this specific step?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: inconsistent indentation for these two lines.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Neither the cluster profile nor input files come into this step, do they? It's just AWS_METADATA_SERVICE_AUTH?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The existing ipi-aws-pre chain already contains a bunch of environment knobs. It's unclear to me why you want a new workflow for this knob, vs. adding the knob to the existing chain and then setting the env you want in your job configuration. Using a workload to centralize config between multiple jobs makes sense for flavors that have lots of consuming jobs, but you only have the two consuming jobs...

Copy link
Copy Markdown
Contributor Author

@lobziik lobziik May 12, 2022

Choose a reason for hiding this comment

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

Hm, I can not clearly explain the reasoning, why i did exactly that there. Thought that it should be the right thing. :D Maybe i tried to minimize rehearse load and do not touch other jobs, I don't remember exactly.

Would it be better to extend ipi-conf-aws instead and expose extra knob there?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Touching the main workload will indeed create a bunch of rehearsals on this one release PR. But how often do we expect to have to touch this logic in the release repo? I expect it will be rare, and the maintenance overhead of having devs keeping track of more decoupled pieces isn't free either 😉

I'm not all that concerned either way though, so 🤷 whatever makes the most sense to the folks who will be maintaining this code.

Copy link
Copy Markdown
Contributor Author

@lobziik lobziik May 16, 2022

Choose a reason for hiding this comment

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

https://github.com/lobziik/release/pull/1 - i prepared patch which adds env knob to ipi-conf-aws step. Would like to get a review before i will update this pr... Still a bit afraid of massive rehearsals. Can you please check if it looks sane? :)

@openshift-ci openshift-ci Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 18, 2022
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 23, 2022

I extended ipi-conf-aws step with new AWS_METADATA_SERVICE_AUTH env knob, this need review again. Now it should be possible to enable auth on metadata for each job which uses ipi-aws-pre chain.

Copy link
Copy Markdown
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 23, 2022
@openshift-ci openshift-ci Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 31, 2022
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented May 31, 2022

@wking can you please take a look? I really want to merge it, rebased it for 4th time already...

@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented Jun 1, 2022

/retest

@vrutkovs
Copy link
Copy Markdown
Contributor

vrutkovs commented Jun 6, 2022

/approve

Rehearsals didn't pass just yet, but looks good so far

Introduces AWS_METADATA_SERVICE_AUTH env variable to
enable IMDSv2 on AWS during installation time.
Adds job which uses that to the installer presubmits.
@lobziik
Copy link
Copy Markdown
Contributor Author

lobziik commented Jun 6, 2022

I excluded infroming jobs from this pr since it violates the process described https://docs.ci.openshift.org/docs/architecture/release-gating/#add-a-periodic-informative-job here.
I will add it in a separate follow up pr after this one will be merged.

cc @patrickdillon @JoelSpeed

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 6, 2022
Copy link
Copy Markdown
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 7, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 7, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, lobziik, patrickdillon, vrutkovs

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

The pull request process is described here

Details 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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 7, 2022

@lobziik: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-release-master-ci-4.12-e2e-aws-network-stress 1f095d392488a512979b459eaae023dd7d0ed44c link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-etcd-operator/master/e2e-aws-disruptive-ovn a834834 link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.11-nightly-e2e-aws-ipi-byo-route53 a834834 link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.11-nightly-e2e-aws-arm64-ipi a834834 link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-image-registry-operator/master/e2e-aws-image-registry a834834 link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-cloud-controller-manager-operator/master/e2e-aws-ccm 52a56fec43f6de244f089850881687e40282aa4f link unknown /test pj-rehearse
ci/rehearse/openshift/metallb-operator/main/operator-e2e-upgrade 52a56fec43f6de244f089850881687e40282aa4f link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-cloud-controller-manager-operator/master/e2e-aws-ccm-install 52a56fec43f6de244f089850881687e40282aa4f link unknown /test pj-rehearse
ci/rehearse/redhat-openshift-ecosystem/community-operators-pipeline/main/4.9-deploy-operator-on-openshift 52a56fec43f6de244f089850881687e40282aa4f link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-multiarch-master-nightly-4.11-ocp-e2e-aws-upi-arm64 52a56fec43f6de244f089850881687e40282aa4f link unknown /test pj-rehearse
ci/rehearse/openshift/csi-external-snapshotter/release-4.5/e2e-aws-csi 153cab6ade9cbb6e2cdb0c04dc5e8dbbb42dd4ce link unknown /test pj-rehearse
ci/rehearse/openshift/installer/master/e2e-aws-upi-proxy 124097c link unknown /test pj-rehearse
ci/rehearse/openshift/cluster-logging-operator/release-4.8/e2e-operator b85a5a1344533d147fd771dfb7eb82b9473cbc8a link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.11-amd64-nightly-e2e-aws-ipi-byo-route53 124097c link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.11-amd64-nightly-e2e-aws-ipi 124097c link unknown /test pj-rehearse
ci/rehearse/openshift/windows-machine-config-operator/master/aws-e2e-upgrade 124097c link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-release-master-ci-4.12-e2e-aws-imdsv2 153cab6ade9cbb6e2cdb0c04dc5e8dbbb42dd4ce link unknown /test pj-rehearse
ci/rehearse/periodic-ci-openshift-hypershift-main-periodics-e2e-conformance-proxy 124097c link unknown /test pj-rehearse
ci/prow/pj-rehearse 124097c link false /test pj-rehearse
ci/rehearse/openshift/openshift-tests-private/master/debug-disasterrecovery-aws-ipi 153cab6ade9cbb6e2cdb0c04dc5e8dbbb42dd4ce link unknown /test pj-rehearse
ci/rehearse/openshift/installer/master/e2e-aws-imdsv2 124097c link unknown /test pj-rehearse

Full PR test history. Your PR dashboard.

Details

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.

@openshift-merge-robot openshift-merge-robot merged commit ca47eba into openshift:master Jun 7, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 7, 2022

@lobziik: Updated the following 3 configmaps:

  • ci-operator-master-configs configmap in namespace ci at cluster app.ci using the following files:
    • key openshift-installer-master.yaml using file ci-operator/config/openshift/installer/openshift-installer-master.yaml
  • job-config-master-presubmits configmap in namespace ci at cluster app.ci using the following files:
    • key openshift-installer-master-presubmits.yaml using file ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml
  • step-registry configmap in namespace ci at cluster app.ci using the following files:
    • key ipi-conf-aws-commands.sh using file ci-operator/step-registry/ipi/conf/aws/ipi-conf-aws-commands.sh
    • key ipi-conf-aws-ref.yaml using file ci-operator/step-registry/ipi/conf/aws/ipi-conf-aws-ref.yaml
Details

In response to this:

This pr introduces separate workflow which installs openshift with
enforced auth requirement on metadata service for control-plane and
compute machines. Adds a respective job for installer repo.

Enhancements document with more details:
https://github.com/openshift/enhancements/blob/master/enhancements/machine-api/aws-imds-v2-support.md

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

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.

6 participants