cloudstack
cloudstack copied to clipboard
Starting a running VM prompts resource limitation error - Error message improvement
ISSUE TYPE
- Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.17
CONFIGURATION
In a project
OS / ENVIRONMENT
SUMMARY
When starting an already running VM it prompts a resource limitation error, which is misleading
STEPS TO REPRODUCE
1. Create a project with -1 on all resources2.
2. add Account to the project with 0 on all resource limits on account level
3. deploy a VM
4. While VM is running start the VM once more from API
EXPECTED RESULTS
list VM response
ACTUAL RESULTS
error message for limitation
"Maximum amount of resources of Type = 'cpu' for Account Name = ily96114 in Domain Id = 1 is exceeded: Account Resource Limit = 0, Current Account Resource Amount = 0, Requested Amount = 4"
Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. LL-JID 145
Something went wrong, BO is reporting pkg fail on an issue? cc @davidjumani @Pearl1594 @DaanHoogland
seems like it was manually triggered from the backend - and the wrong PR ID was provided ..
my bad @rohityadavcloud I was doing to many things at once.
@borisstoyanov I tried your scenario above but got the output:
(localcloud) 🐱 > start virtualmachine id=e5c51afc-a77c-4bbc-addb-394ca4d6c1ac
{
"accountid": "32450c11-3d7d-11ed-97a0-1e00c400015e",
"cmd": "org.apache.cloudstack.api.command.admin.vm.StartVMCmdByAdmin",
"completed": "2022-09-26T10:12:25+0000",
"created": "2022-09-26T10:12:25+0000",
"jobid": "86b3eeaf-dda0-45ab-9ae5-d31d12a21cb0",
"jobinstanceid": "e5c51afc-a77c-4bbc-addb-394ca4d6c1ac",
"jobinstancetype": "VirtualMachine",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 431,
"errortext": "The virtual machine e5c51afc-a77c-4bbc-addb-394ca4d6c1ac (VM-e5c51afc-a77c-4bbc-addb-394ca4d6c1ac) is already running"
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "32461823-3d7d-11ed-97a0-1e00c400015e"
}
which seems right to me. Is there some extra condition that you forgot to mention?
not sure if I do @DaanHoogland, that's all I was reported.
The user from whose env led this ticket has asked me to close this ticket:
This incident could be solved for us by turning the related VM off, so i do not see anymore problems here. There was no intention from our side to raise a bug-report here, so please don't hesitate to close the issue on github.