You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "nvazquez (via GitHub)" <gi...@apache.org> on 2026/06/18 03:22:50 UTC
[PR] listHosts: add 'core' details [cloudstack]
nvazquez opened a new pull request, #13444:
URL: https://github.com/apache/cloudstack/pull/13444
### Description
This PR adds a detail `core` for the `listHosts` API, which makes it so we don't make N+1 queries when getting details (cpu usage, clusterid, etc.).
This will drastically reduce the time it takes to listHosts and allows us to get a list of hosts & their state, which can take lot of time for the API to complete if the core detail is not passed
This is strictly opt-in with `listHosts details=core` and the default bahaviour is unchanged.
### 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)
- [ ] 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] listHosts: add 'core' details [cloudstack]
Posted by "GaOrtiga (via GitHub)" <gi...@apache.org>.
GaOrtiga commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4779123412
@nvazquez in the description you mentioned avoiding requests when getting details like cpu usage, but I don't see this parameter in specific being added to the responde, am I missing something?
--
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] listHosts: add 'core' details [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4737581601
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13444?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.69%. Comparing base ([`8e933b7`](https://app.codecov.io/gh/apache/cloudstack/commit/8e933b735e21d1b6bda95425fe76994499ec308d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`caf5fb8`](https://app.codecov.io/gh/apache/cloudstack/commit/caf5fb841a4b08b398db5f8d282926cfdd0e5a5d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (8e933b7) and HEAD (caf5fb8). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (8e933b7) | HEAD (caf5fb8) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.22 #13444 +/- ##
=============================================
- Coverage 17.67% 3.69% -13.98%
=============================================
Files 5922 448 -5474
Lines 533167 38107 -495060
Branches 65210 7061 -58149
=============================================
- Hits 94246 1409 -92837
+ Misses 428276 36511 -391765
+ Partials 10645 187 -10458
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13444/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/13444/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.69% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13444/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 Harness](https://app.codecov.io/gh/apache/cloudstack/pull/13444?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] listHosts: add 'core' details [cloudstack]
Posted by "RosiKyu (via GitHub)" <gi...@apache.org>.
RosiKyu commented on code in PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#discussion_r3459588635
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -117,6 +117,51 @@ private boolean containsHostHATag(final String tags) {
return result;
}
+ private void setNewCoreHostResponse(HostJoinVO host, HostResponse hostResponse) {
+ hostResponse.setId(host.getUuid());
+ hostResponse.setName(host.getName());
+ hostResponse.setState(host.getStatus());
+ hostResponse.setResourceState(host.getResourceState().toString());
+ hostResponse.setDisconnectedOn(host.getDisconnectedOn());
+ hostResponse.setHostType(host.getType());
+ hostResponse.setIpAddress(host.getPrivateIpAddress());
+ hostResponse.setVersion(host.getVersion());
+ hostResponse.setCreated(host.getCreated());
+ hostResponse.setRemoved(host.getRemoved());
+ hostResponse.setLastPinged(new Date(host.getLastPinged()));
+ if (host.getHypervisorType() != null) {
+ hostResponse.setHypervisor(host.getHypervisorType().getHypervisorDisplayName());
+ }
+
+ hostResponse.setZoneId(host.getZoneUuid());
+ hostResponse.setZoneName(host.getZoneName());
+ hostResponse.setPodId(host.getPodUuid());
+ hostResponse.setPodName(host.getPodName());
+ if (host.getClusterId() > 0) {
+ hostResponse.setClusterId(host.getClusterUuid());
+ hostResponse.setClusterName(host.getClusterName());
+ if (host.getClusterType() != null) {
+ hostResponse.setClusterType(host.getClusterType().toString());
+ }
+ }
+
+ String hostTags = host.getTag();
+ hostResponse.setHostTags(hostTags);
+ hostResponse.setExplicitHostTags(host.getExplicitTag());
+ hostResponse.setImplicitHostTags(host.getImplicitTag());
+ hostResponse.setStorageAccessGroups(host.getStorageAccessGroups());
+ hostResponse.setClusterStorageAccessGroups(host.getClusterStorageAccessGroups());
+ hostResponse.setPodStorageAccessGroups(host.getPodStorageAccessGroups());
+ hostResponse.setZoneStorageAccessGroups(host.getZoneStorageAccessGroups());
+
+ // msid is returned as-is; callers resolve it to avoid a per-host lookup
+ if (host.getManagementServerId() != null) {
+ hostResponse.setManagementServerId(host.getManagementServerId().toString());
+ }
Review Comment:
Reproduced while testing. In `core` the `managementserverid` comes back as the raw numeric id, while every other mode returns the UUID - so the same field changes format depending on the detail flag, which could be a risk for consumers reading it. From a QA perspective, omitting it (as suggested above) is the safer of the two - a missing field is easier to handle than a value that looks valid but is in the wrong/unexpected format.
--
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] listHosts: add 'core' details [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#discussion_r3434105187
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -117,6 +117,51 @@ private boolean containsHostHATag(final String tags) {
return result;
}
+ private void setNewCoreHostResponse(HostJoinVO host, HostResponse hostResponse) {
+ hostResponse.setId(host.getUuid());
+ hostResponse.setName(host.getName());
+ hostResponse.setState(host.getStatus());
+ hostResponse.setResourceState(host.getResourceState().toString());
+ hostResponse.setDisconnectedOn(host.getDisconnectedOn());
+ hostResponse.setHostType(host.getType());
+ hostResponse.setIpAddress(host.getPrivateIpAddress());
+ hostResponse.setVersion(host.getVersion());
+ hostResponse.setCreated(host.getCreated());
+ hostResponse.setRemoved(host.getRemoved());
+ hostResponse.setLastPinged(new Date(host.getLastPinged()));
+ if (host.getHypervisorType() != null) {
+ hostResponse.setHypervisor(host.getHypervisorType().getHypervisorDisplayName());
+ }
+
+ hostResponse.setZoneId(host.getZoneUuid());
+ hostResponse.setZoneName(host.getZoneName());
+ hostResponse.setPodId(host.getPodUuid());
+ hostResponse.setPodName(host.getPodName());
+ if (host.getClusterId() > 0) {
Review Comment:
`details=core` responses don’t set `clusterInternalId`. `QueryManagerImpl.updateHostsExtensions()` relies on `HostResponse.getClusterInternalId()` for External hypervisor hosts; leaving it at the default 0 can prevent extension enrichment (or look up the wrong cluster).
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -117,6 +117,51 @@ private boolean containsHostHATag(final String tags) {
return result;
}
+ private void setNewCoreHostResponse(HostJoinVO host, HostResponse hostResponse) {
+ hostResponse.setId(host.getUuid());
+ hostResponse.setName(host.getName());
+ hostResponse.setState(host.getStatus());
+ hostResponse.setResourceState(host.getResourceState().toString());
+ hostResponse.setDisconnectedOn(host.getDisconnectedOn());
+ hostResponse.setHostType(host.getType());
+ hostResponse.setIpAddress(host.getPrivateIpAddress());
+ hostResponse.setVersion(host.getVersion());
+ hostResponse.setCreated(host.getCreated());
+ hostResponse.setRemoved(host.getRemoved());
+ hostResponse.setLastPinged(new Date(host.getLastPinged()));
+ if (host.getHypervisorType() != null) {
+ hostResponse.setHypervisor(host.getHypervisorType().getHypervisorDisplayName());
+ }
+
+ hostResponse.setZoneId(host.getZoneUuid());
+ hostResponse.setZoneName(host.getZoneName());
+ hostResponse.setPodId(host.getPodUuid());
+ hostResponse.setPodName(host.getPodName());
+ if (host.getClusterId() > 0) {
+ hostResponse.setClusterId(host.getClusterUuid());
+ hostResponse.setClusterName(host.getClusterName());
+ if (host.getClusterType() != null) {
+ hostResponse.setClusterType(host.getClusterType().toString());
+ }
+ }
+
+ String hostTags = host.getTag();
+ hostResponse.setHostTags(hostTags);
+ hostResponse.setExplicitHostTags(host.getExplicitTag());
+ hostResponse.setImplicitHostTags(host.getImplicitTag());
+ hostResponse.setStorageAccessGroups(host.getStorageAccessGroups());
+ hostResponse.setClusterStorageAccessGroups(host.getClusterStorageAccessGroups());
+ hostResponse.setPodStorageAccessGroups(host.getPodStorageAccessGroups());
+ hostResponse.setZoneStorageAccessGroups(host.getZoneStorageAccessGroups());
+
+ // msid is returned as-is; callers resolve it to avoid a per-host lookup
+ if (host.getManagementServerId() != null) {
+ hostResponse.setManagementServerId(host.getManagementServerId().toString());
+ }
Review Comment:
In `details=core` you’re setting `managementserverid` to the host’s raw MSID (`mgmt_server_id`) which is not the UUID normally returned by `listHosts` (the non-core path resolves it via `mshost.uuid`). Returning a different identifier type under an optional detail flag is likely to confuse API consumers; better to omit this field in core mode unless you can return the UUID without per-host lookups.
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -334,7 +379,11 @@ public HostResponse newMinimalHostResponse(HostJoinVO host) {
@Override
public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails> details) {
HostResponse hostResponse = new HostResponse();
- setNewHostResponseBase(host, details, hostResponse);
+ if (details.contains(HostDetails.core)) {
+ setNewCoreHostResponse(host, hostResponse);
+ } else {
+ setNewHostResponseBase(host, details, hostResponse);
+ }
Review Comment:
`HostDetails` is a multi-valued parameter (e.g. `details=capacity,stats`). With the current check, any request that includes `core` alongside other flags (including `all`) will silently drop the additional requested details because the core path bypasses `setNewHostResponseBase`. Consider only using the core-only response when `core` is the sole requested value.
--
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] listHosts: add 'core' details [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4812521166
@GaOrtiga @RosiKyu please find the PR ready for review again. I have introduced a new response field `msid` which is only retrieved when `details=core` is passed to the listHosts API, to avoid confusions with the field `managementserverid`.
@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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4781103442
@nvazquez 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] listHosts: add 'core' details [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti merged PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444
--
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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4781665262
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18351
--
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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4813416545
@nvazquez 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] listHosts: add 'core' details [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4813405164
@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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4737987746
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18291
--
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] listHosts: add 'core' details [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4781034709
Thanks @RosiKyu @GaOrtiga @weizhouapache - I have refactored the code according to your review comments and Copilot comments. The only pending item is the msid return value, I'm keeping this PR in draft while this is not addressed and will put back to review state once its sorted out
--
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] listHosts: add 'core' details [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4781085288
@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] listHosts: add 'core' details [cloudstack]
Posted by "GaOrtiga (via GitHub)" <gi...@apache.org>.
GaOrtiga commented on code in PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#discussion_r3459590090
##########
api/src/main/java/org/apache/cloudstack/api/ApiConstants.java:
##########
@@ -1407,7 +1407,7 @@ public String toString() {
}
public enum HostDetails {
- all, capacity, events, stats, min;
+ all, capacity, events, stats, min, core;
Review Comment:
```suggestion
all, capacity, core, events, stats, min;
```
--
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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4817199469
<b>[SF] Trillian test result (tid-16445)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 49425 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13444-t16445-kvm-ol8.zip
Smoke tests completed. 148 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
ContextSuite context=TestAccounts>:setup | `Error` | 0.00 | test_accounts.py
ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 0.00 | test_accounts.py
test_DeleteDomain | `Error` | 12.13 | test_accounts.py
test_forceDeleteDomain | `Failure` | 12.01 | test_accounts.py
ContextSuite context=TestRemoveUserFromAccount>:setup | `Error` | 12.65 | test_accounts.py
--
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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4812984095
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18395
--
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] listHosts: add 'core' details [cloudstack]
Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4737524780
@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] listHosts: add 'core' details [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4739375019
@nvazquez
have you considered the backward compatibility ?
--
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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4812538925
@nvazquez 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] listHosts: add 'core' details [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4737529430
@nvazquez 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] listHosts: add 'core' details [cloudstack]
Posted by "GaOrtiga (via GitHub)" <gi...@apache.org>.
GaOrtiga commented on PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#issuecomment-4779168651
Also, the copilot left a review regarding the MS ID that I kind of agree. This API is admin only, so shouldn't be a big deal returning the internal ID, however, this same api returns MS UUID when other filters are passed, having this one be different may cause confusion
--
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] listHosts: add 'core' details [cloudstack]
Posted by "RosiKyu (via GitHub)" <gi...@apache.org>.
RosiKyu commented on code in PR #13444:
URL: https://github.com/apache/cloudstack/pull/13444#discussion_r3459606784
##########
server/src/main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java:
##########
@@ -334,7 +379,11 @@ public HostResponse newMinimalHostResponse(HostJoinVO host) {
@Override
public HostResponse newHostResponse(HostJoinVO host, EnumSet<HostDetails> details) {
HostResponse hostResponse = new HostResponse();
- setNewHostResponseBase(host, details, hostResponse);
+ if (details.contains(HostDetails.core)) {
+ setNewCoreHostResponse(host, hostResponse);
+ } else {
+ setNewHostResponseBase(host, details, hostResponse);
+ }
Review Comment:
Confirmed in testing. Any request that mixes `core` with another value (`core,stats` ; `core,capacity` ; `core,events`; `core,all`; `core,min`) returns the lightweight core set and silently drops the other requested fields. So if it fails quietly - the caller gets fewer fields than they asked for, with no error.
--
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