Thanks to visit codestin.com
Credit goes to github.com

Skip to content

managementserverid value inconsistency in shutdown APIs #10669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adietrich-ussignal opened this issue Apr 8, 2025 · 6 comments · Fixed by #10717
Closed

managementserverid value inconsistency in shutdown APIs #10669

adietrich-ussignal opened this issue Apr 8, 2025 · 6 comments · Fixed by #10717

Comments

@adietrich-ussignal
Copy link

problem

When using the shutdown APIs (prepareForShutdown, triggerShutdown, etc.) the management server ID is required, however, the return value appears to be the database ID.

prepare forshutdown managementserverid=0b2faa01-706f-4f37-82ff-3e5e8f0971f8
{
  "prepareforshutdown": {
    "managementserverid": 1,
    "pendingjobscount": 0,
    "readyforshutdown": true,
    "shutdowntriggered": true
  }
}

versions

ACS 4.19.2.0
CMK 6.4.0

The steps to reproduce the bug

  1. prepare forshutdown managementserverid=<UUID of management server>
  2. Observe return values.
    ...

What to do about it?

To align with other API calls, it would be more valuable to pass the UUID of the management server in the return value for managementserverid.

@sureshanaparti
Copy link
Contributor

sureshanaparti commented Apr 11, 2025

@adietrich-ussignal these responses are updated (with UUID of the management server) in some shutdown improvements here: #9854 (will be included in 4.21 release).

@sureshanaparti sureshanaparti self-assigned this Apr 11, 2025
@DaanHoogland
Copy link
Contributor

@adietrich-ussignal , does @sureshanaparti 's remark answer your concerns ? i.e. can we close this issue?

@adietrich-ussignal
Copy link
Author

It seems odd this was tagged as a feature when its inconsistent with many of the other API operations in the platform. Based on my understanding of the PR, it looks like the msid is being set to the UUID and not the database ID.

@DaanHoogland
Copy link
Contributor

It seems odd this was tagged as a feature when its inconsistent with many of the other API operations in the platform. Based on my understanding of the PR, it looks like the msid is being set to the UUID and not the database ID.

@adietrich-ussignal , it is actually an improvement, but it seems github doesn't know this type of issue. We could as well have tagged it as a "task". In the past a lot of API would return DB ID as id and a separate field uuid. historic "feature" or artifact if you will. It may feel as a bug to you , I appreciate that, but it was actually implemented on purpose.

rohityadavcloud added a commit to shapeblue/cloudstack that referenced this issue Apr 15, 2025
Fixes apache#10669

Creates shutdown response to use management server UUID than internal DB
ID.

Signed-off-by: Rohit Yadav <[email protected]>
@rohityadavcloud
Copy link
Member

Raised a PR to fix the use of internal DB ID in the response - #10717

@rohityadavcloud rohityadavcloud moved this from Todo to ready for Review in Apache CloudStack BugFest - Issues Apr 15, 2025
@rohityadavcloud rohityadavcloud linked a pull request Apr 15, 2025 that will close this issue
14 tasks
@DaanHoogland
Copy link
Contributor

fixed in #10717

@github-project-automation github-project-automation bot moved this from ready for Review to Done in Apache CloudStack BugFest - Issues Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

4 participants