Skip to content

cpuallocated value shows 0 all the time #4221

@ravening

Description

@ravening
ISSUE TYPE
  • Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.14
CONFIGURATION

Any type of zone

OS / ENVIRONMENT

Any OS

SUMMARY

findHostsForMIgration api always returns 0 for cpuallocated field
Also there is inconsistency between memoryallocated field returned by listHosts api and findHostsForMigration api

STEPS TO REPRODUCE
(local) mgt01 > find hostsformigration virtualmachineid=91-aac-477a-b36e-ae54f filter=cpuallocated,memoryallocated
{
  "count": 3,
  "host": [
    {
      "cpuallocated": "0%", <<<<<<<<<<<<<<<<<<<<<<<<
      "memoryallocated": "40.47%"
    },
    {
      "cpuallocated": "0%",
      "memoryallocated": "18.39%"
    }
  ]
}


(local) mgt01 > list hosts virtualmachineid=36b61-acac-477a-b36e-a2f54f filter=cpuallocated,memoryallocated
{
  "count": 3,
  "host": [
    {
      "cpuallocated": "5.68%",
      "memoryallocated": 2952790016 <<<<<<<<<<<<<<<<<<
    },
    {
      "cpuallocated": "3.41%",
      "memoryallocated": 1342177280
    }
  ]
}
EXPECTED RESULTS
findHostsFormigration should return proper value all the time
Also listHosts and findHostsForMigration should return either absolute or a percentage value
ACTUAL RESULTS
findHostsFormigration returns 0 all the time
listHosts command returns the absolute value for memoryallocated whereas findHostsForMigration returns percentage

@rafaelweingartner @GabrielBrascher @andrijapanicsb @rhtyd @PaulAngus @svenvogel any inputs on this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions