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

MGMT-17438: bugfix, make sure ODF and LVM requirements do not change if MCE not selected #6150

Conversation

rccrdpccl
Copy link
Contributor

When selecting MCE and ODF we will add additional storage requirements to the operator singleton, which was never reset. This mean that if we install once MCE and ODF, all installations after that will keep additional requirements even if not necessary. This PR fixes this issue.

/cc @bkopilov @carbonin

List all the issues related to this PR

  • 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?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 4, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 4, 2024

@rccrdpccl: This pull request references MGMT-17438 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.16.0" version, but no target version was set.

In response to this:

When selecting MCE and ODF we will add additional storage requirements to the operator singleton, which was never reset. This mean that if we install once MCE and ODF, all installations after that will keep additional requirements even if not necessary. This PR fixes this issue.

/cc @bkopilov @carbonin

List all the issues related to this PR

  • 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 requested a review from carbonin April 4, 2024 12:06
Copy link

openshift-ci bot commented Apr 4, 2024

@rccrdpccl: GitHub didn't allow me to request PR reviews from the following users: bkopilov.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

When selecting MCE and ODF we will add additional storage requirements to the operator singleton, which was never reset. This mean that if we install once MCE and ODF, all installations after that will keep additional requirements even if not necessary. This PR fixes this issue.

/cc @bkopilov @carbonin

List all the issues related to this PR

  • 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 kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 4, 2024
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 73.07692% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 68.32%. Comparing base (d3dd289) to head (1f40608).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6150   +/-   ##
=======================================
  Coverage   68.31%   68.32%           
=======================================
  Files         242      242           
  Lines       35817    35824    +7     
=======================================
+ Hits        24470    24475    +5     
+ Misses       9221     9219    -2     
- Partials     2126     2130    +4     
Files Coverage Δ
internal/operators/cnv/cnv_operator.go 79.65% <100.00%> (ø)
internal/operators/manager.go 78.07% <100.00%> (+1.65%) ⬆️
internal/operators/mce/mce_operator.go 71.55% <100.00%> (ø)
internal/operators/odf/validations.go 97.61% <100.00%> (ø)
internal/operators/lso/ls_operator.go 9.52% <0.00%> (ø)
internal/operators/odf/odf_operator.go 63.33% <81.81%> (+0.24%) ⬆️
internal/operators/lvm/lvm_operator.go 76.63% <42.85%> (-3.56%) ⬇️

... and 3 files with indirect coverage changes

@carbonin
Copy link
Member

carbonin commented Apr 4, 2024

we will add additional storage requirements to the operator singleton, which was never reset

It feels to me like the answer isn't to reset this, but to not do it in the first place. Is that an option?
If we have some kind of global for these operators then that's bad enough, but trying to edit and reset data on them without any kind of sync mechanism is worse.

@rccrdpccl
Copy link
Contributor Author

we will add additional storage requirements to the operator singleton, which was never reset

It feels to me like the answer isn't to reset this, but to not do it in the first place. Is that an option? If we have some kind of global for these operators then that's bad enough, but trying to edit and reset data on them without any kind of sync mechanism is worse.

I'll try to think something, the main issue is that I do not want to make aware MCE (or any other operator) of other operators, that would cause a mess of dependencies.

@rccrdpccl rccrdpccl force-pushed the MGMT-17438-bugfix-odf-lvm-requirements-should-not-change-if-mce-not-selected branch from 6fc61d2 to 4e60632 Compare April 4, 2024 19:14
@rccrdpccl
Copy link
Contributor Author

The change aims to pass to additional requirements when that can be understood only from the manager when validating the hosts. In this instance the additional disk requirement is only when a combinations of operators are activated.
As each operator is not aware of the others, only the manager can issue additional requirements.

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

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

Looks good other than that name.

@@ -38,7 +38,7 @@ type Operator interface {
// ValidateCluster verifies whether this operator is valid for given cluster
ValidateCluster(ctx context.Context, cluster *common.Cluster) (ValidationResult, error)
// ValidateHost verifies whether this operator is valid for given host
ValidateHost(ctx context.Context, cluster *common.Cluster, hosts *models.Host) (ValidationResult, error)
ValidateHost(ctx context.Context, cluster *common.Cluster, hosts *models.Host, interOperatorRequirements *models.ClusterHostRequirementsDetails) (ValidationResult, error)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe name this just additionalOperatorRequirements?
I could see this being useful for other runtime stuff that might come up.

…if MCE is not selected

Signed-off-by: Riccardo Piccoli <rpiccoli@redhat.com>
@rccrdpccl rccrdpccl force-pushed the MGMT-17438-bugfix-odf-lvm-requirements-should-not-change-if-mce-not-selected branch from 4e60632 to 1f40608 Compare April 5, 2024 07:19
Copy link

openshift-ci bot commented Apr 5, 2024

@rccrdpccl: all tests passed!

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2024
Copy link

openshift-ci bot commented Apr 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carbonin, rccrdpccl

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-merge-bot openshift-merge-bot bot merged commit 484ec5c into openshift:master Apr 5, 2024
17 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-agent-installer-api-server-container-v4.16.0-202404051041.p0.g484ec5c.assembly.stream.el8 for distgit ose-agent-installer-api-server.
All builds following this will include this PR.

@rccrdpccl
Copy link
Contributor Author

/cherry-pick cloud_hotfix_releases

@openshift-cherrypick-robot

@rccrdpccl: new pull request created: #6160

In response to this:

/cherry-pick cloud_hotfix_releases

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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants