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

Add parameter to not create additional users on cloudstack-setup-databases #9969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucas-a-martins
Copy link
Contributor

Description

When using the cloudstack-setup-databases command during the database setup process, some additional users are created. Since the standard procedure involves creating and configuring database users prior to the ACS setup, these extra users are not used. Moreover, the additional users created by cloudstack-setup-databases are granted excessive permissions, requiring operators to manually delete them.

This PR introduces a new optional parameter, --skip-users-auto-creation. By using this parameter, ACS will skip the automatic creation of these additional users.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

After executing the cloudstack-setup-databases with the new flag, I checked the database users and, as expected, no new users were created. I then repeated the procedure without the new flag, and the extra users were created as usual.

"GRANT ALL ON cloud_usage.* to cloud@`localhost`;",
"GRANT ALL ON cloud_usage.* to cloud@`%`;",
"GRANT process ON *.* TO cloud@`localhost`;",
"GRANT process ON *.* TO cloud@`%`;",
Copy link
Contributor

Choose a reason for hiding this comment

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

last 2 queries are duplicates.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.80%. Comparing base (b38ee63) to head (f06f5a8).
Report is 8 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9969      +/-   ##
============================================
- Coverage     15.80%   15.80%   -0.01%     
+ Complexity    12586    12585       -1     
============================================
  Files          5627     5627              
  Lines        492328   492343      +15     
  Branches      59692    59694       +2     
============================================
- Hits          77828    77826       -2     
- Misses       405977   405993      +16     
- Partials       8523     8524       +1     
Flag Coverage Δ
uitests 4.04% <ø> (-0.01%) ⬇️
unittests 16.62% <ø> (-0.01%) ⬇️

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.

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