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

CASMCMS-8946: Correct two problems with operating on empty node lists #263

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

mharding-hpe
Copy link
Contributor

@mharding-hpe mharding-hpe commented Mar 11, 2024

This PR addresses two problems:

  1. In the base BOS operator, when it is detecting and acting on components, up front it gets a list of components and returns if it is empty. But then it filters that list to remove any components which have exceeded their retry limits. After doing that, it does not check again to see if the list is empty, even though it may be. This PR adds a check after that filtering.

  2. The CAPMC client power function is supposed to return a CapmcXnameOnOffReturnedError object. The code in the _power_components method in the base power operator depends on this, because it assumes the returned object will have an error_code attribute. However, if an empty list of nodes is passed into the power function, then it returns a tuple of an empty set and an empty dictionary. From the git history, this just looks like an early piece of prototyping code that never got updated. This PR changes it so that it instead returns an "empty" object of the correct kind. (I also verified that no other code calls the power function and for some reason depends on the current behavior)

Jira: https://jira-pro.it.hpe.com:8443/browse/CASMCMS-8946
CSM 1.5.1 PR: #264
CSM 1.6 PR: #265

@mharding-hpe mharding-hpe merged commit eecbdc2 into support/2.0 Mar 12, 2024
4 checks passed
@mharding-hpe mharding-hpe deleted the CASMCMS-8946-csm-1.4 branch March 12, 2024 18:23
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.

2 participants