assisted-service icon indicating copy to clipboard operation
assisted-service copied to clipboard

MGMT-21599:AI: Installing ODF operator on compact cluster (LPAR) not …

Open bkopilov opened this issue 4 months ago • 4 comments

…possible

Added support for ODF installation on FC disk type. Operator's ODF disk may SSD or HDD or FC disk.

List all the issues related to this PR

  • [ ] New Feature
  • [ ] Enhancement
  • [X ] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

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

How was this code tested?

  • [ ] assisted-test-infra environment
  • [ ] dev-scripts environment
  • [ ] Reviewer's test appreciated
  • [X ] 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?

bkopilov avatar Nov 03 '25 14:11 bkopilov

@bkopilov: This pull request references MGMT-21599 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.21.0" version, but no target version was set.

In response to this:

…possible

Added support for ODF installation on FC disk type. Operator's ODF disk may SSD or HDD or FC disk.

List all the issues related to this PR

  • [ ] New Feature
  • [ ] Enhancement
  • [X ] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

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

How was this code tested?

  • [ ] assisted-test-infra environment
  • [ ] dev-scripts environment
  • [ ] Reviewer's test appreciated
  • [X ] 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-robot avatar Nov 03 '25 14:11 openshift-ci-robot

Walkthrough

This change extends disk type validation logic to recognize Fiber Channel (FC) drives as eligible disk types alongside SSD and HDD. Updates span the common operator logic, ODF operator error messaging, and corresponding test cases with updated assertions.

Changes

Cohort / File(s) Summary
Core disk validation logic
internal/operators/common/common.go
Added imports for models, conversions, and slices. Introduced validDiskTypes set containing DriveTypeSSD, DriveTypeHDD, and DriveTypeFC. Replaced explicit SSD/HDD conditional check with slices.Contains(validDiskTypes, disk.DriveType) membership test for determining disk eligibility.
ODF operator error messaging
internal/operators/odf/odf_operator.go
Updated host validation error message to require at least one non-installation SSD/HDD or FC disk per host for ODF deployment modes.
ODF operator test data and assertions
internal/operators/odf/odf_operator_test.go
Updated test disk configurations to use DriveTypeFC in place of DriveTypeSSD for certain worker disks. Updated all expected validation messages and error strings to include FC disk as an acceptable non-installation disk type alongside SSD and HDD.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Logic change is straightforward: membership test using slices API replaces explicit conditions
  • Test updates are repetitive message string modifications following a consistent pattern
  • Verify that validDiskTypes set is correctly initialized with all three drive types
  • Confirm error messages consistently reflect FC disk inclusion across all deployment modes

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'MGMT-21599:AI: Installing ODF operator on compact cluster (LPAR) not …' is partially related to the changeset. While it indicates work on ODF operator installation on a compact cluster, it is incomplete (truncated with '…'), making it difficult to assess full clarity. The main objective—adding FC disk support to ODF validation—is not clearly reflected in the title, though it relates to enabling ODF installation scenarios. Consider revising the title to be more complete and specific. A clearer title might be 'Add FC disk support to ODF operator validation' or 'Enable ODF installation with FC disks on compact clusters', which more directly conveys the primary change without truncation.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description addresses the core change (adding FC disk support for ODF) but is incomplete relative to the template. While the author marked 'Bug fix' and 'Waiting for CI', they left critical checklist items unchecked and incomplete: title/description completeness not confirmed, related issues not explicitly linked (only Jira reference in title), documentation update requirement not addressed, and unit-tests inclusion requirement left unmarked. The testing justification and context could be more detailed.
✨ Finishing touches
  • [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 03 '25 14:11 coderabbitai[bot]

Hi @bkopilov. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

openshift-ci[bot] avatar Nov 03 '25 14:11 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bkopilov 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

openshift-ci[bot] avatar Nov 03 '25 14:11 openshift-ci[bot]

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Feb 02 '26 01:02 openshift-bot