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

MGMT-14498: Remove the detached annotation when BMH is being deleted #5228

Conversation

carbonin
Copy link
Member

When the BMH has the delete annotation the detached annotation value contains metadata that causes BMO to pause its finalizer handling until it is removed.

This means that BMAC needs to ensure the detached annotation is removed whenever the BMH is being deleted and the finalizer is going to be removed or is already gone.

Previosuly if the agent was deleted BMAC removed the finalizer, but not the detached annotation leading to the BMH not being deleted.

List all the issues related to this PR

https://issues.redhat.com/browse/MGMT-14498

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see [CONTRIBUTING] guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

When the BMH has the delete annotation the detached annotation value
contains metadata that causes BMO to pause its finalizer handling until
it is removed.

This means that BMAC needs to ensure the detached annotation is removed
whenever the BMH is being deleted and the finalizer is going to be
removed or is already gone.

Previosuly if the agent was deleted BMAC removed the finalizer, but not
the detached annotation leading to the BMH not being deleted.

https://issues.redhat.com/browse/MGMT-14498
@carbonin carbonin changed the title Remove the detached annotation when BMH is being deleted MGMT-14498: Remove the detached annotation when BMH is being deleted May 18, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 18, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 18, 2023

@carbonin: This pull request references MGMT-14498 which is a valid jira issue.

In response to this:

When the BMH has the delete annotation the detached annotation value contains metadata that causes BMO to pause its finalizer handling until it is removed.

This means that BMAC needs to ensure the detached annotation is removed whenever the BMH is being deleted and the finalizer is going to be removed or is already gone.

Previosuly if the agent was deleted BMAC removed the finalizer, but not the detached annotation leading to the BMH not being deleted.

List all the issues related to this PR

https://issues.redhat.com/browse/MGMT-14498

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see [CONTRIBUTING] guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 18, 2023
@openshift-ci openshift-ci bot requested review from avishayt and eliorerz May 18, 2023 21:10
@openshift-ci
Copy link

openshift-ci bot commented May 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carbonin

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 May 18, 2023
@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Merging #5228 (f37c25c) into master (9a7bef9) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5228      +/-   ##
==========================================
+ Coverage   67.46%   67.58%   +0.11%     
==========================================
  Files         218      218              
  Lines       32683    32780      +97     
==========================================
+ Hits        22051    22154     +103     
+ Misses       8650     8644       -6     
  Partials     1982     1982              
Impacted Files Coverage Δ
...nal/controller/controllers/bmh_agent_controller.go 74.80% <100.00%> (+0.37%) ⬆️

... and 2 files with indirect coverage changes

@eranco74
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 22, 2023
@openshift-ci
Copy link

openshift-ci bot commented May 22, 2023

@carbonin: all tests passed!

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.

@openshift-merge-robot openshift-merge-robot merged commit 1a8d946 into openshift:master May 22, 2023
15 checks passed
@carbonin carbonin deleted the remove_detached_delay_when_deleting_bmh branch May 22, 2023 18:11
@carbonin
Copy link
Member Author

/cherry-pick release-ocm-2.8

@openshift-cherrypick-robot

@carbonin: new pull request created: #5238

In response to this:

/cherry-pick release-ocm-2.8

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.

danielerez pushed a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
)

When the BMH has the delete annotation the detached annotation value
contains metadata that causes BMO to pause its finalizer handling until
it is removed.

This means that BMAC needs to ensure the detached annotation is removed
whenever the BMH is being deleted and the finalizer is going to be
removed or is already gone.

Previosuly if the agent was deleted BMAC removed the finalizer, but not
the detached annotation leading to the BMH not being deleted.

https://issues.redhat.com/browse/MGMT-14498
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/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants