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-44244: use node node in deleted machine phases #29269

Merged

Conversation

kannon92
Copy link
Contributor

@kannon92 kannon92 commented Nov 5, 2024

This PR makes sure to add a node name to the DeletedMachine monitor.

Once that is added, we also added some unit tests to this code to make sure that we are correctly detecting UnexpectedNodeNotReady / UnexpectedUnreachable.

The main edge case we had to work around was when Machines get deleted and that node goes not ready. This is correct behavior but our test was flagging this as this code path does not go through a Machine Config change.

@kannon92 kannon92 changed the title use node node in deleted machine phases OCPBUGS-44244: use node node in deleted machine phases Nov 5, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 5, 2024
@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-44244, 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.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (schoudha@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Nov 5, 2024
@kannon92
Copy link
Contributor Author

kannon92 commented Nov 5, 2024

/jira refresh

@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-44244, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (schoudha@redhat.com), skipping review request.

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.

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 5, 2024

/hold

I need to write some unit tests.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 5, 2024
}

if newHasNodeRef {
nodeName = machine.Status.NodeRef.Name
Copy link
Contributor

Choose a reason for hiding this comment

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

So getting a correct node name into the interval annotation will allow your test logic to correctly correlate this deleting machine with a node not ready, and ignore it going forward? i.e. this will cause LESS failures without having to make the test flake.

Suggest explaining some of that in the commit message + PR when you finish this up and have added the unit tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a lot of real estate to work with for commit message. I added this to the description.

@openshift-ci-robot
Copy link

@kannon92: An error was encountered querying GitHub for users with public email (schoudha@redhat.com) for bug OCPBUGS-44244 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Post "http://ghproxy/graphql": dial tcp 172.30.229.2:80: i/o timeout

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

This PR makes sure to add a node name to the DeletedMachine monitor.

Once that is added, we also added some unit tests to this code to make sure that we are correctly detecting UnexpectedNodeNotReady / UnexpectedUnreachable.

The main edge case we had to work around was when Machines get deleted and that node goes not ready. This is correct behavior but our test was flagging this as this code path does not go through a Machine Config change.

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.

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 6, 2024

cc @rphillips @deads2k @dgoodwin

This is ready. I want to run the tests off of this PR so please don't merge until we confirm this works.

@rphillips
Copy link
Contributor

Nice. This looks good... Let's see how the tests go.

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 6, 2024

/hold cancel

Something is up with these tests..

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 6, 2024
@kannon92
Copy link
Contributor Author

kannon92 commented Nov 6, 2024

/jira refresh

@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-44244, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (schoudha@redhat.com), skipping review request.

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.

@kannon92 kannon92 closed this Nov 7, 2024
@kannon92 kannon92 reopened this Nov 7, 2024
@openshift-ci-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-44244. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state.

In response to this:

This PR makes sure to add a node name to the DeletedMachine monitor.

Once that is added, we also added some unit tests to this code to make sure that we are correctly detecting UnexpectedNodeNotReady / UnexpectedUnreachable.

The main edge case we had to work around was when Machines get deleted and that node goes not ready. This is correct behavior but our test was flagging this as this code path does not go through a Machine Config change.

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-robot
Copy link

@kannon92: This pull request references Jira Issue OCPBUGS-44244, 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.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (schoudha@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR makes sure to add a node name to the DeletedMachine monitor.

Once that is added, we also added some unit tests to this code to make sure that we are correctly detecting UnexpectedNodeNotReady / UnexpectedUnreachable.

The main edge case we had to work around was when Machines get deleted and that node goes not ready. This is correct behavior but our test was flagging this as this code path does not go through a Machine Config change.

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

Job Failure Risk Analysis for sha: 8b023ce

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-serial IncompleteTests
Tests for this run (26) are below the historical average (1642): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@pacevedom
Copy link
Contributor

/test e2e-aws-ovn-microshift

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 7, 2024

Found a little issue and kicked off a new round of testing.

I did not realize that the MachinePhase interval was constructed. So I added it to the machineDeletedInAPI but it wasn't in the MachinePhase interval. This should be fixed.

Once a test finishes, I will verify the artifacts to see if this is correct.

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 8, 2024

/retest

/hold cancel

Confirmed that the machines have the right node names in the MachinePhase Intervals.

@openshift-trt-bot
Copy link

Job Failure Risk Analysis for sha: dd5eb16

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-single-node-upgrade Low
[sig-node] static pods should start after being created
This test has passed 71.43% of 154 runs on release 4.18 [Architecture:amd64 FeatureSet:default Installer:ipi Network:ovn NetworkStack:ipv4 Platform:aws SecurityMode:default Topology:single Upgrade:micro] in the last week.

Open Bugs
Static pod controller pods sometimes fail to start [etcd]
---
[sig-node] static pods should start after being created
This test has passed 71.43% of 154 runs on release 4.18 [Architecture:amd64 FeatureSet:default Installer:ipi Network:ovn NetworkStack:ipv4 Platform:aws SecurityMode:default Topology:single Upgrade:micro] in the last week.

Open Bugs
Static pod controller pods sometimes fail to start [etcd]

@kannon92
Copy link
Contributor Author

kannon92 commented Nov 8, 2024

@deads2k @dgoodwin @rphillips
This PR is ready to merge. PTAL.

Copy link
Contributor

@dgoodwin dgoodwin left a comment

Choose a reason for hiding this comment

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

Looks good to me just a couple nits.

unexpectedReason: monitorapi.NodeUnexpectedReadyReason,
},
{
// OCPBUG-44244: if machine monitor does not have node name than we will get no failures
Copy link
Contributor

Choose a reason for hiding this comment

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

This test looks to expect a failure. Just a comment that needs updating?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea. updated.

unexpectedReason: monitorapi.NodeUnexpectedUnreachableReason,
},
{
// OCPBUG-44244: if machine monitor does not have node name than we will get no failures
Copy link
Contributor

Choose a reason for hiding this comment

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

expects a failure as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@dgoodwin
Copy link
Contributor

dgoodwin commented Nov 8, 2024

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 8, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 9cffbdd and 2 for PR HEAD 1bf8c85 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 23ca269 and 1 for PR HEAD 1bf8c85 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 6807d0c and 0 for PR HEAD 1bf8c85 in total

@openshift-ci-robot
Copy link

/hold

Revision 1bf8c85 was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 9, 2024
@openshift-trt-bot
Copy link

Job Failure Risk Analysis for sha: 1bf8c85

Job Name Failure Risk
pull-ci-openshift-origin-master-e2e-aws-ovn-edge-zones IncompleteTests
Tests for this run (102) are below the historical average (3107): IncompleteTests (not enough tests ran to make a reasonable risk analysis; this could be due to infra, installation, or upgrade problems)

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2024
@kannon92
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 12, 2024
@dgoodwin
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Nov 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dgoodwin, kannon92

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

Copy link
Contributor

openshift-ci bot commented Nov 12, 2024

@kannon92: 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/e2e-aws-ovn-upgrade de21794 link false /test e2e-aws-ovn-upgrade

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 5e59368 into openshift:master Nov 12, 2024
26 of 27 checks passed
@openshift-ci-robot
Copy link

@kannon92: Jira Issue OCPBUGS-44244: All pull requests linked via external trackers have merged:

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

In response to this:

This PR makes sure to add a node name to the DeletedMachine monitor.

Once that is added, we also added some unit tests to this code to make sure that we are correctly detecting UnexpectedNodeNotReady / UnexpectedUnreachable.

The main edge case we had to work around was when Machines get deleted and that node goes not ready. This is correct behavior but our test was flagging this as this code path does not go through a Machine Config change.

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: openshift-enterprise-tests
This PR has been included in build openshift-enterprise-tests-container-v4.18.0-202411122008.p0.g5e59368.assembly.stream.el9.
All builds following this will include this PR.

@kannon92
Copy link
Contributor Author

/cherry-pick release-4.17

@openshift-cherrypick-robot

@kannon92: #29269 failed to apply on top of branch "release-4.17":

Applying: Fix UnexpectedNodeNotReady and UnexpectedNodeUnreachable
Using index info to reconstruct a base tree...
M	pkg/monitortests/node/kubeletlogcollector/node.go
M	pkg/monitortests/node/kubeletlogcollector/node_test.go
M	pkg/monitortests/node/watchnodes/monitortest.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/monitortests/node/watchnodes/monitortest.go
CONFLICT (content): Merge conflict in pkg/monitortests/node/watchnodes/monitortest.go
Auto-merging pkg/monitortests/node/kubeletlogcollector/node_test.go
CONFLICT (content): Merge conflict in pkg/monitortests/node/kubeletlogcollector/node_test.go
Auto-merging pkg/monitortests/node/kubeletlogcollector/node.go
CONFLICT (content): Merge conflict in pkg/monitortests/node/kubeletlogcollector/node.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix UnexpectedNodeNotReady and UnexpectedNodeUnreachable

In response to this:

/cherry-pick 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
approved Indicates a PR has been approved by an approver from all required OWNERS files. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants