188 Commits

Author SHA1 Message Date
Kelven Yang
0965adb003 CLOUDSTACK-5672: Fix VM work job serialization issues in Add/Remove nic 2014-01-09 14:29:12 -08:00
Kelven Yang
87381d4236 CLOUDSTACK-5725: put origin flow context id into log4j context prefix to link jobs with the orchestration work flow in logging 2014-01-09 14:29:12 -08:00
Kelven Yang
ad6454d2bf CLOUDSTACK-5767: Remove the logic of using underlying job related fields for volume specific logic. 2014-01-09 14:29:12 -08:00
Kelven Yang
737a382c38 Fix a typo caused problem in attach-volume process 2014-01-09 14:29:12 -08:00
Kelven Yang
0587382265 CLOUDSTACK-669: Finalize VM work dispatching mechanism to avoid big switch statement 2014-01-09 14:29:12 -08:00
Kelven Yang
a6f126d24e Fix a style-check problem after cherry-pick 2014-01-09 14:29:12 -08:00
Kelven Yang
8c93bd6080 CLOUDSTACK-669: Convert volume snapshot orchestration flow to make it be serialized with other VM operations 2014-01-09 14:29:12 -08:00
Kelven Yang
bf9a554522 CLOUDSTACK-669: covert VMsnapshot orchestration flows to make them be serialized with other VM operations 2014-01-09 14:29:12 -08:00
Mike Tutkowski
03118c2969 Merge from 4.3: CLOUDSTACK-4810: Enable hypervisor snapshots for CloudStack-managed storage (for XenServer and VMware) 2014-01-09 14:44:35 -07:00
Min Chen
3223028fd6 CLOUDSTACK-5841:Snapshots taken before migration NFS to S3 can not be
used cross-zone.
2014-01-08 17:43:06 -08:00
Harikrishna Patnala
00e67f57e7 CLOUDSTACK-5827: [Automation] Destroy VM failed, while deleting account
Signed-off-by: Koushik Das <koushik@apache.org>
2014-01-08 18:38:59 +05:30
Koushik Das
6d75c31958 CLOUDSTACK-5002: unable to destroy vm ;VM destroy failed in Stop i-2-59-VM Command due to You gave an invalid object reference. The object may have recently been deleted.
This is happening as concurrent operations are happening on the same VM. Earlier this was not seen as all vm operations were synchronized at agent layer. By making execute.in.sequence
global config to false this restriction is no longer there. In the latest code operations to a single vm are synchronized by maintaining a job queue. In some scenarios the destroy vm operation
was not going through this job queue mechanism and so was resulting in failures due to simultaneous operations.
2014-01-07 14:23:26 +05:30
Alena Prokharchyk
647ea6e2d0 listNics API: added optional networkId parameter allowing to list nics by network id for the specific vm 2014-01-06 17:09:14 -08:00
Devdeep Singh
30d55cf0c4 CLOUDSTACK-5456: Download root volume when vm is in stopped state fails on hyper-v. Made
changes to make sure the volume entry is created in the db with the right image format.
2013-12-26 19:13:31 +05:30
Devdeep Singh
c75f8bcc06 CLOUDSTACK-5420: The agent manager wasn't transitioning the host to maintenance
mode if their are no vms running on the host. Made the change to do so.
2013-12-26 11:15:51 +05:30
Nitin Mehta
edc1b78d84 Revert "Revert "CLOUDSTACK-5281:""
This reverts commit ab37009e9015e90f39f001dbc7023ce52319dcff.
2013-12-20 17:30:05 -08:00
Alex Huang
ab37009e90 Revert "CLOUDSTACK-5281:"
This reverts commit 6b62a04eaf1196ebcce5e81c29c9e0f59dd4f858.
2013-12-20 17:23:33 -08:00
Nitin Mehta
6b62a04eaf CLOUDSTACK-5281:
Resource limit shouldnt be counted for resources with display flag = 0. Correcting this for the networks at the moment.
2013-12-20 16:58:43 -08:00
Alena Prokharchyk
1832cf6660 CLOUDSTACK-5597: don't perform data disk allocation on the primary storage when attachVolume calls is made for the vm which ROOT disk hasn't been created yet. 2013-12-20 13:39:13 -08:00
Edison Su
8caf52c6bc add xenserver 6.2.0 hotfix support, to optimize vdi copy
add xenserver hot fix

Conflicts:

	api/src/com/cloud/vm/VirtualMachineName.java
	core/src/com/cloud/host/HostInfo.java
	core/src/org/apache/cloudstack/storage/to/SnapshotObjectTO.java
	deps/XenServerJava/src/com/xensource/xenapi/VDI.java
	engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
	engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java
	engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
	plugins/hypervisors/xen/src/com/cloud/hypervisor/XenServerGuru.java
	plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
	plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerPoolVms.java
	plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
	server/src/com/cloud/configuration/Config.java
2013-12-19 14:15:41 -08:00
Harikrishna Patnala
707da55fe3 CLOUDSTACK-5554: Custom disk offering allows to create a datadisk with size greater than custom.diskoffering.size.max value Fixed both custom.diskoffering.size.max and custom.diskoffering.size.min to ensure input values while deploying the VM and creating volume APIs.
Moved both parameters to VolumeOrchestrationService using ConfigDepot
2013-12-19 16:03:27 +05:30
Koushik Das
f2fab9d5b1 CLOUDSTACK-5458: cpu speed is not getting updated in vm_instance table after service offeirngs change
Removed cpu, ram and cpu speed fields from the vm_instance table as these are not used
2013-12-19 14:15:39 +05:30
Nitin Mehta
1c0b8db01b CLOUDSTACK-4941:
Adding the missing file
During HA and maintenance call different planners (if the original planners are not able to find capacity) which skip some heurestics
2013-12-18 16:27:20 -08:00
Kelven Yang
3c965d0685 CLOUDSTACK-669: convert volume attach/detach flows to make them be serialized with other VM operations 2013-12-18 16:14:07 -08:00
Min Chen
afcf967d24 Revert "CLOUDSTACK-4941:"
This reverts commit 231e7c01f2415c1f25d6a2715b7469fe7fcfe771.
2013-12-18 16:01:37 -08:00
Nitin Mehta
231e7c01f2 CLOUDSTACK-4941:
During HA and maintenance call different planners (if the original planners are not able to find capacity) which skip some heurestics
2013-12-18 14:58:37 -08:00
Prachi Damle
6d6d11f7a4 CLOUDSTACK-4852: Since upgrade to 4.2 only users at the zone-attached domain level can manipulate VMs
Changes:
- Removing the trailing spaces in the file
2013-12-17 14:55:59 -08:00
Prachi Damle
78e4dd8566 CLOUDSTACK-4852: Since upgrade to 4.2 only users at the zone-attached domain level can manipulate VMs
Changes:
- The vmprofile owner passed in to the planner should be the VM's account and not the caller
- Do not do the access check for Root Admin

Conflicts:

	server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
2013-12-17 14:55:56 -08:00
Kelven Yang
719271b1d9 Fix tab and trailing spaces 2013-12-16 15:15:30 -08:00
Kelven Yang
9d3827e6fe CLOUDSTACK-669: refactor VM work job dispatcher to allow volume/snapshot manager to participate serialized job handling 2013-12-16 15:15:30 -08:00
Murali Reddy
c6c2995231 CLOUDSTACK-4616: When system Vms fail to start when host is down , link
local Ip addresses do not get released resulting in all the link local
Ip addresses being consumed eventually.

fix ensure Nics with reservation strategy 'Start' should go through
release phase in the Nic life cycle so that release is performed before
Nic is removed to avoid resource leaks.
2013-12-16 19:05:35 +05:30
Alex Huang
be5e5cc641 All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
Kelven Yang
26c1ba296c CLOUDSTACK-669: put user vm work under new vmsync model 2013-12-11 16:29:59 -08:00
Jayapal
5c12250dea CLOUDSTACK-5278 Fixed cleaning up egress default rules on VR and SRX
1. Egress default policy rules is send to the firewall provider. It is up to the
    provider to configure the rules.
   2. The default policy rules are send for both allow and deny default policy.
   3. On network shutdown rules for delete are send.
   4. For VR and SRX, by default deny the traffic. So no default rule to deny traffic is required.
2013-12-10 14:19:03 +05:30
Kelven Yang
aa72b76aec CLOUDSTACK-669: put system vm work under new vmsync model 2013-12-06 16:53:11 -08:00
Prachi Damle
eb7cd06e19 CLOUDSTACK-5401: VM migration during host maintenance fails if pool.storage.capacity.disablethreshold is lowered
Changes:
- During Vm migration while finding a new host within the cluster, we need to set the storagepool Id to the deployment plan too.
- This will indicate the planner that the volumes are ready and no need to find new pool
- This in turn will prevent the threshold check done during the pool allocation. This step is not needed since there is no need to allocate pools newly.
- Thus the migration wont fail because th threshold check fails.
2013-12-06 11:18:28 -08:00
Prachi Damle
5475312612 CLOUDSTACK-5399: Add option to createVolume API to specify a VM, to place the volume appropriately and attach immediately
Changes:

    - Added 'virtualmachineid' parameter to the createVolume API to specify a VM for the volume. The Vm should be in 'Running' or 'Stopped' state.
    - This parameter is used only when createVolume API is called using snapshotid parameter
    - When this parameter is set, the volume is created from the snapshot in the pod/cluster of the VM. Also the volume is then attached to the VM in the same request
    - If attach Volume fails but create has succeeded, the API errors out but the Volume created remains available. User may attach the same volume later
    - When Vm is provided, but if no storage pool is available in the VM's pod/cluster then the volume is not created and API fails.
2013-12-06 11:18:26 -08:00
Alex Ough
88f64b2b93 Changed 'MigrateCommand' to use the global setting value of 'execute.in.sequence.hypervisor.commands'
Signed-off-by: Koushik Das <koushik@apache.org>
2013-12-06 09:41:50 +05:30
Anthony Xu
04b48ae04e XS VMmetadata platform contains virtual platform related info, CS should save platform info in DB to migrate the VM to other Cluster 2013-12-05 01:41:14 -08:00
Nitin Mehta
b0a1528c5a CLOUDSTACK-5349:
Volume create usage event and resource count werent getting registered. Check its type rather than it is UserVm since the code is coming from VirtualMachineManager.
2013-12-04 11:01:33 -08:00
Alena Prokharchyk
bd6f706b72 CLOUDSTACK-5261: added support for Alert publishing via ROOT Admin API
Conflicts:
	engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
	engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
	engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
	engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
	plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java
	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
	plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
	server/src/com/cloud/alert/AlertManagerImpl.java
	server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java
	server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/ha/HighAvailabilityManagerExtImpl.java
	server/src/com/cloud/ha/HighAvailabilityManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java
	server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	usage/src/com/cloud/usage/UsageAlertManagerImpl.java
	usage/src/com/cloud/usage/UsageManagerImpl.java

listAlerts: introduced new parameter "name" to the alertResponse

Conflicts:
	api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
	server/src/com/cloud/alert/AlertManagerImpl.java
	usage/src/com/cloud/usage/UsageAlertManagerImpl.java

Added new Admin API - generateAlert. Available to ROOT admin only

Conflicts:
	api/src/org/apache/cloudstack/alert/AlertService.java
	api/src/org/apache/cloudstack/api/BaseCmd.java
	usage/src/com/cloud/usage/UsageAlertManagerImpl.java

listAlerts: implemented search by alert name

Conflicts:
	api/src/org/apache/cloudstack/alert/AlertService.java
	api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java
	engine/schema/src/com/cloud/alert/AlertVO.java
2013-12-04 10:05:46 -08:00
Bharat Kumar
68406ba29d CLOUDSTACK-5161 enable scaling of a vm using custom offering
Signed-off-by: Koushik Das <koushik@apache.org>
2013-11-29 17:53:33 +05:30
Alena Prokharchyk
fad0cfcc18 Added new paramerer "start" to createVPC command. When false is passed in, VPC won't be started (its VPC VR won't get implemented) till the point when the first netwotrk gets implemented in the VPC.
The parameter is optional and true by default to preserve the original behavior

Conflicts:
	api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
2013-11-22 09:39:54 -08:00
Alena Prokharchyk
e8ec75a2b5 Removed unused agent lb timer 2013-11-21 14:29:40 -08:00
Alex Huang
de6bf7470c One more merge conflict 2013-11-21 08:16:48 -08:00
Alex Huang
433a631916 Reformat of source code to set a stable base for the future. I couldn't get checkstyle enabled. There's still about a thousand errors from checkstyle. Most of it from length errors from comments and strings. Will attempt to remove those tonight. This change is so large I just want to get it in before any merge nightmares. The changes are fairly minor though and I did a full compile and start a server with the reformat code. 2013-11-21 07:56:47 -08:00
Alex Huang
170f32f171 Broke up some long strings 2013-11-21 07:25:01 -08:00
Hugo Trippaers
cf715ff491 Bump 4.3.0 to 4.4.0 in master 2013-11-21 16:01:15 +01:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
eaa250fd3c Formatted again after all the tab expansions and eol removals 2013-11-21 04:47:01 -08:00