230 Commits

Author SHA1 Message Date
Alex Huang
9d4311cc0a bug 10352: fixed the issue. I mistakenly threw an exception when I was not suppose to 2011-06-17 17:18:28 -07:00
Alex Huang
36ee97334b bug 10352: fixed the issue. I mistakenly threw an exception when I was not suppose to 2011-06-17 17:18:04 -07:00
Kelven Yang
2a6307f272 1) Remove customer field applied to virtual machine in VMware. 2) always track VM host change in VMware regardless whether or not native HA is enabled 2011-06-16 16:22:11 -07:00
Kelven Yang
464d793754 1) Remove customer field applied to virtual machine in VMware. 2) always track VM host change in VMware regardless whether or not native HA is enabled 2011-06-15 18:37:38 -07:00
Abhinandan Prateek
61cdbd0e1f bug 10062: better error message
status 10062: resolved fixed
2011-06-15 09:56:42 +05:30
Abhinandan Prateek
db94ece73b bug 10062: better error message 2011-06-15 10:05:45 +05:30
Alex Huang
59fc206664 bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:33:10 -07:00
Alex Huang
63113661d1 bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:33:09 -07:00
Alex Huang
d39048faca bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:33:09 -07:00
Alex Huang
1ac7276942 bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:36:32 -07:00
Alex Huang
1561275838 bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:35:34 -07:00
Alex Huang
1d7e70acd1 bug 10260: propagate ha and deployment planner fixes 2011-06-13 17:35:20 -07:00
Sheng Yang
0c92bf5b79 Some build fixes and code refactoring for redundant router 2011-06-07 14:47:46 -07:00
Sheng Yang
62ac899091 bug 9154: Initial check in for enabling redundant virtual router
This patch enable redundant virtual routers.

1. To enable this feature, db need to be updated using follow SQL by now(we
would get a UI way later):

UPDATE network_offerings SET redundant_router=1 WHERE guest_type="Virtual" AND
system_only=0;

2. System would try to start up two routers at different hosts. But if there is
only one host in the zone, system would start up two routers on it.

3. The failover part is using keepalived, and connection tracking part is using
conntrackd. There would be one master router and one backup router. The status
of router(master or backup) can be query from the database table domain_router
now. Management server would update the status every 30s by default.

4. The routers for the same zone would use same external NIC(same ip and mac).
The script used for fail-over would ensure only one external NIC present in the
network at any time.

5. Currently management server don't got the ability to stop one of router is
both of them reported as master. The feature is in the todo list.

After two routers start up, disconnect anyone of them, the guest network
shouldn't be affected, and established connection(http, ssh, etc.) should still
works. The fail-over on gateway part should be 3~4 seconds.

Currently the patch works with KVM. Would deal with vmware and XenServer soon.
2011-06-07 14:47:45 -07:00
Alex Huang
d9e0bcfa1e bug 10126: Renamed getPodId() to getPodIdToDeployIn() 2011-06-03 22:17:08 -07:00
Alex Huang
2ceadec326 bug 9651: tags parameter added to createnetwork 2011-06-01 17:36:14 -07:00
Frank
9961e1ca2a Fix NPE when reboot vm
vm.podId has different meaning than you think
2011-06-01 11:54:20 -07:00
Alex Huang
e552f118af propagated bf8afdbc7af3c0e9fbc90c841fedec57ac7b8cdf 2011-05-17 16:02:44 -07:00
Alex Huang
ea9703997b proxy agent 2011-05-17 07:12:58 -07:00
Abhinandan Prateek
029a9e6a8a bug 9815: ClassCastException: com.cloud.agent.api.Answer cannot be cast to com.cloud.agent.api.StopAnswer
status 9815: resolved fixed

The type cast should be done after making sure that the command was successful. Otherwise you may have the base Answer returned.
2011-05-10 11:41:20 +05:30
prachi
4c89cc57ae Bug 9652: Need to provide a way to specify deployment plan during VM start
Changes:
- Throw an exception if the deployment plan passed into start() cannot be satisfied by the current constraints (such as root volume is already created in a pool in a different
cluster).
2011-05-06 14:39:53 -07:00
Alex Huang
7bc25643a9 propagating fix from 2.2.4 2011-05-05 17:57:06 -07:00
Alex Huang
117a81acf6 cleanup agent manager 2011-05-05 17:57:06 -07:00
prachi
9aba817256 Bug 9652: Need to provide a way to specify deployment plan during VM start
Changes:
- Added a new parameter to pass in deployment plan during vm start
- If a hostId is passed in to the DeployVMCmd (only allowed for a root admin to test a host), a plan is passed in to start the vm in that host's datacenter, pod and cluster and on that host
- If a plan is passed in during start, but if the VM's root volume is READY, then plan of the root volume takes precedence. In that case the plan passed in is not used.
2011-05-04 15:02:52 -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
anthony
93eb893c22 misuse instanceName and name, which causes vm sync behavior weirdly 2011-04-29 19:01:46 -07:00
anthony
bbc470ed4f bug 9619: handle two types of domr name
status 9619: resolved fixed
2011-04-29 14:13:25 -07:00
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