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

Mm bugfix/drs threshold backwards #73

Conversation

mikemorency
Copy link
Collaborator

SUMMARY

Fixes #68

When setting the DRS vmotion rate, the user input value gets reversed by the vCenter API (so 1 becomes 5 and 5 becomes 1). This is confusing because the UI and documentation do not indicate this in anyway.
This fix makes the module reverse the numbers in code, so if a user chooses a rate of 1, we change it to 5 in code before inputting it in the API. It will display as 1 in the UI which is what the user wanted in the first place.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

cluster_drs

ADDITIONAL INFORMATION

The community.vmware.vcenter_cluster_info module reports back what the API says. This means that if the user sets the DRS rate to 2, the cluster info module will say the DRS rate is 4. Obviously this is confusing, so when the info module is migrated to this repo, we should fix that as well. I left a note in our tests (which use that module) and made a jira ticket to follow up.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 26.37%. Comparing base (013afa4) to head (3bb9381).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
plugins/modules/cluster_drs.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   26.09%   26.37%   +0.28%     
==========================================
  Files          19       20       +1     
  Lines        1667     1744      +77     
  Branches      331      340       +9     
==========================================
+ Hits          435      460      +25     
- Misses       1232     1284      +52     
Flag Coverage Δ
sanity 26.37% <66.66%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@mikemorency mikemorency requested a review from bardielle October 1, 2024 12:38
Copy link
Collaborator

@anna-savina anna-savina left a comment

Choose a reason for hiding this comment

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

LGTM

@mikemorency mikemorency force-pushed the mm-bugfix/drs-threshold-backwards branch from a01b958 to 3bb9381 Compare October 1, 2024 12:58
@mikemorency mikemorency merged commit 98ddcfd into ansible-collections:main Oct 8, 2024
13 checks passed
@mikemorency mikemorency deleted the mm-bugfix/drs-threshold-backwards branch October 8, 2024 13:10
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.

vmware.vmware.cluster_drs has drs_vmotion_rate inverted
3 participants