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 1986375: adding check for node exporter daemon set #1279

Merged
merged 1 commit into from Jul 27, 2021

Conversation

prashbnair
Copy link
Contributor

removing operator log

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2021
@prashbnair prashbnair changed the title adding check for node exporter daemon set MON-1292: adding check for node exporter daemon set Jul 13, 2021
Comment on lines 983 to 984
if condition.Type == v1.NodeReady {
if condition.Status != v1.ConditionTrue {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
if condition.Type == v1.NodeReady {
if condition.Status != v1.ConditionTrue {
if condition.Type == v1.NodeReady && condition.Status != v1.ConditionTrue {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

It might be worth looking if other fields in the daemonset's status wouldn't bring us the same information? In particular numberAvailable and numberReady...

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#daemonsetstatus-v1-apps

Comment on lines 980 to 981
nodes := nodeList.Items
for _, node := range nodes {
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) saving one line

Suggested change
nodes := nodeList.Items
for _, node := range nodes {
for _, node := range nodeList.Items {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@simonpasquier
Copy link
Contributor

It might be worth looking if other fields in the daemonset's status wouldn't bring us the same information? In particular numberAvailable and numberReady...

Scratch that, it doesn't seem to provide the information we need.

}
}

if d.Status.NumberUnavailable != 0 && d.Status.NumberUnavailable != nodeNotReadyCount {
Copy link
Contributor

Choose a reason for hiding this comment

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

another way to look at it would be to compare the number of ready nodes against NumberAvailable. If there's a difference, CMO could log something like expected %d ready pods for %q daemonset, got only %d

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines 991 to 992
lastErr = errors.Errorf("got %d unavailable nodes",
d.Status.NumberUnavailable)
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
lastErr = errors.Errorf("got %d unavailable nodes",
d.Status.NumberUnavailable)
lastErr = errors.Errorf("expected %d ready pods for %q daemonset, got only %d",
nodeReadyCount, ds.GetName(), d.Status.NumberAvailable)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

d.Status.NumberUnavailable)

var nodeReadyCount int32
nodeList, err := c.kclient.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{})
Copy link
Member

Choose a reason for hiding this comment

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

let's pass the context ctx here instead of TODO()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}

if d.Status.NumberAvailable != nodeReadyCount {
lastErr = errors.Errorf("expected %d ready pods for %q daemon set, got %d ",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
lastErr = errors.Errorf("expected %d ready pods for %q daemon set, got %d ",
lastErr = errors.Errorf("expected %d ready pods for %q daemonset, got %d ",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

removing operator log

code review comments

correcting log message

changing to use context instead of todo
@prashbnair
Copy link
Contributor Author

/test e2e-agnostic

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@prashbnair: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-single-node 57df962 link /test e2e-aws-single-node

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.

@dgrisonnet
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2021
@openshift-bot
Copy link
Contributor

/retest-required

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

2 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@prashbnair prashbnair changed the title MON-1292: adding check for node exporter daemon set Bug 1986375 :adding check for node exporter daemon set Jul 27, 2021
@prashbnair
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@prashbnair: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/bugzilla 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 kubernetes/test-infra repository.

@prashbnair prashbnair changed the title Bug 1986375 :adding check for node exporter daemon set Bug 1986375: adding check for node exporter daemon set Jul 27, 2021
@openshift-ci openshift-ci bot added 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. labels Jul 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@prashbnair: This pull request references Bugzilla bug 1986375, 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.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @juzhao

In response to this:

Bug 1986375: adding check for node exporter daemon set

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 requested a review from juzhao July 27, 2021 15:56
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgrisonnet, prashbnair, simonpasquier

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:
  • OWNERS [dgrisonnet,prashbnair,simonpasquier]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 1959ea9 into openshift:master Jul 27, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2021

@prashbnair: All pull requests linked via external trackers have merged:

Bugzilla bug 1986375 has been moved to the MODIFIED state.

In response to this:

Bug 1986375: adding check for node exporter daemon set

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

6 participants