You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "hsato03 (via GitHub)" <gi...@apache.org> on 2023/08/14 21:15:21 UTC
[GitHub] [cloudstack] hsato03 opened a new pull request, #7868: Removed state for removed accounts
hsato03 opened a new pull request, #7868:
URL: https://github.com/apache/cloudstack/pull/7868
### Description
When deleting an account, its state is maintained as `Enabled` even if it is removed.
Accordingly the `Removed` state for accounts was created, which is always set when an account is deleted.
### 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)
- [X] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [X] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
I created and deleted an account. Then, I created a SELECT SQL query for the `account` table and the account state was `Removed`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1701842987
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_multiplication_x: debian :heavy_check_mark: suse15. SL-JID 6955
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] hsato03 commented on pull request #7868: Removed state for removed accounts
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1701809341
I agree with @rohityadavcloud and @weizhouapache, REMOVED sounds better for accounts. @DaanHoogland Although your idea of standardizing the state of entities is good, there are already other entities that use the REMOVED state.
> LGTM - I'm not sure if there could be only possible side-effects; or it should also emit some kind of event for usage-server?
@rohityadavcloud ACS already emits an event when deleting an account.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7868: Removed state for removed accounts
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1680225535
@weizhouapache REMOVED does make sense but having different terms with the same meaning is something we should prevent, and adding a new one should replace all occurences of the old ones. Not going to block this for that reason, but it will be confusing for new operators and developers alike.
worth a discuss thread?
cc @soreana @hsato03
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] rohityadavcloud commented on a diff in pull request #7868: Removed state for removed accounts
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on code in PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#discussion_r1301324697
##########
api/src/main/java/com/cloud/user/Account.java:
##########
@@ -30,7 +30,7 @@ public interface Account extends ControlledEntity, InternalIdentity, Identity {
* Account states.
* */
enum State {
- DISABLED, ENABLED, LOCKED;
+ DISABLED, ENABLED, LOCKED, DESTROYED;
Review Comment:
Can we call it REMOVED ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7868: Removed state for removed accounts
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1683491953
I think this can be included in 4.18.1 as well, but do not mind either way
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] soreana commented on pull request #7868: Removed state for removed accounts
Posted by "soreana (via GitHub)" <gi...@apache.org>.
soreana commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1723733618
@DaanHoogland I tested that on fresh install of the CloudStack. I haven't tested the upgrade path from 4.18 to 4.19. I can check that as well later this week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on pull request #7868: Removed state for removed accounts
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1680065732
> Good change! one remark, other entities have a state DESTROYED. maybe it would make sense to be in line with that?
@DaanHoogland
to be honest, I think `removed` makes more sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] hsato03 commented on pull request #7868: Removed state for removed accounts
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1739753731
@soreana Thank's for testing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1701799382
@soreana a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] github-actions[bot] commented on pull request #7868: Removed state for removed accounts
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1689560857
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] soreana commented on pull request #7868: Removed state for removed accounts
Posted by "soreana (via GitHub)" <gi...@apache.org>.
soreana commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1739254877
Hi @DaanHoogland @hsato03,
I've tested the upgrade from 4.18.1 to 4.19 the process went smooth and the account have removed state now.
Before upgrade:
```
MariaDB [cloud]> select account_name,state,removed from account ;
+--------------------------+---------+---------------------+
| account_name | state | removed |
+--------------------------+---------+---------------------+
| system | enabled | NULL |
| admin | enabled | NULL |
| baremetal-system-account | enabled | NULL |
| Removed-01 | enabled | 2023-09-28 08:41:35 |
| Removed-02 | enabled | 2023-09-28 08:45:18 |
| Removed-03 | enabled | 2023-09-28 08:46:16 |
+--------------------------+---------+---------------------+
6 rows in set (0.001 sec)
MariaDB [cloud]>
```
After upgrade:
```
MariaDB [cloud]> select account_name,state,removed from account ;
+--------------------------+---------+---------------------+
| account_name | state | removed |
+--------------------------+---------+---------------------+
| system | enabled | NULL |
| admin | enabled | NULL |
| baremetal-system-account | enabled | NULL |
| Removed-01 | removed | 2023-09-28 08:41:35 |
| Removed-02 | removed | 2023-09-28 08:45:18 |
| Removed-03 | removed | 2023-09-28 08:46:16 |
+--------------------------+---------+---------------------+
6 rows in set (0.001 sec)
MariaDB [cloud]>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on pull request #7868: Removed state for removed accounts
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1687809974
> LGTM - I'm not sure if there could be only possible side-effects; or it should also emit some kind of event for usage-server?
it is one of my concerns as well.
let's consider it for 4.19.0.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1678551360
@weizhouapache a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] hsato03 commented on pull request #7868: Removed state for removed accounts
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1679631171
>
> Good change! one remark, other entities have a state DESTROYED. maybe it would make sense to be in line with that?
@DaanHoogland Yes, that's a good idea. But some entities have the `Inactive` removed state like `domain` and `vm_template`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] codecov[bot] commented on pull request #7868: Removed state for removed accounts
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1678544550
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/7868?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#7868](https://app.codecov.io/gh/apache/cloudstack/pull/7868?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (223b7c2) into [main](https://app.codecov.io/gh/apache/cloudstack/commit/0204377032fe3352914b4306fd3c480bdbb4ad09?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (0204377) will **decrease** coverage by `0.01%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## main #7868 +/- ##
============================================
- Coverage 14.38% 14.38% -0.01%
+ Complexity 10074 10073 -1
============================================
Files 2747 2747
Lines 258922 258924 +2
Branches 40318 40318
============================================
Hits 37246 37246
+ Misses 216867 216863 -4
- Partials 4809 4815 +6
```
| [Files Changed](https://app.codecov.io/gh/apache/cloudstack/pull/7868?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...c/main/java/com/cloud/user/AccountManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/7868?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvY29tL2Nsb3VkL3VzZXIvQWNjb3VudE1hbmFnZXJJbXBsLmphdmE=) | `20.55% <100.00%> (+0.09%)` | :arrow_up: |
... and [5 files with indirect coverage changes](https://app.codecov.io/gh/apache/cloudstack/pull/7868/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] hsato03 commented on pull request #7868: Removed state for removed accounts
Posted by "hsato03 (via GitHub)" <gi...@apache.org>.
hsato03 commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1736336948
Hi @soreana,
Any updates on this one?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland merged pull request #7868: Removed state for removed accounts
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] soreana commented on pull request #7868: Removed state for removed accounts
Posted by "soreana (via GitHub)" <gi...@apache.org>.
soreana commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1701797959
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1704823665
@soreana a [SF] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] soreana commented on pull request #7868: Removed state for removed accounts
Posted by "soreana (via GitHub)" <gi...@apache.org>.
soreana commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1704823210
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1704901768
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6973
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] soreana commented on pull request #7868: Removed state for removed accounts
Posted by "soreana (via GitHub)" <gi...@apache.org>.
soreana commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1705211242
@DaanHoogland @rohityadavcloud @weizhouapache I did some research to understand the definitions of `removed` and `destroyed` in CloudStack terminology.
Once an object is Destroyed in CloudStack, it remains visible to the root admin, who has the exclusive ability to either restore or remove it. Even when an object is destroyed, it can still be restored. But once an object is removed, it cannot be restored and will be lost permanently.
As of now, it is not possible to restore the account that was removed. Therefore, using the term `Remove` state would be more appropriate than `Destroyed`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7868: Removed state for removed accounts
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1722962737
have you tested @soreana ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on pull request #7868: Removed state for removed accounts
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1681937338
@hsato03
since this is not a bug, but an improvement. let's move to next major release 4.19.0.0
cc @DaanHoogland
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] blueorangutan commented on pull request #7868: Removed state for removed accounts
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1678609532
Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6782
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] DaanHoogland commented on pull request #7868: Removed state for removed accounts
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1678615069
@hsato03 do you want this in 4.18.1?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [cloudstack] weizhouapache commented on pull request #7868: Removed state for removed accounts
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #7868:
URL: https://github.com/apache/cloudstack/pull/7868#issuecomment-1678549377
@blueorangutan package
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org