Commit Graph

32 Commits

Author SHA1 Message Date
Alex Huang 7ac3c818a9 bug 11079: fixed a bug with autoboxing 2011-08-12 14:14:15 -07:00
Alex Huang 429c1a0a18 changed a bunch of map logs to trace 2011-07-22 18:14:02 -07:00
Alex Huang f5d5ed5dce put big log trace in firstfit planner in to trace instead of debug 2011-07-11 14:37:36 -07:00
Alex Huang 7e9836dfd0 Some operations on the lock table allowed through jmx 2011-07-06 16:09:05 -07:00
Alex Huang d9e0bcfa1e bug 10126: Renamed getPodId() to getPodIdToDeployIn() 2011-06-03 22:17:08 -07:00
Alex Huang 5ce631e9d7 Separated resource management and agent management code. It's not all done but at least we make a first step 2011-05-16 10:55:18 -07:00
Alex Huang fba1c95512 bug 9615: Part of the HA cleanup 2011-05-03 16:34:53 -07:00
Alex Huang 8c8354a00e bug 8745: we decided on not implementing revert on the agent because it really requires business logic above. Stop if the checkSsh doesn't work 2011-05-02 14:47:49 -07:00
prachi 209be1065b Bug 9585 - Existing Data Disk is being destroyed and recreated on Stop and Start of a User VM.
Changes:
- When the ROOT volume of a VM is found to be READY, changed planner to reuse the pool for every volume(root or data) that is READY and that has a pool not in maintenance and not in avoid state
- If ROOT volume is not ready, we dont care about the DATA disk. Both would get re-allocated.
- When a pool is reused for a ready volume, Planner does not call storagepool allocators. And such volumes are not assigned a pool in the deployment destination returned by the planner. Accordingly StorageManager :: prepare method wont recreate these volumes since they are not mentioned in the destination.
2011-04-27 11:36:51 -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
Frank 92155522f2 Add license header to files 2011-04-14 11:23:14 -07:00
prachi b1700af146 Bug 9387: Recreate system vms if template id changed....
Changes:
While starting a System VM:
- We check, incase the ROOT volume is READY, if the templateID of the volume matches the SystemVM's template.
- If it does not match, we update the volumes' templateId and ask deployment planner to reassign a pool to this volume even if it is READY.

In general:
- If a root volume is READY, we remove its entry from the deploydestination before calling storagemanager :: prepare()
- StorageManager creates a volume if a pool is assigned to it in deploydestination passed to it.
- If a volume has no pool assigned to it in deploydestination, it means the volume is ready and has a pool already allocated to it.
2011-04-13 13:47:07 -07:00
prachi 47c31a077a Bug 9387 - Recreate system vms if template id changed...
Changes:
- Planner must reassign the storage pool if the template id for system vms has changed.  StorageManager must then recreate the volume if the volume has been
reassigned.  This is needed to do automatic update of the system template.
2011-04-12 18:19:58 -07:00
Alex Huang b2eda8c71b Changes to the planners 2011-03-28 09:48:33 -07:00
prachi 923f562aa8 Bug 6873: disable/enable mode for clusters (and pods and zones and hosts)
- Added a new flag 'allocation_state' to zone,pod,cluster and host
- The possible values for this flag are 'Enabled' or 'Disabled'
- When a new zone,pod,cluster or host is added, allocation_state is 'Disabled' by default.
- For existing zone,pod,cluster or host, the state is 'Enabled'.
- All Add/Update/List  commands for each of zone,pod,cluster or host can now take a new parameter 'allocationstate'
- If 'allocation_state' is 'Disabled', Allocators skip that zone or pod or cluster or pod.
- For a root admin, ListZones lists all zones including the 'Disabled' zones. But for any other user, the 'Disabled' zones are not included in the response.
- For any usecase that creates/deploys/adds/registers a resource and takes in zone as parameter, now we check if the Zone is 'Disabled'. If yes then the operation cannot be performed by a user other than root-admin. Add volume, snapshot, templates are examples of this usecase.
- To enable the root admin to test a particular pod/cluster/host, deployVM command takes in 'host_id' parameter that can be passed in only by root admin.
If this parameter is passed in by the admin, allocators do not search for hosts and use that host only. StoragePools are searched in the cluster of that host.
If VM cannot be deployed to that host, allocators and deployVM fails without retrying
2011-03-23 22:15:35 -07:00
prachi 3624fee85d Changed the interface in StoragePoolAllocator to avoid a potential NPE in LocalStoragePoolAllocator. Allocators were taking in an instance of VM enclosed inside VirtualMachineProfile.
However in case of createVolume from Snapshot, there is no VM associated. So VM passed is null and this can cause a NPE.

Allocators hardly use the VM instance. LocalStoragePoolAllocator was mainly using it for checking if host has capacity. But it need not do this check, since that is done by HostAllocators anyway.
So removing the use of VM in StoragePoolAllocators.
2011-03-09 10:12:04 -08:00
Frank 6c819c1491 Merge branch 'bareMetal'
Conflicts:
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/commands/DeployVMCmd.java
	api/src/com/cloud/offering/ServiceOffering.java
	api/src/com/cloud/vm/UserVmService.java
	client/tomcatconf/components.xml.in
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/deploy/FirstFitPlanner.java
	server/src/com/cloud/service/ServiceOfferingVO.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
2011-03-08 14:18:11 -08:00
Frank 7fa053370e Bug 8208 - bare metal provisioning
Add bare metal planner
2011-03-01 17:47:37 -08:00
Edison Su 53eb46dc2a Add local storage support for kvm 2011-03-01 19:51:43 -05:00
prachi c1f0aef550 More changes for Bug 7845 - Productize DeploymentPlanner
- After applying the User concentrated Pod heuristic, order of clusters within a pod (based on capacity) should remain intact
- Only change should be clusters of which pod to be considered first
2011-02-28 17:25: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
Edison Su 25a9236438 add shuffling back 2011-02-09 14:24:32 -05:00
Kelven Yang 4696b16d10 Normalize name convention for vmware hypervisor 2011-01-28 11:16:30 -08:00
Edison Su fc97034000 refactor vmstatelistener 2011-01-26 11:01:43 -05:00
edison 2762f0c75e release cpu/memory after vm stopped for a while 2010-12-23 22:06:01 -08:00
abhishek 5e61be67fd fix bugs in allocator 2010-12-13 16:42:25 -08:00
edison e591f56b25 add logs, and don't break old code 2010-12-04 15:02:03 -08:00
edison b7cdae2688 fix for migration 2010-12-04 15:02:03 -08:00
edison d17beeb348 move all the vm's state machine to itmgr->statetransitTO 2010-12-04 15:02:02 -08:00
edison 2e3ef1408c refactor 2010-12-04 14:59:40 -08:00
edison e99cc740e6 add more checks in alloctor 2010-12-04 14:59:39 -08:00
edison 41fdbfc65e new allocator 2010-12-04 14:59:39 -08:00