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-17553: Save version of imported clusters - ACM 2.12 #7250

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

Conversation

jhernand
Copy link
Contributor

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

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-17553
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 for ACM 2.12.

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-17553
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-17553 which is a valid jira issue.

In response to this:

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

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-17553
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 oourfali and pastequo January 31, 2025 12:43
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 pastequo 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

@jhernand jhernand changed the title ACM-17553: Save version of imported clusters ACM-17553: Save version of imported clusters - ACM 2.12 Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.31%. Comparing base (a5e16aa) to head (4671cf3).

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-ocm-2.12    #7250   +/-   ##
=================================================
  Coverage             68.30%   68.31%           
=================================================
  Files                   257      257           
  Lines                 37611    37614    +3     
=================================================
+ Hits                  25692    25695    +3     
  Misses                 9635     9635           
  Partials               2284     2284           
Files with missing lines Coverage Δ
internal/bminventory/inventory.go 70.71% <100.00%> (+<0.01%) ⬆️
...oller/controllers/clusterdeployments_controller.go 71.57% <100.00%> (+0.03%) ⬆️

@gamli75
Copy link
Contributor

gamli75 commented Feb 2, 2025

/retest-required

Copy link

openshift-ci bot commented Feb 2, 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 4671cf3 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.

3 participants