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-43779: Destroy all private cluster backend service resources #9270

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

barbacbd
Copy link
Contributor

@barbacbd barbacbd commented Dec 4, 2024

** When a private cluster was created, the destroy process would not find and destroy the backend services. This was happening specifically when no backends were created/found. The backend service could not be 100% associated with the cluster so it was skipped. Now, when the backend service is found, check the associated resources (for example the health checks or forwarding rules) for their tags/labels. If the resource(s) have tags that contain the cluster ID then the group of resources is considered part of the cluster and should be deleted.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 4, 2024
@openshift-ci-robot
Copy link
Contributor

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

  • expected the bug to target either version "4.19." or "openshift-4.19.", but it targets "4.18.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:

** When a private cluster was created, the destroy process would not find and destroy the backend services. This was happening specifically when no backends were created/found. The backend service could not be 100% associated with the cluster so it was skipped. Now, when the backend service is found, check the associated resources (for example the health checks or forwarding rules) for their tags/labels. If the resource(s) have tags that contain the cluster ID then the group of resources is considered part of the cluster and should be deleted.

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 openshift-ci bot requested review from patrickdillon and r4f4 December 4, 2024 13:56
@barbacbd
Copy link
Contributor Author

barbacbd commented Dec 4, 2024

/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 Dec 4, 2024
@openshift-ci-robot
Copy link
Contributor

@barbacbd: This pull request references Jira Issue OCPBUGS-43779, 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.19.0) matches configured target version for branch (4.19.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.

@jianli-wei
Copy link
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@jianli-wei: This pull request references Jira Issue OCPBUGS-43779, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, 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.

@jianli-wei
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Dec 5, 2024

fwList, err := o.computeSvc.Firewalls.List(o.ProjectID).Fields(googleapi.Field("items(name,targetTags),nextPageToken")).Context(ctx).Do()
if err != nil {
o.Logger.Debugf("failed to list firewall rules associated with backend service %s", item.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
o.Logger.Debugf("failed to list firewall rules associated with backend service %s", item.Name)
o.Logger.Debugf("failed to list firewall rules associated with backend service %s: %v", item.Name, err)

** When a private cluster was created, the destroy process would not find and
destroy the backend services. This was happening specifically when no backends
were created/found. The backend service could not be 100% associated with the cluster
so it was skipped. Now, when the backend service is found, check the associated resources
(for example the health checks or forwarding rules) for their tags/labels. If the resource(s)
have tags that contain the cluster ID then the group of resources is considered part
of the cluster and should be deleted.
@r4f4
Copy link
Contributor

r4f4 commented Dec 6, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2024
Copy link
Contributor

openshift-ci bot commented Dec 6, 2024

@barbacbd: The following test 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/okd-scos-e2e-aws-ovn 110a794 link false /test okd-scos-e2e-aws-ovn

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-sigs/prow repository. I understand the commands that are listed here.

@sadasu
Copy link
Contributor

sadasu commented Dec 6, 2024

/approve

For this tricky fix, it would help indicating the backend services we do end up deleting in debug msgs for better trigae/debugging in the future.

Copy link
Contributor

openshift-ci bot commented Dec 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadasu

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 Dec 6, 2024
@barbacbd
Copy link
Contributor Author

barbacbd commented Dec 9, 2024

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 9, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 2ea001d and 2 for PR HEAD 110a794 in total

@openshift-merge-bot openshift-merge-bot bot merged commit 78adb29 into openshift:master Dec 9, 2024
20 of 21 checks passed
@openshift-ci-robot
Copy link
Contributor

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

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

In response to this:

** When a private cluster was created, the destroy process would not find and destroy the backend services. This was happening specifically when no backends were created/found. The backend service could not be 100% associated with the cluster so it was skipped. Now, when the backend service is found, check the associated resources (for example the health checks or forwarding rules) for their tags/labels. If the resource(s) have tags that contain the cluster ID then the group of resources is considered part of the cluster and should be deleted.

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

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-terraform-providers
This PR has been included in build ose-installer-terraform-providers-container-v4.19.0-202412100209.p0.g78adb29.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-baremetal-installer
This PR has been included in build ose-baremetal-installer-container-v4.19.0-202412100209.p0.g78adb29.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-artifacts
This PR has been included in build ose-installer-artifacts-container-v4.19.0-202412100209.p0.g78adb29.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-altinfra
This PR has been included in build ose-installer-altinfra-container-v4.19.0-202412100538.p0.g78adb29.assembly.stream.el9.
All builds following this will include this PR.

@barbacbd
Copy link
Contributor Author

/cherry-pick release-4.18 release-4.17

@openshift-cherrypick-robot

@barbacbd: new pull request created: #9380

In response to this:

/cherry-pick release-4.18 release-4.17

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important 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. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants