cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Starting a running VM prompts resource limitation error - Error message improvement

Open borisstoyanov opened this issue 2 years ago • 3 comments

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"

borisstoyanov avatar Sep 20 '22 14:09 borisstoyanov

Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. LL-JID 145

blueorangutan avatar Sep 22 '22 10:09 blueorangutan

Something went wrong, BO is reporting pkg fail on an issue? cc @davidjumani @Pearl1594 @DaanHoogland

rohityadavcloud avatar Sep 22 '22 10:09 rohityadavcloud

seems like it was manually triggered from the backend - and the wrong PR ID was provided ..

Pearl1594 avatar Sep 22 '22 10:09 Pearl1594

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?

DaanHoogland avatar Sep 26 '22 10:09 DaanHoogland

not sure if I do @DaanHoogland, that's all I was reported.

borisstoyanov avatar Sep 26 '22 10:09 borisstoyanov

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.

rohityadavcloud avatar Sep 27 '22 06:09 rohityadavcloud