-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Clean up network permissions on account deletion #10176
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
Clean up network permissions on account deletion #10176
Conversation
|
@blueorangutan package |
|
@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #10176 +/- ##
=========================================
Coverage 15.12% 15.13%
- Complexity 11268 11270 +2
=========================================
Files 5408 5408
Lines 473954 473965 +11
Branches 57810 57810
=========================================
+ Hits 71709 71716 +7
- Misses 394231 394236 +5
+ Partials 8014 8013 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12059 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
|
[SF] Trillian test result (tid-12095)
|
|
verified in lab env |
* 4.20: Maintenance mode: Add host to deployment planner avoid list to fix local storage vm migration (#9892) Add project-user association normalization script to 4.20.1 upgrade (#10116) fix slider component for global settings of the range type (#10187) Clean up network permissions on account deletion (#10176)
Description
Currently, if an account with network permissions for guest networks is deleted, CloudStack does not automatically delete these permissions, and operators cannot delete them later through the APIs. The workaround for this scenario is to manually remove the permissions entries from the
cloud.network_permissionstable. Therefore, this PR proposes to clean up the network permissions of an account when it is deleted.Additionally, when attempting to delete an account that is a project administrator, an error message is returned. This error message has been enhanced to include instructions on the next steps the operator should perform to properly delete the given account.
Fixes #10103
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
First, I created a domain
ROOT/d1, a domain admin (d1) and two regular users within it (u1andu2). With thed1account, I created a project and added theu1account as a project administrator.When attempting to delete the
u1account, an error message was returned, indicating that the account was a project administrator.After demoting the account to a regular project role, I created two guest networks and granted permission to both
u1andu2accounts.Then, I deleted the
u1account, which has a serial ID equal to16, and verified that the network permissions were correctly expunged:I reproduced these same steps with the
u2account and verified that the network permissions were also correctly deleted.