Skip to content

PowerFlex Minimal Installation Bugfix#997

Merged
ChristianAtDell merged 8 commits intomainfrom
pub/pflex-minimal-fix
May 29, 2025
Merged

PowerFlex Minimal Installation Bugfix#997
ChristianAtDell merged 8 commits intomainfrom
pub/pflex-minimal-fix

Conversation

@ChristianAtDell
Copy link
Copy Markdown
Contributor

@ChristianAtDell ChristianAtDell commented May 28, 2025

Description

Fix for minimal PowerFlex installations failing due to a nil reference in Operator. Also addresses out-of-date SDC versions in default configs.

A WORKAROUND exists that will work on previous release(s), by adding the following to the manifest:

node:
  envs:
    - name: X_CSI_SDC_SFTP_REPO_ENABLED
      value: "false"

But this PR makes this workaround not necessary on latest code.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1895

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility
  • I have executed the relevant end-to-end test scenarios

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

Operator E2E with --minimal --pflex has been run.

@ChristianAtDell ChristianAtDell changed the title Pub/pflex minimal fix PowerFlex Minimal Installation Bugfix May 28, 2025
@ChristianAtDell ChristianAtDell marked this pull request as ready for review May 28, 2025 20:23
@atye
Copy link
Copy Markdown
Contributor

atye commented May 29, 2025

Should the workaround be added to the old sample files so the user doesn't have to?

if env.Value != "true" {
_ = drivers.RemoveInitVolume(&node.DaemonSetApplyConfig, drivers.SftpKeys)
if (cr.Spec.Driver.Node != nil) && cr.Spec.Driver.Node.Envs != nil {
for _, env := range cr.Spec.Driver.Node.Envs {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One observation is that it seems we don't handle duplicate environment variables. For the X_CSI_SDC_SFTP_REPO_ENABLED environment variable, the first occurrence is considered, and for the other environment variables, the last occurrence is considered. Do we need to mention this behavior in the docs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is this really a concern? YAML files aren't intended to have duplicate copies of the same key in a key-value pair for environment variables, I don't think.

If there is some behavior used by other environment variables, though, I can try to make this one match-- I didn't write this statement in the first place, I believe @harishp8889 did so I'm not sure why the behavior is incongruent with other env vars.

@github-actions
Copy link
Copy Markdown
Contributor

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csm-operator/controllers 90.30% (+0.03%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csm-operator/controllers/csm_controller.go 90.30% (+0.03%) 722 (+2) 652 (+2) 70 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csm-operator/controllers/csm_controller_test.go

@ChristianAtDell ChristianAtDell merged commit 692a45d into main May 29, 2025
6 checks passed
@ChristianAtDell ChristianAtDell deleted the pub/pflex-minimal-fix branch May 29, 2025 17:37
@riya-kaushal7997 riya-kaushal7997 restored the pub/pflex-minimal-fix branch July 17, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants