Repository navigation
MGMT-19194: Save Agent inventory and status in annotation - #6957
Conversation
|
@CrystalChun: This pull request references MGMT-19194 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.18.0" version, but no target version was set. DetailsIn 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CrystalChun The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6957 +/- ##
=======================================
Coverage 68.81% 68.82%
=======================================
Files 251 251
Lines 37628 37630 +2
=======================================
+ Hits 25895 25900 +5
+ Misses 9416 9414 -2
+ Partials 2317 2316 -1
|
|
/retest-required |
1 similar comment
|
/retest-required |
|
/lgtm |
|
/retest-required Remaining retests: 0 against base HEAD 42c57d5 and 2 for PR HEAD fdcb76bfe76e2700394571360f22eafb2c0d50b9 in total |
1 similar comment
|
/retest-required Remaining retests: 0 against base HEAD 42c57d5 and 2 for PR HEAD fdcb76bfe76e2700394571360f22eafb2c0d50b9 in total |
|
/retest-required |
|
/retest-required Remaining retests: 0 against base HEAD a06654b and 2 for PR HEAD fdcb76bfe76e2700394571360f22eafb2c0d50b9 in total |
|
/retest-required Remaining retests: 0 against base HEAD f3d95e1 and 1 for PR HEAD fdcb76bfe76e2700394571360f22eafb2c0d50b9 in total |
fdcb76b to
990ec8c
Compare
|
/lgtm |
|
/retest-required Remaining retests: 0 against base HEAD f3d95e1 and 2 for PR HEAD 990ec8c06a392ec8dc1375e8ea64eef7097456ca in total |
990ec8c to
88385c7
Compare
For Hypershift's backup and restore of hosted cluster from one hub to a new hub, the Agent requires these status fields to be restored in order for the NodePool to successfully re-adopt the Nodes for the hosted cluster.
88385c7 to
06f4d75
Compare
|
/retest-required |
|
@CrystalChun: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
| updated := false | ||
| updated = setAgentAnnotation(log, agent, AgentStateAnnotation, swag.StringValue(h.Status)) | ||
| updated = updated || setAgentAnnotation(log, agent, AgentRoleAnnotation, string(h.Role)) | ||
| if h.Inventory != "" { |
There was a problem hiding this comment.
Just a minor nit for later, is it crucial to check if inventory is empty?
If not, we can make this func nicer to read I think.
I.e.
updated := false
updated = setAgentAnnotation(log, agent, AgentStateAnnotation, swag.StringValue(h.Status)
updated = setAgentAnnotation(log, agent, AgentRoleAnnotation, string(h.Role)) || updated
updated = setAgentAnnotation(log, agent, AgentInventoryAnnotation, h.Inventory) || updated
There was a problem hiding this comment.
Great suggestion! Will work that into a new PR. Thanks Daniel!!
|
[ART PR BUILD NOTIFIER] Distgit: ose-agent-installer-api-server |
Minor code cleanup as suggested in openshift#6957 (comment)
|
/cherry-pick release-ocm-2.12 |
|
@CrystalChun: new pull request created: #6968 DetailsIn 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 kubernetes-sigs/prow repository. |
Minor code cleanup as suggested in #6957 (comment)
…6957) For Hypershift's backup and restore of hosted cluster from one hub to a new hub, the Agent requires these status fields to be restored in order for the NodePool to successfully re-adopt the Nodes for the hosted cluster.
* MGMT-18635: Restore missing Host by Agent CR (#6730) When applying an Agent CR with a missing associated host, the Agnet CR is currently being deleted by the reconciler. This scenario would happen on restore to a new hub flows since the host is a DB only entity. Thus, this change introduces handling of a missing host by restoring the object into DB according to properties from the Agent CR. For restoring the host's status, added 'state' annotation to the agent which is set on reconcile. See full flow and more details in the enhancement: https://github.com/openshift/assisted-service/blob/master/docs/enhancements/backup-restore-support.md#solution-for-deleted-agent-crs * MGMT-19194: Save Agent inventory and status in annotation (#6957) For Hypershift's backup and restore of hosted cluster from one hub to a new hub, the Agent requires these status fields to be restored in order for the NodePool to successfully re-adopt the Nodes for the hosted cluster. --------- Co-authored-by: Daniel Erez <danielerez@gmail.com>
For Hypershift's backup and restore of hosted cluster from one hub to a new hub, the Agent requires these status fields to be restored in order for the NodePool to successfully re-adopt the Nodes for the hosted cluster.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Checklist
docs, README, etc)Reviewers Checklist
/cc @danielerez @jhernand @carbonin