You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2025/06/25 14:09:39 UTC
[PR] list only own zones for resource manager [cloudstack]
DaanHoogland opened a new pull request, #11087:
URL: https://github.com/apache/cloudstack/pull/11087
### Description
This PR...
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
Fixes: #10906
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### 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 or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3005227568
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13913
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3104205036
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14298
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3072018919
<b>[SF] Trillian test result (tid-13770)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 52845 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11087-t13770-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3007369879
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2224705456
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,21 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
- id = currentId;
Review Comment:
this check already done before?
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3068735209
@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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3004961866
@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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3078898835
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 14212
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3069302743
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14163
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2221919235
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -1685,11 +1631,10 @@ private Pair<List<Long>, Integer> searchForUserVMIdsAndCount(ListVMsCmd cmd) {
userVmSearchCriteria.setParameters("hostId", hostId);
}
- if (storageId != null && pool != null) {
+ if (storageId != null /* than pool != null as well */) {
Review Comment:
```suggestion
if (storageId != null) {
```
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3106270414
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2224743696
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,21 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
Review Comment:
no, the logic is flawed:
`if (id != null..)` while just above `Long id = null;`
it is dead code effectively.
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2180162785
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,22 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
+ // TODO fix bug : id is always null from here
Review Comment:
```suggestion
```
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2166825042
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,22 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
+ // TODO fix bug : id is always null from here
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
- id = currentId;
+ id = CallContext.current().getCallingUser().getId();
Review Comment:
[nitpick] This TODO indicates a known issue where `id` is always null. Consider removing or addressing this comment by fixing the initialization logic or clarifying its intended behavior.
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3068742824
@DaanHoogland 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.
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2166842582
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,22 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
+ // TODO fix bug : id is always null from here
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
- id = currentId;
+ id = CallContext.current().getCallingUser().getId();
Review Comment:
issue created for this in #11088
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3031145710
<b>[SF] Trillian test result (tid-13660)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 58841 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11087-t13660-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3028052789
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11087?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 4.00%. Comparing base [(`8f2735a`)](https://app.codecov.io/gh/apache/cloudstack/commit/8f2735ab46288dc7307a4aad50ffc77dd35bfa6c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d1f441a`)](https://app.codecov.io/gh/apache/cloudstack/commit/d1f441ae7106e30222480340fbc9b2aa03fb1d23?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 4 commits behind head on 4.20.
> :exclamation: There is a different number of reports uploaded between BASE (8f2735a) and HEAD (d1f441a). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (8f2735a) | HEAD (d1f441a) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #11087 +/- ##
=============================================
- Coverage 16.15% 4.00% -12.16%
=============================================
Files 5657 402 -5255
Lines 497898 32612 -465286
Branches 60374 5791 -54583
=============================================
- Hits 80435 1305 -79130
+ Misses 408505 31158 -377347
+ Partials 8958 149 -8809
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11087/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/11087/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (-0.01%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11087/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/11087?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3028000573
@blueorangutan test
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3106266346
@blueorangutan test
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3101795247
@nvazquez can you share your results here or on the issue, please? I want to move this forwards.
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3111481010
<b>[SF] Trillian test result (tid-13851)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 55841 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11087-t13851-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2166833801
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -4274,15 +4219,16 @@ public ListResponse<ZoneResponse> listDataCenters(ListZonesCmd cmd) {
respView = ResponseView.Full;
}
- List<ZoneResponse> dcResponses = ViewResponseHelper.createDataCenterResponse(respView, cmd.getShowCapacities(), cmd.getShowIcon(), result.first().toArray(new DataCenterJoinVO[result.first().size()]));
+ List<ZoneResponse> dcResponses = ViewResponseHelper.createDataCenterResponse(respView, cmd.getShowCapacities(), cmd.getShowIcon(), result.first().toArray(new DataCenterJoinVO[0]));
response.setResponses(dcResponses, result.second());
return response;
}
private Pair<List<DataCenterJoinVO>, Integer> listDataCentersInternal(ListZonesCmd cmd) {
Account account = CallContext.current().getCallingAccount();
Long domainId = cmd.getDomainId();
- Long id = cmd.getId();
+ Long zoneId = cmd.getId();
+ zoneId = accountMgr.checkAccessAndSpecifyAuthority(CallContext.current().getCallingAccount(), zoneId);
Review Comment:
for reviewer; this is the actual change. (i’ve been going overboard on cleanup during investigation)
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3007363593
@blueorangutan test
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3028002840
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3103902451
@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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2224706026
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,21 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
Review Comment:
this check ^^^ already done before?
##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -668,25 +618,21 @@ public ListResponse<UserResponse> searchForUsers(ResponseView responseView, List
responseView = ResponseView.Full;
}
List<UserResponse> userResponses = ViewResponseHelper.createUserResponse(responseView, CallContext.current().getCallingAccount().getDomainId(),
- result.first().toArray(new UserAccountJoinVO[result.first().size()]));
+ result.first().toArray(new UserAccountJoinVO[0]));
response.setResponses(userResponses, result.second());
return response;
}
public ListResponse<UserResponse> searchForUsers(Long domainId, boolean recursive) throws PermissionDeniedException {
Account caller = CallContext.current().getCallingAccount();
- List<Long> permittedAccounts = new ArrayList<Long>();
+ List<Long> permittedAccounts = new ArrayList<>();
boolean listAll = true;
Long id = null;
if (caller.getType() == Account.Type.NORMAL) {
- long currentId = CallContext.current().getCallingUser().getId();
- if (id != null && currentId != id.longValue()) {
- throw new PermissionDeniedException("Calling user is not authorized to see the user requested by id");
- }
- id = currentId;
Review Comment:
this check already done before?
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3069701820
@blueorangutan test
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3004969557
@DaanHoogland 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.
--
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
Re: [PR] list only own zones for resource manager [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3034668147
Few comments;
* I think you mean 'Resource Admin' and not manager, pl fix that
* If all users/roles can list zones, then resource admin should be allowed to list all zones and be able to do all actions as allowed by the role (historically) such as VM deployment etc. Alternatively, there could be a global setting to allow toggling the behaviour for the Resource Admin role.
* But^^, Resource Admin can be restricted & allowed to only administrate the dedicated zone (dedicated to the domain in which they are the resource admins) and allow historic actions (such as managing host, storage pool in such zones). This may need some fact finding as Resource Admins are not maintained/used for quite some time now.
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3084444956
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14233
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3069705612
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3088112372
<b>[SF] Trillian test result (tid-13811)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54606 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11087-t13811-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
--
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
Re: [PR] list only own zones for resource admin [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#issuecomment-3103908539
@DaanHoogland 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.
--
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