Skip to content

OCPBUGS-7310: Fix test checking if Machine addresses match VMs#88

Merged
openshift-merge-robot merged 1 commit into
openshift:mainfrom
dulek:prevent-bogus-machine
Feb 20, 2023
Merged

OCPBUGS-7310: Fix test checking if Machine addresses match VMs#88
openshift-merge-robot merged 1 commit into
openshift:mainfrom
dulek:prevent-bogus-machine

Conversation

@dulek
Copy link
Copy Markdown
Contributor

@dulek dulek commented Feb 16, 2023

The aforementioned test blindly tries to check all the Machines in the cluster, assuming each have a VM in OpenStack. That might not be true as in other tests we create Machines that are supposed to fail provisioning and never produce a VM. This commit fixes this by adding several precautions:

  • We only consider machines having addresses set in .status.
  • We skip machines without openstack-resourceId annotation.
  • We skip checking machines that do not have VM in OpenStack (could have been deleted between we fetched the Machines and did OpenStack query).

@openshift-ci openshift-ci Bot requested review from mandre and mdbooth February 16, 2023 18:16
@dulek dulek changed the title Fix test checking if Machine addresses match VMs OCPBUGS-7310: Fix test checking if Machine addresses match VMs Feb 16, 2023
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid 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 Feb 16, 2023
@openshift-ci-robot
Copy link
Copy Markdown

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

Requesting review from QA contact:
/cc @eurijon

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

Details

In response to this:

The aforementioned test blindly tries to check all the Machines in the cluster, assuming each have a VM in OpenStack. That might not be true as in other tests we create Machines that are supposed to fail provisioning and never produce a VM. This commit fixes this by adding several precautions:

  • We only consider machines having addresses set in .status.
  • We skip machines without openstack-resourceId annotation.
  • We skip checking machines that do not have VM in OpenStack (could have been deleted between we fetched the Machines and did OpenStack query).

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 eurijon February 16, 2023 18:17
@dulek
Copy link
Copy Markdown
Contributor Author

dulek commented Feb 16, 2023

/cc @mandre
/cc @pierreprinetti

@dulek
Copy link
Copy Markdown
Contributor Author

dulek commented Feb 16, 2023

/cherry-pick release-4.12

@openshift-cherrypick-robot
Copy link
Copy Markdown

@dulek: once the present PR merges, I will cherry-pick it on top of release-4.12 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.12

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.

@dulek dulek force-pushed the prevent-bogus-machine branch from bf1f1ba to 85a5fb2 Compare February 17, 2023 08:28
@rlobillo
Copy link
Copy Markdown
Contributor

Hi @dulek,

I think we should not skip machines without openstack-resourceId annotation. That is one of the main checks in the test.

Isnt "only consider machines having addresses set in .status" enough for stabilizing the test?

@dulek
Copy link
Copy Markdown
Contributor Author

dulek commented Feb 17, 2023

Hi @dulek,

I think we should not skip machines without openstack-resourceId annotation. That is one of the main checks in the test.

Isnt "only consider machines having addresses set in .status" enough for stabilizing the test?

But if openstackResourceId == "", then the try to fetch the VM from Nova will imminently fail.

@dulek
Copy link
Copy Markdown
Contributor Author

dulek commented Feb 17, 2023

/retest

@rlobillo
Copy link
Copy Markdown
Contributor

rlobillo commented Feb 20, 2023

Hi @dulek,
I think we should not skip machines without openstack-resourceId annotation. That is one of the main checks in the test.
Isnt "only consider machines having addresses set in .status" enough for stabilizing the test?

But if openstackResourceId == "", then the try to fetch the VM from Nova will imminently fail.

Please ignore my comment. The openstack-resourceId annotation is checked on the previous test

o.Expect(err).NotTo(o.HaveOccurred(), "Error gathering Openstack info for machine %v", machine_name)

Sorry for the noise

Copy link
Copy Markdown
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

Just a small nit, otherwise LGTM.

Comment thread test/extended/openstack/servers.go Outdated
The aforementioned test blindly tries to check all the Machines in the
cluster, assuming each have a VM in OpenStack. That might not be true as
in other tests we create Machines that are supposed to fail provisioning
and never produce a VM. This commit fixes this by adding several
precautions:

* We only consider machines having addresses set in .status.
* We skip machines without openstack-resourceId annotation.
* We skip checking machines that do not have VM in OpenStack (could have
  been deleted between we fetched the Machines and did OpenStack query).
@dulek dulek force-pushed the prevent-bogus-machine branch from 85a5fb2 to 2541ec0 Compare February 20, 2023 10:19
Copy link
Copy Markdown
Member

@mandre mandre left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 20, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mandre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Feb 20, 2023
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 20, 2023

@dulek: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 9c32022 into openshift:main Feb 20, 2023
@openshift-ci-robot
Copy link
Copy Markdown

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

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

Details

In response to this:

The aforementioned test blindly tries to check all the Machines in the cluster, assuming each have a VM in OpenStack. That might not be true as in other tests we create Machines that are supposed to fail provisioning and never produce a VM. This commit fixes this by adding several precautions:

  • We only consider machines having addresses set in .status.
  • We skip machines without openstack-resourceId annotation.
  • We skip checking machines that do not have VM in OpenStack (could have been deleted between we fetched the Machines and did OpenStack query).

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

@dulek: new pull request created: #90

Details

In response to this:

/cherry-pick release-4.12

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. 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.

6 participants