434 Commits

Author SHA1 Message Date
Alex Huang
0bcb64605f all built with the latest 2013-01-09 05:02:39 -08:00
Kelven Yang
b274c570f9 Cleanup places that use explicit wiring of the components 2013-01-08 17:45:33 -08:00
Alex Huang
30f2565d98 Merge branch 'api_refactoring' into javelin 2013-01-08 12:36:04 -08:00
Rohit Yadav
a948a89378 Sync updates: Merge branch 'master' into api_refactoring
Conflicts:
	server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
	server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-07 10:38:43 -08:00
Koushik Das
3ffbc4320a CLOUDSTACK-595 : Recreate root volume scenarios doesn't work in vmware
Issue seen during system vm template upgrade and restoreVM command
scenarios for vmware. In these cases CS tries to recreate root disk with
same name as the existing one, in case of vmware this results in creation
of vmdk file with same name for both existing and new root volume.
This results in undesired behavior when storage cleanup thread tries to
cleanup old volume. Made the vmdk file name unique by adding the volume
id to it. This will ensure that during volume recreation in the scenarios
mentioned vmdk will get created with a new name and there will be
no undesired side effects of running the storage cleanup thread.
2013-01-07 16:18:05 +05:30
Rohit Yadav
73a0c3e07f api: Refactor move storagepool apis to storage pkg
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-05 15:32:58 -08:00
Kelven Yang
2e9c55f8f6 More Spring issues to bootstrape javalin server 2013-01-04 14:25:12 -08:00
Kelven Yang
25d14418b9 Replace Adapters<T> with standard List<T> to work with Spring injection 2013-01-03 13:33:52 -08:00
Min Chen
21c1623a03 Create DB view for Volume to speed up ListVolumesCmd.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-25 17:08:50 -08:00
Rohit Yadav
296b49c2f8 Merge branch 'master' into test-merge-api
Conflicts:
	api/src/com/cloud/agent/api/BackupSnapshotCommand.java
	api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java
	api/src/com/cloud/agent/api/to/PortForwardingRuleTO.java
	api/src/com/cloud/network/NetworkService.java
	api/src/com/cloud/resource/ResourceService.java
	api/src/org/apache/cloudstack/api/ApiConstants.java
	api/src/org/apache/cloudstack/api/ResponseGenerator.java
	api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java
	client/tomcatconf/commands.properties.in
	core/src/com/cloud/storage/SnapshotVO.java
	pom.xml
	server/src/com/cloud/api/ApiDispatcher.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/offerings/NetworkOfferingVO.java
	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/src/com/cloud/upgrade/dao/Upgrade40to41.java
	server/src/com/cloud/vm/UserVmManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	setup/db/create-schema.sql
	setup/db/db/schema-40to410.sql

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-23 13:54:46 -08:00
Min Chen
e7fa1a86fb Create DB views to improve ListHostsCmd performance.
Signed-off-by: Min Chen <min.chen@citrix.com>
2012-12-22 21:47:05 -08:00
Marcus Sorensen
6ed1989133 Summary: Allow for custom storage adaptors based on pool type in KVM
Detail: Instead of using LibvirtStorageAdaptor for everything, you can create
your own storage adaptor and use it. We select storage adaptor based on storage
pool type, thus we needed to adjust LibvirtComputingResource to pass pool type
to everything in KVMStoragePoolManager. This in turn required that we pass the
info necessary to LibvirtComputingResource as well, so a few agent Commands were
modified.

Note this patch in and of itself shouldn't change any existing behavior, just
allow for new storage adaptors to be selected based on storage pool type.

Reviewed-by: Edison Su
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1355769696 -0700
2012-12-17 11:41:36 -07:00
Edison Su
b70c1a5a84 Backs NFS-based secondary storage with an S3-compatible object store. Periodically, a reaper thread synchronizes templates and ISOs stored on a NFS secondary storage mount with a configured S3 object store. It also pushes snapshots to the object store when they are created and downloads them in other zones on-demand. In addition to permitting the use of commodity or IaaS storage solutions for static assets, it provides a means of automatically synchronizing template and ISO assets across multiple zones. 2012-12-13 23:18:37 -08:00
Vijayendra Bhamidipati
8ced7da733 CLOUDSTACK-333: When Datacenter name in VCenter has spaces Primary Storage (VMFS) discovery will fail
Description:

    Missed encoding of URI when discovering ESX cluster in vCenter.

    Signed-off-by: Vijayendra Bhamidipati <vijayendra.bhamidipati@citrix.com>
2012-12-13 22:43:59 -08:00
Rohit Yadav
e398b1e47a api: Refactor command and response classes to org.apache.cloudstack.api.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 19:23:24 -08:00
Rohit Yadav
af28c06998 api: move and group all under command, org.apache.cloudstack.command.*
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-07 18:30:54 -08:00
Rohit Yadav
cc386b791b api_refactor: move storagepool api to admin pkg
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-06 10:32:58 -08:00
Rohit Yadav
8773fc2a55 api_refactor: refactor volume apis
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-04 11:20:48 -08:00
Marcus Sorensen
88180fc139 Summary: Direct template imaging for CLVM, bypass copy template to primary
Detail: Because of the way most other primary storage types work with cloudstack
   (i.e. backing stores) CLVM actually copies the template to a local logical
   volume on primary storage, then uses that. This causes all of your primary
   storage to be littered with a copy of every template used. Since we're not
   using these, dump the template direct to the newly created logical volume.
   This is faster as well since the template is sparse; we're not creating a fat
   template on primary storage and then copying that to a logical volume when we
   deploy from template.

BUG-ID: CLOUDSTACK-508
Bugfix-for: 4.1
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1353221260 -0700
2012-11-17 23:47:39 -07:00
Kelven Yang
cea8f3bf37 Switch inject annotation to javax and let ComponentLocator to recognize both the new and original inject annotation 2012-11-07 15:03:22 -08:00
Kelven Yang
aab02e2743 Add Spring annotation to major components 2012-11-07 14:53:39 -08:00
Alena Prokharchyk
214bbf3ebd CLOUDSTACK-279: fixed deleteProject when executed by the regular user. Always pass System account as a caller when do account cleanup
Conflicts:

	api/src/com/cloud/api/commands/DeleteRemoteAccessVpnCmd.java
	server/src/com/cloud/network/element/CiscoNexusVSMElement.java
	server/src/com/cloud/network/element/ElasticLoadBalancerElement.java
	server/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
	server/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/element/NetscalerElement.java
	server/src/com/cloud/network/element/OvsElement.java
	server/src/com/cloud/network/element/VpcJuniperSRXExternalFirewallElement.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/storage/StorageManager.java
2012-10-17 17:26:19 -07:00
Alena Prokharchyk
8f2d9a09e5 CLOUDSTACK-332: intermediate checkin fixing count parameter in listCommands
Fixes the count in commands:

listVolumes
listVirtualMachines
listSnapshots
listRouters
listFirewallRules
listPortForwardingRules
listLoadBalancerRules
listIpForwardingRules
listAccounts
listUsers
listDomains
listDomainChildren
listPublicIpAddresses
listAlerts
listAsyncJobs
listRemoteAccessVpns
listVpnUsers
listTags
listPrivateGateways
listNetworkACLs
listStaticRoutes

Conflicts:

	api/src/com/cloud/api/commands/ListVMsCmd.java
	api/src/com/cloud/api/commands/ListVolumesCmd.java
	api/src/com/cloud/network/lb/LoadBalancingRulesService.java
	server/src/com/cloud/network/firewall/FirewallManagerImpl.java
	server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
	server/src/com/cloud/network/rules/RulesManagerImpl.java
	server/src/com/cloud/network/vpc/NetworkACLManagerImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
	server/src/com/cloud/tags/TaggedResourceManagerImpl.java
2012-10-12 13:58:59 -07:00
Mice Xia
955cbd97bc CLOUDSTACK-10 Deleting a disconnected primary storage results in partial removed state 2012-09-18 11:18:44 +08:00
Koushik Das
65eeeaf071 CS-14277
Support for local data disk. Currently enable/disable config is at zone level, in subsequent checkins it can be made more granular.
    Following changes are made:
    - Create disk offering API now takes an extra parameter to denote storage type (local or shared). This is similar to storage type in service offering.
    - Create/delete of data volume on local storage
    - Attach/detach for local data volumes. Re-attach is allowed as long as vm host and data volume storage pool host is same.
    - Migration of VM instance is not supported if it uses local root or data volumes.
    - Migrate is not supported for local volumes.
    - Zone level config to enable/disable local storage usage for service and disk offerings.
    - Local storage gets discovered when a host is added/reconnected if zone level config is enabled. When disabled existing local storages are not removed but any new local storage is not added.
    - Deploy VM command validates service and disk offerings based on local storage config.
    - Upgrade uses the global config 'use.local.storage' to set the zone level config for local storage.
(cherry picked from commit 62710aed37606168012a0ed255a876c8e7954010)
2012-09-11 17:22:43 +05:30
Anthony Xu
0442917381 only check ISO which is downloaded status 2012-09-10 13:30:25 -07:00
Prachi Damle
3d0069bb56 CS-16158 : Load Test - Adding host takes much longer in 3.0.x compared to 2.2.14.
Changes:

There is an unnecessary search over capacity table that scans entire table.
2012-08-31 13:40:17 -07:00
Edison Su
481aae1ebc add recreate.systemvm.enabled parameter to control recreating systemvm 2012-08-20 11:19:26 -07:00
Mice Xia
7e093a949d CS-15823 Failed snapshot should be marked as Error and cleanup asynchronously 2012-08-15 11:06:25 +08:00
kishan
65c90227ae bug CS-15648: For volumes created from snapshot, create usage event after successful volume
status CS-15648: resolved fixed
reviewed-by: Nitin
2012-08-14 11:58:07 +05:30
Alena Prokharchyk
32f55f3e3c Merge branch 'master' into vpc 2012-08-12 10:22:54 -07:00
Koushik Das
ff773a8122 CS-15621: Using migrateVolumes method which does not perform input validation. Some input validation in the migrateVolume method prevented migration of volume in READY state. Also using volume disk offering to check if it is a local or shared one.
Verified on XS 6.0.2

Test scenario
- Created 2 shared primary storage pools
- Created data volume using shared disk offering
- Attached it to a running VM (created in one storage pool)
- Detached it (now it is in READY state)
- Created a new VM in stopped state (using deployVirtualMachine API with startVm=false)
- Attached the data volume to this new VM
- Started new VM (migrated volume scenario got hit when the planner assigned the other shared pool)
2012-08-12 17:05:28 +05:30
Alena Prokharchyk
b61468d65c Merge branch 'master' into vpc
Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2012-08-11 18:27:18 -07:00
Edison Su
263216caa5 Adds CLVM as an option for primary storage. It copies most of the RBD bits, in most cases simply adding an 'else if' or similar. In the managesnapshot.sh we add the ability to manipulate snapshots for the CLVM volumes, as well as a few minor fixes like adjusting the usage for the -b option to reflect that it accepts four arguments (note that it already accepted four args, it just wasn't reflected in the usage).
RB: https://reviews.apache.org/r/6470/
Send-by: shadowsor@gmail.com
2012-08-10 13:33:06 -07:00
Alena Prokharchyk
5a72044dc7 Merge branch 'master' into vpc 2012-08-03 14:30:54 -07:00
Alena Prokharchyk
e7a1862867 VPC: CS-15827 - register only VpcVirtualNetworkApplianceMgr
Conflicts:

	api/src/com/cloud/api/BaseCmd.java
	api/src/com/cloud/network/VpcVirtualNetworkApplianceService.java
	plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
	server/src/com/cloud/configuration/DefaultComponentLibrary.java
	server/src/com/cloud/ha/UserVmDomRInvestigator.java
2012-08-03 14:23:45 -07:00
Nitin Mehta
3c68f1f8e8 bug CS-15200: Introducing state transition when volume is getting copied from secondary storage and it is put into Creating state
Reviewed-by: Kishan
2012-08-03 17:18:13 +05:30
Alena Prokharchyk
5cbe3d9722 ResourceTags: resourcetags support for Project/Vpc/NetworkACL/StaticRoute
Conflicts:

	api/src/com/cloud/api/commands/ListVPCsCmd.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
	server/src/com/cloud/network/vpc/VpcManagerImpl.java
	server/src/com/cloud/projects/dao/ProjectDaoImpl.java
	server/src/com/cloud/uuididentity/dao/IdentityDao.java
2012-08-01 18:54:08 -07:00
Wido den Hollander
406fd95d87 Add RBD support for primary storage
This patch adds RBD (RADOS Block Device) support for primary storage in combination with KVM.

To get this patch working you need:
- libvirt-java 0.4.8
- libvirt with RBD storage pool support (>0.9.13)
- Qemu with RBD support (>0.14)

The primary storage does not support all the functions of CloudStack yet, for example snapshotting is disabled
due to the fact that backupping up a RBD snapshot is not possible in the way CloudStack wants to do it.

Creating templates from RBD volumes goes well, creating a VM from a template however is still a hit-and-miss.

NFS primary storage is also still required, you are not able to run your System VM's from RBD, they will need
to run on NFS.

Other then these points you can run instances with RBD backed disks.
2012-07-26 22:22:26 +02:00
Edison Su
50ffa95f63 ifix CS-15609 Volumes can be created as a part of VM creation when
un-allocated space is insufficient on primary storage

check the availability of un-allocated primary storage space during
planning stage, for multiple-volume VM creation scenario
modification in StorageManagerImpl.java and StorageManager.java:
add a new method storagePoolHasEnoughSpace(List<Volumes>, StoragePool),
check if storagePool has enough space for all requested volumes
modification in FirstfitPlanner.findPotentialDeploymentResources:
handle multiple volume case, keep track of allocated volumes for pools
and call storagePoolHasEnoughSpace to check space availability
modification in AbstractStoragePoolAllocator.java:
extract capacity computation logic and make a new method in
StorageManagerImpl

RB: https://reviews.apache.org/r/6028/
Send-by: mice_xia@tcloudcomputing.com
2012-07-26 10:10:18 -07:00
Koushik Das
88f7872b81 CS-15279
Issue happens when ROOT volume gets created and there is subsequent failure in starting the VM. During retry if allocator assigns a different storage pool the scenario was not handled. Now in case of local storage the volume get recreated on the newly assigned pool and old one gets cleaned up. In case of shared storage the existing volume is migrated to new storage pool.
2012-07-23 14:49:04 -07:00
Edison Su
8b7b838c8a CS-15544: recreate router if router filesystem is crashed 2012-07-11 16:14:28 -07:00
Alena Prokharchyk
63d6941bdc ResourceTags: respect tag parameter in listTemplates/listIsos commands
Conflicts:

	server/src/com/cloud/storage/dao/VMTemplateDao.java
	server/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
2012-07-06 16:59:14 -07:00
Alena Prokharchyk
7acf8585b1 Resource tags: 1) Remove tag records when correspdonding cloudStack object gets removed
2) added "tags" request parameter to the banch of list* Api commands (listVirtualMachines, listSnapshots - all commands are listed in the resource tags functional spec)

Conflicts:

	api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
	api/src/com/cloud/api/commands/ListPortForwardingRulesCmd.java
	api/src/com/cloud/api/commands/ListPublicIpAddressesCmd.java
	api/src/com/cloud/api/commands/ListSecurityGroupsCmd.java
	api/src/com/cloud/api/commands/ListSnapshotsCmd.java
	api/src/com/cloud/api/commands/ListVolumesCmd.java
	api/src/com/cloud/api/response/FirewallResponse.java
	api/src/com/cloud/api/response/IPAddressResponse.java
	api/src/com/cloud/api/response/VolumeResponse.java
	server/src/com/cloud/api/ApiDBUtils.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/network/NetworkManagerImpl.java
	server/src/com/cloud/network/dao/FirewallRulesDaoImpl.java
	server/src/com/cloud/network/security/dao/SecurityGroupDaoImpl.java
	server/src/com/cloud/server/ManagementServerImpl.java
	server/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
	server/src/com/cloud/vm/dao/UserVmDaoImpl.java
2012-07-06 11:43:31 -07:00
David Nalley
e87558256c Patch from Chip Childers
https://reviews.apache.org/r/5704/
License header updates for the server folder
2012-07-02 09:51:21 -04:00
Nitin Mehta
a4adc25295 bug CS-14945:
UploadVolume API is async now with the guidance for all the new apis added in 3.0.x need to be async. Though the success/failure wont be available through the queryAsync job which will report only the initial validation success or failure. The success or failure and the progress will all be available through listVolumes api.
2012-05-21 14:46:17 +05:30
Nitin Mehta
07cbec95fa bug CS-14957: Return hypervisor type for uploaded volume 2012-05-17 19:22:19 +05:30
Edison Su
bafc3f2a5a CS-14521
Remove CLVM, due to license issue
2012-05-15 15:13:15 -07:00
Nitin Mehta
acd55bac90 bug CS-14785: Allow attaching the volume for Uploaded volume. Also have transition fo delete volume. 2012-05-14 16:46:49 +05:30
Nitin Mehta
838d01754b bug CS-14785: Improvements to volumes sync so that it can recover from any error. Introduced new state UploadOp which signifies that the volume os on secondary and the status would be picked up from volume host ref table. 2012-05-11 11:42:42 +05:30