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

PB-8410 Fix global variable reset issue #406

Merged
merged 1 commit into from
Nov 26, 2024
Merged

PB-8410 Fix global variable reset issue #406

merged 1 commit into from
Nov 26, 2024

Conversation

vsundarraj-px
Copy link
Contributor

@vsundarraj-px vsundarraj-px commented Nov 26, 2024

What this PR does / why we need it:
This addresses regression caused due to last commit for PB-8410 where global variable was never getting set due to local shodowing of the variable.
Which issue(s) this PR fixes (optional)
Closes # PB-8410

Special notes for your reviewer:

The main culprit code is at line 1251. Rest of the change is to make debugging easier.

Unit testing
Retry code kicking in with 10m timeout set
Screenshot 2024-11-26 at 7 21 41 AM

Debug code showing timeOut of 10m getting reflected
Screenshot 2024-11-26 at 9 54 01 AM

Screen shot showing pod successfully running even after mount failure timeOut elapsing. This is to ensure that timeOut is only for failure and not for successfully running job.

Screenshot 2024-11-26 at 10 02 21 AM

Copy link

License Evaluation Results:

Title Package Name Package Version Severity License Info Introduced
MPL-2.0 license github.com/hashicorp/errwrap 1.1.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/portworx@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/snapshot/controllers@#1b6d535ef497', 'github.com/hashicorp/[email protected]', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-multierror 1.1.1 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/portworx@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/snapshot/controllers@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/portworx@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/resourcecollector@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/csi@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/utils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/aws@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/azure@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/gcp@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/portworx@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/snapshot/controllers@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/snapshotter@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/drivers/volume/kdmp@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/utils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']
MPL-2.0 license github.com/hashicorp/go-version 1.6.0 medium MPL-2.0 ['github.com/portworx/[email protected]', 'github.com/libopenstorage/stork/pkg/applicationmanager/controllers@#1b6d535ef497', 'github.com/libopenstorage/stork/drivers/volume/kdmp@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/utils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/k8sutils@#1b6d535ef497', 'github.com/libopenstorage/stork/pkg/version@#1b6d535ef497', 'github.com/hashicorp/[email protected]']

Total License Issues: 17

@vsundarraj-px
Copy link
Contributor Author

Unit test result of default value set when nothing is set on configMap
Screenshot 2024-11-26 at 11 38 44 AM

if err != nil {
// we should never reach here.
logrus.Debugf("%v: failed to parse the failure timeout set %v: %v", fn, JobFailureRetryTimeout, err)
logrus.Debugf("%v: error parsing %v value. Retaining current setting %v: %v", fn, PxbJobFailureRetryTimeoutKey, JobFailureRetryTimeout, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we need to initialize duration to some value here? otherwise if this is hit JobFailureRetryTimeout might be set to 0 in next line

@vsundarraj-px vsundarraj-px merged commit f6dc1e5 into 1.2.16 Nov 26, 2024
3 checks passed
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.

4 participants