Commit Graph

102 Commits

Author SHA1 Message Date
Alex Huang 99bc15f64a changed getName to getHostname 2011-04-29 08:34:10 -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 6e39019b6a Bug 9548 [Cloud Stack Upgrade - 2.1.8 to 2.2.4] System VM's Volumes Recreation is not happening on an event of New Volume creation Failures
Changes:
- Reason was that the old volume's templateId was being updated before volume creation was attempted. So on the retry, we dint find a difference in volume's templateId and VM's templateId and did not enter the recreation logic.

- Fix is to update the new volume's templateId with the VM's templateId while creating the new volume. The old volume's templateId stays the same and the volume is marked as 'Destroy' when a new volume is created.
2011-04-26 11:35:24 -07:00
Murali Reddy 435c20c0cc Bug 9273: resource cont going -ve
adding addtional check that ensure we decrease the count in advanceStart only on new vm creation.
2011-04-22 01:19:23 +05:30
alena 22ee7117f5 bug 9521: fixed NPE in finalizeCommandsOnStart() method by adding vm's nic to vm profile during the vm to vmProfile conversion.
status 9521: resolved fixed
Conflicts:

	server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
	server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
	server/src/com/cloud/vm/VirtualMachineManagerImpl.java
2011-04-20 16:16:01 -07:00
alena f881d394e2 bug 9415: deleteHost - cleanup vms running on the host to be removed
status 9415: resolved fixed
2011-04-20 15:50:10 -07:00
Kelven Yang 7103e1c9a7 global replacement to avoid using getClass().getName() for unique names 2011-04-19 17:26:41 -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
Murali Reddy 9bf2d32884 Bug 9273 : resource counts going -ve
pushing 2.2.4 fix in to master
2011-04-13 17:43:12 +05:30
prachi 80fe0b584d More changes for Bug 9387:
- Update system vm_instance's template_id if it does not match the system vm template.
- Use _templateDao.findSystemVMTemplate to find the latest system vm template.
2011-04-12 18:20:01 -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
anthony ac223c197f bug 9392: don't lock domr entry, otherwise updating domr state fails
status 9392: resolved fixed
2011-04-11 16:06:12 -07:00
Frank 105db3b15a Merge branch 'baremetal' to master
modifies:
	api/src/com/cloud/api/ApiConstants.java
	api/src/com/cloud/api/commands/AddHostCmd.java
	api/src/com/cloud/api/commands/CreatePodCmd.java
	api/src/com/cloud/api/commands/DeployVMCmd.java
	api/src/com/cloud/dc/Pod.java
	api/src/com/cloud/network/NetworkService.java
	server/src/com/cloud/agent/manager/AgentManagerImpl.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/dc/HostPodVO.java
	server/src/com/cloud/network/NetworkManager.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	setup/db/create-schema.sql
	utils/src/com/cloud/utils/SerialVersionUID.java
2011-04-11 14:21:41 -07:00
Murali Reddy 290c799b2c Bug 9273 : [Stress Test] 'Count' in resource_count table has negative values
pushing 2.2.4 changes in to master
2011-04-11 15:37:53 +05:30
Alex Huang 075fba5899 stackmaid is now taskmanager 2011-04-05 10:17:22 -07:00
prachi 53f8ebf6f0 Bug 9043 - VM manual migration - when destination host is out of memory for migration, VMs being migrated remained in 'migrating' state
Changes:
- When migration fails we try to do cleanup on the destination host agent. The AgentUnavailableException in this cleanup was not caught.
-Due to that other cleanup like reverting capacity allocated and vm state were skipped.
-Fix is to catch the AgentUnavailableException so that rest of the cleanup can happen.
- Also corrected the exceptions in various cases of migration failure.
- In case the VM is still starting, HA should schedule a retry. Introduced a special migration exception for handling this.
2011-04-04 17:30:08 -07:00
anthony 8712334ae2 bug 9161:
add more log
2011-03-28 14:46:54 -07:00
Alex Huang 9d158dc060 Removed the async create status for volume now that our customers don't use it 2011-03-24 20:04:23 -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
anthony d2dc0a504b put host into maintenance, if the VM can not migrate, just stop it 2011-03-23 16:50:59 -07:00
Frank d297eea96f Bug 8208 - bare metal provisioning
do fullsync in baremetal resource
2011-03-15 15:29:52 -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
Kelven Yang 6203ba6bfe bug 8558: improve cluster management 2011-03-09 17:18:48 -08:00
alena 4f4683ec93 bug 8937: throw an Exception when fail to reapply Firewall rules as a part of network Implement
status 8937: resolved fixed
2011-03-09 16:24:28 -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
alena b20fafeaa4 bug 8874: rebootVm - don't try to implement already implemented network
status 8874: resolved fixed
2011-03-07 10:23:48 -08:00
Frank 7fa053370e Bug 8208 - bare metal provisioning
Add bare metal planner
2011-03-01 17:47:37 -08:00
alena a1e9f7d5c2 Return false when vm fails to stop 2011-03-01 14:45:39 -08:00
Frank 35b7c26689 Bug 8208 - bare metal provisioning
able to start, stop, reboot, destroy VM
2011-03-01 11:40:40 -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
Frank 5035778b1a Bug 8208 - bare metal provisioning
StartCommand cloud reach to BareMetalResrouce
2011-02-24 19:22:34 -08:00
Frank f82dec999d Bug 8208 - bare metal provisioning
complete createVirtualMachine method
2011-02-24 14:07:10 -08:00
alena 57f6b16cdb bug 8719: fixed NPE happening during HA process - get control nic infrormation in finalizeCommandsOnStart() method instead of setting it in caller methods
status 8719: resolved fixed
2011-02-23 19:35:22 -08:00
Kelven Yang 8695e7250c Update template and storage manager to allow hypervisor based command delegation 2011-02-18 11:37:50 -08:00
anthony 6dcbd3bbfd use returned VO 2011-02-17 15:11:38 -08:00
anthony 80a328034c bug 8609: when failed to start a VM in HA (due to domr is not migrated), a runtimeException is thrown out, caused HA for this VM is not resheduced.
status 8609: resolved fixed
2011-02-16 14:20:28 -08:00
Alex Huang b0f0efa29b more changes to make it work better in a cluster 2011-02-11 17:03:04 -08:00
Alex Huang db7bc893b9 added cluster awareness to vm start/stop 2011-02-11 17:03:04 -08:00
Edison Su 08285af33f fix capacity caclulation issue after migration 2011-02-09 13:33:42 -05:00
Alex Huang b92fc074aa added forced paramter to stop apis 2011-02-08 15:38:26 -08:00
kishan 75e596bb80 bug 7952, 8363: Fixed usage events for Vm destroy and recover
status 7952, 8363: resolved fixed
2011-02-08 16:57:46 +05:30
nit a3b1609199 bug 8463: Decrease the resource_count if vm fails to Start and goes to ERROR state.
status 8463: resolved fixed
2011-02-08 16:52:09 +05:30
Alex Huang 5d796c718b bug 7612: fixed a bug where if start when through all retries, we throw an exception 2011-02-07 17:17:34 -08:00
Alex Huang bee6953e09 ha done? needs testing 2011-02-07 10:58:25 -08:00
Alex Huang f948926a2f some minor adjustments before doing the big work 2011-02-07 10:58:25 -08:00
alena e9dd1ee822 bug 8383: HA: perform ssh check before marking system vms as running. For domR, also reapply all ips/PF/LB/VPN/Dhcp/Userdata.
status 8383: resolved fixed
2011-02-04 14:33:14 -08:00
Alex Huang e153ab461c removed unused method 2011-02-04 11:56:21 -08:00
Alex Huang 86e51eb536 Made changes to the exceptions thrown by NetworkManagerImpl 2011-02-04 11:56:20 -08:00
Alex Huang 0105c03a27 initial HA work 2011-02-04 11:51:14 -08:00