cloudstack/server/src/com/cloud/capacity
prachi 1d4a59ce73 Bug 9666 - hostId and spoolId overlap in op_host_capacity table
Changes:
- When a host connects, we check if it has a CPU and RAM entry in capacity table. If the entry is found, the values are updated if possible. If the entry is not found a new one is inserted.
- The searchCriteria used to check if CPU entry is present was wrong. We were passing in a criteria which did not specify capacityType. So for hostId >= 200, the serach would return capacity entries of storage pools also since poolIDs start from 200 onwards.
- Since an entry was found (although the wrong one), we tried to update it. But update does not happen since the capacity ranges dont match.
And a new insert for CPU also does not happen since an entry is found.
- So as a result CPU entries are never inserted in the table for hostIds >=200

- As a fix, corrected the search criteria.
- During VM deployment, when the entry is not found, we get a NPE. Added a null check to avoid that.
2011-05-02 15:17:30 -07:00
..
dao Bug 9539 - cpu.overprovisioning.factor does not work 2011-04-22 18:09:31 -07:00
CapacityManager.java Bug 9539 - cpu.overprovisioning.factor does not work 2011-04-22 18:09:31 -07:00
CapacityManagerImpl.java Bug 9666 - hostId and spoolId overlap in op_host_capacity table 2011-05-02 15:17:30 -07:00