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

Bug 1827075: Drain GCS buckets before removal #554

Merged
merged 2 commits into from May 21, 2020

Conversation

adambkaplan
Copy link
Contributor

When removing GCS storage, ensure that there are no objects in the bucket prior to deletion.
Otherwise, removing the storage will fail with 409 CONFLICT errors.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label May 15, 2020
@openshift-ci-robot
Copy link
Contributor

@adambkaplan: This pull request references Bugzilla bug 1827075, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

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

In response to this:

Bug 1827075: Drain GCS buckets before removal

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label May 15, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2020
@adambkaplan
Copy link
Contributor Author

/assign @dmage

/cc @ricardomaraschini @coreydaley

/hold

I'd like to discuss how we can effectively test this. As @coreydaley knows, the GCS SDK does not have good test doubles that allow us to easily unit test. My thought is that I should add a TestRemoveStorage suite that does the following:

  1. Sets up the image registry with the defaults for the platform we are running on
  2. Create a namespace
  3. Imports the UBI 7 and 8 imagestreams with pullthrough into the namespace
  4. Remove the image registry - thereby removing the storage.

Do we already have something like this?

@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 May 15, 2020
@adambkaplan adambkaplan changed the title Bug 1827075: Drain GCS buckets before removal WIP - Bug 1827075: Drain GCS buckets before removal May 19, 2020
@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 May 19, 2020
@adambkaplan
Copy link
Contributor Author

/hold cancel

Added e2e test

@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 May 19, 2020
@adambkaplan
Copy link
Contributor Author

@dmage @ricardomaraschini ptal - added an e2e test to ensure the image registry can be removed after images had been imported to it.

@adambkaplan
Copy link
Contributor Author

@dmage @ricardomaraschini ptal - I added an e2e to ensure we can tear down the registry if images were added to the storage (via pullthrough in this case).

@dmage
Copy link
Member

dmage commented May 19, 2020

@adambkaplan you don't use pull-through there. Image API doesn't interact with the registry.

Pushing a blob or using builds might be easier rather than using pull-through. Maybe it's better to add a Disruptive test to openshift-tests?

@adambkaplan
Copy link
Contributor Author

using builds might be easier rather than using pull-through

I can give that a go here - you can kick off a build using raw Build objects (ci-operator does this today)

When removing GCS storage, ensure that there are no objects in the bucket prior to deletion.
Otherwise, removing the storage will fail with 409 CONFLICT errors.

Added e2e test to ensure the image registry can be removed if an image had been pushed to it.
Image push is accomplished via an OpenShift build, using our canonical NodeJS example.
Test framework code updated to allow logs to be dumped from a single pod.
Vendor in image and build API code from openshift/api and client-go referenced in test code.
This does not bump dependencies - it merely vendors in code from existing modules.
@adambkaplan adambkaplan changed the title WIP - Bug 1827075: Drain GCS buckets before removal Bug 1827075: Drain GCS buckets before removal May 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 May 20, 2020
@adambkaplan
Copy link
Contributor Author

@dmage updated to use a build, and the specific test had clean runs on GCP and AWS. PTAL

@adambkaplan
Copy link
Contributor Author

/retest

Flake (?) on TestOperandProxyConfiguration

@dmage
Copy link
Member

dmage commented May 21, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, dmage

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-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 334cfc2 into openshift:master May 21, 2020
@openshift-ci-robot
Copy link
Contributor

@adambkaplan: All pull requests linked via external trackers have merged: openshift/cluster-image-registry-operator#554. Bugzilla bug 1827075 has been moved to the MODIFIED state.

In response to this:

Bug 1827075: Drain GCS buckets before removal

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. 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