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

OCPBUGS-12890: Create bucket, signed url and use proxy info for installs #8056

Merged
merged 1 commit into from Apr 2, 2024

Conversation

barbacbd
Copy link
Contributor

No description provided.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Feb 22, 2024
@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 Feb 22, 2024
@openshift-ci-robot
Copy link
Contributor

@barbacbd: This pull request references Jira Issue OCPBUGS-12890, which is invalid:

  • expected the bug to target either version "4.16." or "openshift-4.16.", but it targets "4.14.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Feb 22, 2024
@barbacbd barbacbd force-pushed the OCPBUGS-12890 branch 3 times, most recently from 32e9f84 to 3f2082d Compare February 26, 2024 16:20
@barbacbd
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 26, 2024
@openshift-ci-robot
Copy link
Contributor

@barbacbd: This pull request references Jira Issue OCPBUGS-12890, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @jianli-wei

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@barbacbd barbacbd force-pushed the OCPBUGS-12890 branch 2 times, most recently from 0b44f22 to e9262e1 Compare February 26, 2024 16:25
@barbacbd barbacbd changed the title WIP: OCPBUGS-12890: Create bucket, signed url and use proxy info for installs OCPBUGS-12890: Create bucket, signed url and use proxy info for installs Feb 26, 2024
@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 Feb 26, 2024
@barbacbd
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 26, 2024
@barbacbd barbacbd force-pushed the OCPBUGS-12890 branch 2 times, most recently from 3fbbd76 to 05f7550 Compare February 27, 2024 17:35
@patrickdillon
Copy link
Contributor

Depends on #8027

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2024
** Create an ignition shim and use this for metadata.
** Add proxy information to the shim.
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2024
@barbacbd
Copy link
Contributor Author

barbacbd commented Mar 6, 2024

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 6, 2024
Copy link
Contributor

openshift-ci bot commented Mar 6, 2024

@barbacbd: 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/prow/e2e-gcp-ovn-xpn a80acf0 link false /test e2e-gcp-ovn-xpn
ci/prow/okd-e2e-aws-ovn-upgrade a80acf0 link false /test okd-e2e-aws-ovn-upgrade

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.

@barbacbd
Copy link
Contributor Author

barbacbd commented Mar 8, 2024

/cc @r4f4

@openshift-ci openshift-ci bot requested a review from r4f4 March 8, 2024 13:49
Copy link
Contributor

@r4f4 r4f4 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 Mar 8, 2024
Comment on lines +533 to +535
if err := gcpbootstrap.FillBucket(ctx, bucketHandle, bootstrapIgn); err != nil {
return fmt.Errorf("failed to fill bootstrap ignition bucket: %w", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

if we upload the bootstrap.ign file here, won't that break the custom dns, as the ignition needs to be updated with the LB data from the terraform run?

It looks like it might be possible to still handle the bootstrap ignition upload in terraform?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This shouldn't break the custom DNS runs. The data that is stored in the bucket can be edited.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, it would be possible to upload it here and do another upload later with the updated bootstrap ignition. But this PR is still removing the terraform config where we upload the bootstrap.ign with the lb config in TF, so as it stands I think it will break.

I would try skipping this call to gcpbootstrap.FillBucket here (it seems like we can generate the shim without it) and restore the terraform resource resource "google_storage_bucket_object" "ignition" {

Comment on lines +136 to +137
if err := gcpbootstrap.FillBucket(context.Background(), bucketHandle, string(ignitionOutput)); err != nil {
return "", fmt.Errorf("failed to fill gcp bucket with updated boostrap ignition contents: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think it's confusing to fill the GCP bucket here as this function is intended for another purpose (custom DNS). I'm a little confused how this seems to be working, because earlier in the function there is:

if !userConfiguredDNSRaw.(bool) {
		return "", nil
	}

which should bail out if we're not using custom DNS.

In any case, it still seems better to me to keep the uploading of ignition in Terraform and not combine it with this custom DNS flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@patrickdillon The bucket is only re-filled in this case. The bucket is originally filled in tfvars with the original data. Do we still want to use terraform as shown below?

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it! That works well. Sorry i missed it

Comment on lines -33 to -37
resource "google_storage_bucket_object" "ignition" {
bucket = google_storage_bucket.ignition.name
name = "bootstrap.ign"
content = var.ignition_bootstrap
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can keep the ignition upload in terraform by not deleting this

@patrickdillon
Copy link
Contributor

/approve

Copy link
Contributor

openshift-ci bot commented Apr 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6bb3cae and 2 for PR HEAD a80acf0 in total

@openshift-merge-bot openshift-merge-bot bot merged commit 4eb0837 into openshift:master Apr 2, 2024
24 of 26 checks passed
@openshift-ci-robot
Copy link
Contributor

@barbacbd: Jira Issue OCPBUGS-12890: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-12890 has been moved to the MODIFIED state.

In response to this:

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 openshift-eng/jira-lifecycle-plugin repository.

@patrickdillon
Copy link
Contributor

patrickdillon commented Apr 8, 2024

@barbacbd As I mentioned in #8151 this is causing issues with the CAPG install path because the bucket is being created twice. I also realized that due to this PR we are not deleting ignition during bootstrap destroy. I should have caught this when reviewing.

Looking at a 4.15 periodic it has lines like:

time="2024-04-07T12:30:47Z" level=debug msg="  # google_storage_bucket_object.ignition will be destroyed"

where Terraform is destroying the ignition objects.

So we need some changes to fix this, and we should consider reverting this PR. But I think we can handle this in a way that makes the changes more straightforward, and fix both problems (CAPG & bootstrap destroy) by keeping the provisioning of the storage objects within terraform.

It seems that we are able to create signedURLs without the storage objects existing. This is what we do in AWS, and here's a similar example for GCP: https://cloud.google.com/storage/docs/samples/storage-generate-signed-url-v4#storage_generate_signed_url_v4-go

If we confirm that works, we should be able to keep resource provisioning in terraform, and the only changes needed to satisfy these requirements are within the ignition stub--and the resource provisioning should continue to work as it did prior to this PR.

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. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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

5 participants