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 1919336: Check if datastore belongs to a datastore cluster #28

Merged

Conversation

gnufied
Copy link
Member

@gnufied gnufied commented Feb 5, 2021

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1919336

Output after the change:

I0208 17:00:29.199915  150092 operator.go:251] CheckDefaultDatastore failed: defaultDatastore "team-ssd-intel" in vSphere configuration: datastore team-ssd-intel is part of intel-ds-cluster datastore cluster

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels Feb 5, 2021
@openshift-ci-robot
Copy link
Contributor

@gnufied: This pull request references Bugzilla bug 1919336, which is invalid:

  • expected the bug to target the "4.7.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

WIP: Bug 1919336: Check if datastore belongs to a datastore cluster

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-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 5, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2021
@gnufied gnufied changed the title WIP: Bug 1919336: Check if datastore belongs to a datastore cluster Bug 1919336: Check if datastore belongs to a datastore cluster Feb 8, 2021
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 8, 2021
@gnufied
Copy link
Member Author

gnufied commented Feb 8, 2021

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

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

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 8, 2021
@openshift-ci-robot
Copy link
Contributor

@gnufied: This pull request references Bugzilla bug 1919336, which is invalid:

  • expected the bug to target the "4.8.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1919336: Check if datastore belongs to a datastore cluster

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-robot openshift-ci-robot added bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. and removed bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 8, 2021
@gnufied gnufied force-pushed the add-datastore-cluster-check branch 2 times, most recently from 84f7a2c to ad4d8a3 Compare February 8, 2021 17:10
@gnufied
Copy link
Member Author

gnufied commented Feb 8, 2021

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot 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. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. labels Feb 8, 2021
@openshift-ci-robot
Copy link
Contributor

@gnufied: This pull request references Bugzilla bug 1919336, which is valid.

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

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Feb 8, 2021
pkg/check/datastore.go Show resolved Hide resolved
pkg/check/datastore.go Outdated Show resolved Hide resolved
}
}
}
klog.V(2).Infof("Checked datastore %s for SRDS - no problems found", dataStoreName)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is called for every StorageClass and might be too noisy.

Copy link
Member Author

Choose a reason for hiding this comment

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

increased the log level.

Copy link
Contributor

Choose a reason for hiding this comment

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

You increased it at wrong place, see above

Copy link
Member Author

Choose a reason for hiding this comment

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

yikes. fixed.

pkg/check/datastore.go Show resolved Hide resolved
pkg/check/datastore.go Show resolved Hide resolved
pkg/check/datastore.go Outdated Show resolved Hide resolved
return nil
}

func checkForDatastoreCluster(ctx *CheckContext, dataStoreName string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps for a subsequent PR: This is called for every StorageClass and loads non-trivial amount of data from vSphere. Would it be possible to call it only once per dataStorageName? I.e. with a cache somewhere in CheckStorageClasses? It's not that easy, because there is CheckDefaultDatastore too...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we could. I think it might be worth caching the information within the same run. but once all the checks are run -we can automatically expire the cache, so as they aren't reused in next run.

Ensure that datastore check gets called
Add unit tests for the same
fix test data to have datastore cluster
@gnufied gnufied force-pushed the add-datastore-cluster-check branch 2 times, most recently from e9ed0d3 to 07c8536 Compare February 10, 2021 04:34
Also add comments that explains when alerts gets ignored
pkg/check/datastore.go Outdated Show resolved Hide resolved
}
}
}
klog.V(2).Infof("Checked datastore %s for SRDS - no problems found", dataStoreName)
Copy link
Contributor

Choose a reason for hiding this comment

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

You increased it at wrong place, see above

pkg/check/datastore.go Outdated Show resolved Hide resolved
@gnufied
Copy link
Member Author

gnufied commented Feb 10, 2021

@jsafrane fixed the comments. PTAL

@jsafrane
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2021
@openshift-merge-robot openshift-merge-robot merged commit 23501bd into openshift:master Feb 10, 2021
@openshift-ci-robot
Copy link
Contributor

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

Bugzilla bug 1919336 has been moved to the MODIFIED state.

In response to this:

Bug 1919336: Check if datastore belongs to a datastore cluster

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

4 participants