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

ACM-17554: Save version of imported clusters - ACM 2.11 #7251

Open
wants to merge 1 commit into
base: release-ocm-2.11
Choose a base branch
from

Conversation

jhernand
Copy link
Contributor

This is a backport of OCPBUGS-42059 and #7249 for ACM 2.11.

Currently when a cluster is imported the openshift_version column of the database is not populated. As a result that version will not be available for validations, in particular for the validation that checks if dual-stack VIPs are supported. A side effect of that is that adding a node to a cluster with dual-stack VIPs will always fail with an error message like this, regardless of the version:

"dual-stack VIPs are not supported in OpenShift "

That error happens because we are trying to see if the version is less than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it populates the openshift_version database column.

List all the issues related to this PR

https://issues.redhat.com/browse/ACM-17554
https://issues.redhat.com/browse/OCPBUGS-42059

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

This is a backport of OCPBUGS-42059 and openshift#7249 for ACM 2.11.

Currently when a cluster is imported the `openshift_version` column of
the database is not populated. As a result that version will not be
available for validations, in particular for the validation that checks
if dual-stack VIPs are supported. A side effect of that is that adding a
node to a cluster with dual-stack VIPs will always fail with an error
message like this, regardless of the version:

```
"dual-stack VIPs are not supported in OpenShift "
```

That error happens because we are trying to see if the version is less
than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it
populates the `openshift_version` database column.

Related: https://issues.redhat.com/browse/ACM-17554
Related: https://issues.redhat.com/browse/OCPBUGS-42059
Signed-off-by: Juan Hernandez <[email protected]>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 31, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 31, 2025

@jhernand: This pull request references ACM-17554 which is a valid jira issue.

In response to this:

This is a backport of OCPBUGS-42059 and #7249 for ACM 2.11.

Currently when a cluster is imported the openshift_version column of the database is not populated. As a result that version will not be available for validations, in particular for the validation that checks if dual-stack VIPs are supported. A side effect of that is that adding a node to a cluster with dual-stack VIPs will always fail with an error message like this, regardless of the version:

"dual-stack VIPs are not supported in OpenShift "

That error happens because we are trying to see if the version is less than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it populates the openshift_version database column.

List all the issues related to this PR

https://issues.redhat.com/browse/ACM-17554
https://issues.redhat.com/browse/OCPBUGS-42059

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 31, 2025
@openshift-ci openshift-ci bot requested review from eifrach and romfreiman January 31, 2025 12:50
Copy link

openshift-ci bot commented Jan 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jhernand
Once this PR has been reviewed and has the lgtm label, please assign rccrdpccl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.52%. Comparing base (bf5366e) to head (14c98e6).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-ocm-2.11    #7251   +/-   ##
=================================================
  Coverage             68.51%   68.52%           
=================================================
  Files                   247      247           
  Lines                 36445    36448    +3     
=================================================
+ Hits                  24972    24976    +4     
+ Misses                 9262     9261    -1     
  Partials               2211     2211           
Files with missing lines Coverage Δ
internal/bminventory/inventory.go 71.11% <100.00%> (+<0.01%) ⬆️
...oller/controllers/clusterdeployments_controller.go 71.57% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

Copy link

openshift-ci bot commented Jan 31, 2025

@jhernand: 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/subsystem-aws 14c98e6 link true /test subsystem-aws

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants