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

PWX-38583 : fix nil pointer derefernce in operator pod #1643

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

nikita-bhatia
Copy link
Contributor

@nikita-bhatia nikita-bhatia commented Aug 14, 2024

What this PR does / why we need it: Operator pod crashes with nil pointer dereference error while upgrading PX from 3.1.1 to 3.1.2
because, cluster.Spec.UpdateStrategy.RollingUpdate.Disruption.Allow, becuase when Allow is *bool and the value was not set, it was nil and trying to dereference a nil pointer resulted in a nil pointer dereference error.

As a fix, changed Allow bool instead of *bool, since the value can be either true/false.

Which issue(s) this PR fixes (optional)
Closes # https://purestorage.atlassian.net/browse/PWX-38583

Special notes for your reviewer:
Verified on vanilla k8s

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.79%. Comparing base (0b87a72) to head (47c7b17).

Additional details and impacted files
@@               Coverage Diff               @@
##           release-24.2.0    #1643   +/-   ##
===============================================
  Coverage           79.79%   79.79%           
===============================================
  Files                  61       61           
  Lines               18833    18833           
===============================================
  Hits                15028    15028           
  Misses               2715     2715           
  Partials             1090     1090           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@svijaykumar-px svijaykumar-px left a comment

Choose a reason for hiding this comment

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

LGTM. This works, tested on upgrade job

@nikita-bhatia nikita-bhatia merged commit 9bc256c into release-24.2.0 Aug 14, 2024
9 checks passed
@nikita-bhatia nikita-bhatia deleted the PWX-38583 branch August 14, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants