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-15902: Trigger reboots for node event when day2 node moves to done #5648
Conversation
@ori-amizur: This pull request references MGMT-15902 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 task to target the "4.15.0" version, but no target version was set. 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 kubernetes/test-infra repository. |
f021436
to
4c810ed
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ori-amizur 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 |
/test? |
/test ? |
@ori-amizur: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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 kubernetes/test-infra repository. |
@ori-amizur: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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 kubernetes/test-infra repository. |
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5648 +/- ##
==========================================
+ Coverage 67.72% 67.77% +0.04%
==========================================
Files 233 234 +1
Lines 34219 34443 +224
==========================================
+ Hits 23175 23343 +168
- Misses 8982 9026 +44
- Partials 2062 2074 +12
|
4c810ed
to
8f31d44
Compare
/retest |
8f31d44
to
fee45a3
Compare
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
/refresh |
/retest |
fee45a3
to
2b96ffe
Compare
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
2b96ffe
to
fd61402
Compare
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
@@ -484,6 +488,31 @@ func (r *AgentReconciler) spokeKubeClient(ctx context.Context, clusterRef *aiv1b | |||
return r.SpokeK8sClientFactory.CreateFromSecret(secret) | |||
} | |||
|
|||
func (r *AgentReconciler) notifyNumberOfReboots(ctx context.Context, h *models.Host, node *corev1.Node, clusterRef *aiv1beta1.ClusterReference) error { | |||
if !isNodeReady(node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready is enough to run debug pod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First it is a node, not pod.
According to my tests, yes.
We also do it in day1.
After node is ready, it moves to done.
In this case the agent will not be reconciled anymore.
So it is the only place it can be done.
fd61402
to
104a0c0
Compare
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
This is done for kube api client only when spoke kubeconfig is available. The implementation is done using debug command (as in oc command). The number of reboots are counted by 'last reboot' linux command.
104a0c0
to
5df3196
Compare
/test edge-e2e-ai-operator-ztp-sno-day2-workers |
/lgtm |
/override ci/prow/edge-e2e-ai-operator-ztp-sno-day2-workers |
@ori-amizur: Overrode contexts on behalf of ori-amizur: ci/prow/edge-e2e-ai-operator-ztp-sno-day2-workers 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 kubernetes/test-infra repository. |
/refresh |
This is done for kube api client only when spoke kubeconfig is available.
The implementation is done using debug command (as in oc command). The number of reboots are counted by 'last reboot' linux command.
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 @filanov