Commit Graph

34 Commits

Author SHA1 Message Date
Nitin c510c0540a bug 10422: Correcting host capacity checker thread runs. Removing the thread.sleep method and using the scheduleWithFixedDelay to execute the thread at fixed delays. Also making the hostCapacityChecker thread use the common function used by computeCapacityListener.
status 10422: resolved fixed
2011-06-30 13:00:44 +05:30
Nitin 474d666f79 bug 10422: accidentally removed the code for sourceTemplate id when the the volume is created out of template. Checking it in.
status 10422: resolved fixed
2011-06-29 14:34:24 +05:30
Nitin a2bdcf5159 bug 10422: accidentally removed the code for sourceTemplate id when the the volume is created out of template. Checking it in.
status 10422: resolved fixed
2011-06-29 14:34:23 +05:30
alena 18dc85c765 Pass isForRebalance parameter to processConnect method of all the listeners - some listeners don't have to be notified when connection happens as a a part of Agent Rebalance process (VirtualMachineManagerImpl listener for instance) 2011-06-27 10:37:00 -07:00
alena 826f5eedf1 bug 10447: don't notify VirtualMachineManager listener when do host rebalance - vm sync is not needed in this case.
status 10447: resolved fixed
2011-06-27 10:37:00 -07:00
Kelven Yang 7f8b129dc5 bug 10414: update VM sync logic and capacity management to sync VM state change initiated from external source 2011-06-22 18:23:43 -07:00
prachi 486c75ea4b Bug 9780 - ComputeCapacityListener should not use 'cpu.overprovisioning.factor' while adding capacity entries
Changes:
Reapplying the changes from fix 9539 that were missing in ComputeCapacityListener.java
Change is to not consider cpu.overprovisioning.factor while creating CPU capacity entries.
This factor is applied by allocators to the values in the capacity table. Capacity  table should contain the actual CPU value and not the overprovisioned CPU value.
2011-05-06 18:05:12 -07:00
Alex Huang 117a81acf6 cleanup agent manager 2011-05-05 17:57:06 -07:00
Chiradeep Vittal 948df86f5d accidental commit 2011-05-03 10:46:13 -07:00
Chiradeep Vittal 7a29f8dc48 more fixes prior to pushing the merge 2011-05-03 10:41:31 -07:00
Chiradeep Vittal a32c39cccd Merge from zonesfeature 2011-05-03 10:41:31 -07:00
Chiradeep Vittal 303e2a7481 Start of zonesfeature / mycloud/cloudkit 2011-05-03 10:40:17 -07:00
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
prachi b84a7477f0 Bug 9539 - cpu.overprovisioning.factor does not work
Changes:
- Changed host allocators/planner  to use cpu.overprovisioning.factor
- Removed following: while adding a new host, we were setting the total_cpu in op_host_capacity to be actual_cpu * cpu.overprovisioning.factor. Now we set it to actual_cpu.
- ListCapacities response now calculates the total CPU as actual * cpu.overprovisioning.factor (This change does not add anything new - listCapacities was pulling total CPU from op_host_capacity DB earlier which had the cpu.overprovisioning.factor applied already. Now we need to apply it over the DB entry.)
- HostResponse has a new field: 'cpuWithOverprovisioning' that returns the cpu after applying the cpu.overprovisioning.factor

- Db Upgrade 222 to 224 now updates the total_cpu in op_host_capacity to be the actual_cpu for each Routing host.
2011-04-22 18:09:31 -07:00
Edison Su d6b5acb852 bug 8532,8755: don't create multiple HA work if there already has one of HAwork of this VM is created, but not finished
status 8532: resolved fixed
status 8755: resolved fixed
2011-04-14 17:46:54 -04:00
prachi 0fa06646ba Bug 9310 - HostCapacityChecker thread does not cleanup reserved capacity for hosts that are not in 'Up' state
List all 'Routing' hosts irrespective of the State.
2011-04-14 13:24:14 -07:00
Frank 92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
anthony 2bcd7a13d4 hostid and poolid may overlap, fixed deletePoolStats 2011-04-05 15:43:21 -07:00
prachi 92c0b3b82f Bug 9309 - In Manual migration, do not consider 'reserved_capacity' when computing available memory in destination
Changes:
- Now while listing hosts for migration, capacity is calculated as total_capacity -used_capacity
 instead of total_capacity -(used_capacity + reserved_capacity)
- Also, the capacity columns in op_host_capacity are now 'signed' type so that the subtractions in queries does not overflow.
- Added this to DB upgrade 222 to 224 change as well.
2011-04-05 14:06:32 -07:00
prachi ed9a11c6b6 API changes for Bug 3316 - Manual live migration of Virtual Machines
This is a Root admin only functionality
---------------------
Service API changes:
---------------------
- ManagementServer  will expose new API:
   Pair<List<HostVO>, List<Long>> listHostsForMigrationOfVM(UserVm vm, Long
startIndex, Long pageSize)
The API returns list of all hosts in the VM's cluster minus the current host and also a list of hostIds that seem to have enough CPU and RAM capacity to host this VM.
- ListHostsCmd will call this service API if virtualmachineid is present in the request.
- MigrateVmCmd is the new command added that takes in virtualmachineid and destination hostid
- UserVmService  will expose a new API:  UserVm migrateVirtualMachine(UserVm vm, Host destinationHost)

------------------------------------
API throws error in following cases:
------------------------------------
- User is not a root Admin. (‘Permission denied’)
- A VM uses local storage, we cannot migrate it, so ‘listHosts’ will throw error.
- We fail to migrate the VM on the chosen host.
- API will support migration for XenServer only currently. So error is thrown
if hypervisor is not XenServer (e.g KVM, vSphere etc)
- Destination host is not in same cluster as source host.
- VM is not in running state
2011-03-11 17:49:53 -08:00
prachi 6a67bb1edb More logging changes for
Bug 7845 Productize DeploymentPlanner
Bug 8317 Add better resource allocation failure messages
2011-02-28 13:47:52 -08:00
prachi 889827b63a Bug 7845 - Productize DeploymentPlanner
Bug 7723 - merge or re-write host tagging into master / 2.2
Bug 7627 - Need more logging for Allocators
Bug 8317 - Add better resource allocation failure messages

Changes for Deployment Planner to use host and storagePool allocators to find deployment destination.
Also has the changes for host tag feature.
Improved the logging for allocators.
2011-02-28 13:47:51 -08:00
Alex Huang 7dd54f079b started vms with these latest 2011-02-11 17:03:04 -08:00
Edison Su 25a9236438 add shuffling back 2011-02-09 14:24:32 -05:00
Edison Su 08285af33f fix capacity caclulation issue after migration 2011-02-09 13:33:42 -05:00
alena f16cb1caf2 Logs statements cleanup 2011-02-08 14:14:52 -08:00
Edison Su 169ac1ce57 bug 8464,8404: allocator is not move reserved resource to used resource, in some case
status 8464: resolved fixed
status 8404: resolved fixed
2011-02-08 10:32:14 -05:00
Edison Su fc97034000 refactor vmstatelistener 2011-01-26 11:01:43 -05:00
nit d1aa043aba bug 7525: Cleaning up primary storage stats from op_host_Capacity(reflected on dashboard) when primary storage is deleted.
status 7525 : resolved fixed
2011-01-20 20:38:43 +05:30
edison 3bd089acb5 don't break old code 2010-12-04 16:49:05 -08:00
edison 2e3ef1408c refactor 2010-12-04 14:59:40 -08:00
edison 41fdbfc65e new allocator 2010-12-04 14:59:39 -08:00
Alex Huang d38f7fd56d Moved DAO to server 2010-11-22 07:40:41 -08:00
Alex Huang ce091de3d2 more changes for refactor 2010-10-12 07:17:47 -07:00