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

Prevent upgrade if one of the operand is not upgradeable #1920

Merged
merged 1 commit into from
May 3, 2022

Conversation

nunnatsa
Copy link
Collaborator

@nunnatsa nunnatsa commented May 3, 2022

If an operand upgradeable condition is false, HCO will set the operator
condition's Upgradeable condition to false.

Signed-off-by: Nahshon Unna-Tsameret nunnatsa@redhat.com

Reviewer Checklist

Reviewers are supposed to review the PR for every aspect below one by one. To check an item means the PR is either "OK" or "Not Applicable" in terms of that item. All items are supposed to be checked before merging a PR.

  • PR Message
  • Commit Messages
  • How to test
  • Unit Tests
  • Functional Tests
  • User Documentation
  • Developer Documentation
  • Upgrade Scenario
  • Uninstallation Scenario
  • Backward Compatibility
  • Troubleshooting Friendly

Release note:

Prevent upgrade if one of the operand is not upgradeable

If an operand upgradeable condition is false, HCO will set the operator
condition's Upgradeable condition to false.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels May 3, 2022
@nunnatsa nunnatsa requested a review from tiraboschi May 3, 2022 14:24
@kubevirt-bot kubevirt-bot requested a review from sradco May 3, 2022 14:24
@coveralls
Copy link
Collaborator

coveralls commented May 3, 2022

Pull Request Test Coverage Report for Build 2264549561

  • 30 of 35 (85.71%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 84.295%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/hyperconverged/hyperconverged_controller.go 14 15 93.33%
controllers/common/hcoConditions.go 0 4 0.0%
Totals Coverage Status
Change from base Build 2264133951: 0.03%
Covered Lines: 4149
Relevant Lines: 4922

💛 - Coveralls

If an operand upgradeable condition is false, HCO will set the operator
condition's Upgradeable condition to false.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented May 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hco-bot
Copy link
Collaborator

hco-bot commented May 3, 2022

hco-e2e-image-index-gcp, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-upgrade-prev-index-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-azure
hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-upgrade-index-sno-aws, ci/prow/hco-e2e-upgrade-prev-index-azure

In response to this:

hco-e2e-image-index-gcp, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-upgrade-prev-index-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-index-azure
hco-e2e-upgrade-index-sno-azure lane succeeded.
/override ci/prow/hco-e2e-upgrade-index-sno-aws

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.

@tiraboschi
Copy link
Member

/retest

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label May 3, 2022
@tiraboschi
Copy link
Member

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2022
@openshift-ci
Copy link

openshift-ci bot commented May 3, 2022

@nunnatsa: The following tests 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/hco-e2e-upgrade-index-sno-aws 820dc58 link false /test hco-e2e-upgrade-index-sno-aws
ci/prow/hco-e2e-image-index-azure 820dc58 link true /test hco-e2e-image-index-azure
ci/prow/hco-e2e-upgrade-prev-index-azure 820dc58 link true /test hco-e2e-upgrade-prev-index-azure
ci/prow/hco-e2e-image-index-sno-azure 820dc58 link false /test hco-e2e-image-index-sno-azure

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.

@tiraboschi
Copy link
Member

/override-bot

@hco-bot
Copy link
Collaborator

hco-bot commented May 3, 2022

hco-e2e-image-index-sno-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-sno-azure

In response to this:

hco-e2e-image-index-sno-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-sno-azure

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.

@kubevirt-bot kubevirt-bot merged commit 329ba42 into kubevirt:main May 3, 2022
@nunnatsa nunnatsa deleted the prevent-upgrade branch May 4, 2022 04:43
nunnatsa added a commit to nunnatsa/hyperconverged-cluster-operator that referenced this pull request May 9, 2022
If an operand upgradeable condition is false, HCO will set the operator
condition's Upgradeable condition to false.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request May 10, 2022
* Prevent upgrade if one of the operand is not upgradeable (#1920)

If an operand upgradeable condition is false, HCO will set the operator
condition's Upgradeable condition to false.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

* Add new metric: HyperConvergedCRExists

The metric behaves as a bopolean value: if the it will be 1 if the
HyperConverged custom resource is exist, or 0 if not.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

* Add alert if the new metric is zero

If the new kubevirt_hco_hyperconverged_cr_exists metric is zero, then
trigger an alert that the installtion was not completed yet.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

* wait an hour before start the new alert

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>

* fix code review comments

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants