178 Commits

Author SHA1 Message Date
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Edison Su
b30e39b0e3 CLOUDSTACK-1392: add create template from snapshot and volume 2013-04-22 13:24:10 -07:00
Pascal Borreli
20614598bf Fixed typos
Signed-off-by: Milamber <milamber@apache.org>
2013-04-13 13:28:32 +00:00
Sanjay Tripathi
18695276f7 CLOUDSTACK-1156: Limit Primary and Secondary storage for domain/accounts
Addition of two new resource types i.e. Primary and Secondary storage space in the existing pool of
    resource types.
    Added methods to set the limits on these resources using updateResourceLimit
    API command and to get a count using updateResourceCount. Also added calls in the
    Templates, Volumes, Snapshots life cycle to check these limits and to increment/decrement the new
    resource types

    Resource Name          :: Resource type number
        Primary Storage               10
        Secondary Storage             11

    Also added jUnit Tests for the same.
Reviewed by : nitin mehta<nitin.mehta@citrix.com>
2013-03-29 11:26:38 +05:30
Edison Su
409ec9c6b6 CLOUDSTACK-1426: We has strong implication that VO must implement an interface, otherwise EntityManagerImpl can't the vo 2013-03-07 18:25:57 -08:00
Deepti Dohare
4d573ddd1b CLOUDSTACK-357 ISOs can be deleted while still attached to a running VM, and they subsequently cannot be detached from a running VM
I made the changes to make sure that:
1. ISO will be deleted from the UI, but it is not deleted from the secondary storage as long as it is attached to a VM.
2. The storage cleanup thread will check whether the iso is attached to any vm, if not, it removes the ISO from the secondary storage.
3. Detach operation is now working which was failing before for the vms having attached iso(deleted).

Updated the patch for template sync during MS restart.

Manually tested the following:
setup: upload ISO1 and ISO 2
Attach ISO1 to VM1 and VM2
Attach ISO2 to VM3
set storage.cleanup.interval to 300

test cases:
1. delete ISO1 from UI, gets deleted
2. In VM Details of VM1 and VM2, can see detach ISO option
3. ISO1 exists in secondary storage
4. detach ISO1 from VM1, successful
5. ISO1 still exists in secondary storage.
6. Restart MS, template sync will not delete ISO1.
7. Detach ISO1 from VM2, successfull detached.
8. Wait for storage cleanup thread to execute, ISO1 gets deleted from Secondary storage.
9. Detach ISO2 from VM3
10.ISO2 exists in secondary storage, Delete ISO2 form UI, get deleted from secondary storage.
2013-02-25 16:02:25 +05:30
Edison Su
ec09e34f86 fix downloading template 2013-02-21 11:22:48 -08:00
Edison Su
a22403edcd squash changes into one giant patch 2013-02-21 11:22:48 -08:00
Kelven Yang
7b75f0d990 Sync master to javelin one more time 2013-02-01 11:37:33 -08:00
Murali Reddy
e7a554fc6a Merging events framework branch into master. This commit will bring
following changes

   - introduced notion of event bus with publish, subscribe, unsubscribe
     semantics

   - a plug-in can implement the EventBus abstraction to provide event
     bug to CloudStack

   - A rabbitMQ based plug-in that can interact with AMQP servers to
     provide message broker based event-bug

   - stream lines, action events, usage events, alerts publishing in to
     convineance classed which are also used to publish corresponding
     event on to event bus

   - introduced notion of state change event. On a state change, in the
     state machine corrsponding to the resource, a state change event is
     published on the event bug

   - associated a state machined with Snapshot and Network objects

   - Virtual Machine, Volume, Snaphost, Network object state changes wil
     result in a state change event
2013-02-01 01:37:24 +05:30
Kelven Yang
176523254e Improve component lifecycle management with system run-level concept 2013-01-30 15:21:02 -08:00
Kelven Yang
f57dcaa820 Loadable components to be in separted Spring component bundling 2013-01-11 15:33:15 -08:00
Alex Huang
56e5fbdee2 removed import of componentlocator and inject from all files 2013-01-10 11:44:47 -08:00
Alex Huang
f40e7b7511 removed componentlocator and inject 2013-01-10 11:05:20 -08:00
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
ed0637b8c2 api: Refactor move acl to org.apache.cloudstack
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 15:30:58 -08:00
Rohit Yadav
e17e68f0af server: Fix base template*cmd class imports and names
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 14:47:00 -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
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
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
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
add1b9b055 api_refactor: refactor register apis
- Split register apis across template, iso and ssh pkgs
- Fix refactored apis, mappings in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:54:19 -08:00
Rohit Yadav
3e0b2164be api_refactor: refactor template apis
- Fix refactored apis, fix mapping in commands*.in
- Fix comments etc.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:05:44 -08:00
Rohit Yadav
e0b4430070 api_refactor: refactor iso apis
- Fix refactored apis, fix mapping in commands*.in
- Fix comments etc.
- Note: copyIso uses copyTemplate, refactor copyTemplate

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2012-12-03 23:01:29 -08: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
Edison Su
73cc474157 add secondary storage provider 2012-09-02 19:26:20 -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
anthony
a32f675875 CS-14237 GC commands only sent to UP host
resolved fixed
2012-05-16 17:21:36 -07:00
frank
2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
prachi
93ff791497 Bug 13314 - acton-bet3:vmware/xen:fail to attach "VMware Tools Installer ISO" to instance
Changes:
- 'sameOwner' check cannot be used for ISO's
- So need to make two access checks: See if caller has access to VM and ISO and also check if the VM's owner has access to the ISO.
2012-01-26 16:02:52 -08:00
anthony
6297820981 bug 12830: propagate ISO to other zone on demand
status 12830: resolved fixed
2012-01-20 11:44:01 -08:00
Alena Prokharchyk
83400cd15f bug 12776: if there are multiple objects involved in resource creation, verify that they belong to the same account
status 12776: resolved fixed
2012-01-17 13:40:37 -08:00
Alena Prokharchyk
c581506103 bug 12306: list* command revamp 2012-01-09 10:07:42 -08:00
anthony
49608d8fdc SWIFT : fixed install path 2011-12-28 12:09:09 -08:00
anthony
1f7a811bac SWIFT : sync swift with secondary storage 2011-12-28 11:47:55 -08:00
anthony
6e259b2cb1 SWIFT : check swift in storage allocator 2011-12-23 15:45:29 -08:00
anthony
d462e14e01 SWIFT : remove template_zone_ref when delete template 2011-12-22 17:53:18 -08:00
anthony
646d95a846 bug 12364: fixed export template with swift
status 12364: resolved fixed
2011-12-21 16:07:06 -08:00
anthony
2d2505d449 bug 12322: SWIFT, update template_zone_ref after update template to swift
status 12322: resolved fixed
2011-12-21 11:20:38 -08:00
Nitin Mehta
b675a01741 bug 12113: DeployVm: when template download from Secondary to Primary storage fails try a couple of times first and then fail.
Reviewed by : Kishan.
2011-12-21 11:33:30 +05:30
anthony
1bde4520e1 SWIFT : export volume 2011-12-19 20:04:45 -08:00
anthony
a85864e160 SWIFT : do not sync template to swift if it is marked as destroyed in secondry stoarge 2011-12-16 21:28:39 -08:00
anthony
23f22259ed SWIFT: disable copy template in API level in Swift setup 2011-12-14 20:11:07 -08:00
anthony
fb0f77711f SWIFT: fixed delete template/iso 2011-12-14 19:53:56 -08:00
Nitin Mehta
3305498bd3 bug 12113: DeployVm: when template download from Secondary to Primary storage fails, we retry the number of hosts in that cluster. Instead try on 1 host on each retry attempt and shuddle the hosts for every attempt.
Reviewed by : Kishan.
2011-12-14 13:16:41 +05:30
Nitin Mehta
cdd94c1b9a bug 11811: Introduce a global config to disable extraction altogether for all users except root admin. Make changes so that volumes are based out of ISO. Take care of upgrade as well for this global config.
Reviewed by : Kishan.
2011-11-24 00:12:24 +05:30
Nitin Mehta
ec3a00a230 bug 10281: Template/ISO APIs should throw an exception in failure case for the events to be registered as failure.
Reviewed by : Kishan.

status 10281: resolved fixed
2011-11-21 18:58:06 +05:30