148 Commits

Author SHA1 Message Date
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +01:00
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Min Chen
ea634550fc CLOUDSTACK-8101: volume sync not working as expected - MS restart during upload volume leaves volume in hung state. 2014-12-19 15:51:52 -08:00
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Santhosh Edukulla
19ffc93e2e Fixed few coverity reported issues:Aug22 2014 2014-08-21 17:09:27 +05:30
Alex Huang
7f34282dfa Removed references to secondarystoragevmmanager from code that doesn't use it. 2014-02-05 01:39:15 +00:00
Alex Huang
be5e5cc641 All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
Wei Zhou
9be402cb06 CLOUDSTACK-2940: Allowing Replacement of realhostip.com with a customized domain for SSVM
(cherry picked from commit e23b10319f55fe8cbb822c0c29dc64b56509c119)

    Conflicts:

        plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
        server/src/com/cloud/storage/upload/UploadMonitorImpl.java
2013-11-26 15:01:23 +01:00
Alex Huang
d620df2bdd Reformatted all of the code. 2013-11-21 06:15:26 -08:00
Alex Huang
8d62744681 Reformat all source code. Added checkstyle to check the source code 2013-11-20 07:26:53 -08:00
Min Chen
9a62239a92 CLOUDSTACK-5017: Throw CloudRuntimeException in case of template/volume
download when ssvm is not ready so that caller can remove some leftover
entries in template_store_ref and volume_store_ref.
2013-11-04 12:32:05 -08:00
Min Chen
6eecb0b3b5 CLOUDSTACK-5017: If SSVM is unavailable DownloadCommands will be routed
to mgmt server.
2013-11-01 18:07:00 -07:00
Alex Huang
5495f10bce Revert "Reverting the range of commits that broke the build"
This reverts commit b59e3aaefced03d40d5b4b63c421c69743bcd387.
2013-08-08 15:02:40 -07:00
Prasanna Santhanam
b59e3aaefc Reverting the range of commits that broke the build
This reverts commits 30c33415..f6a2c817bc

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-08-08 14:46:56 +05:30
Alex Huang
942f282a6e Moved config into it's own package 2013-08-07 16:41:02 -07:00
Edison Su
4eefce15be CLOUDSTACK-3950: the issue can be reproduced by: copy iso failed during the first time, for some reason, then copy the same iso again, the issue be triggered. 2013-07-31 15:49:48 -07:00
Min Chen
0fb3286cb1 CLOUDSTACK-3513:[Automation] Failed to copy iso and template between
zones. Failed to pass generated copy url to DownloadCommand.
2013-07-22 16:17:56 -07:00
Min Chen
e1c17bd853 CLOUDSTACK-3513: add debug message to diagnose copyIso issue on
automation setup where DownloadCommand is never sent.
2013-07-18 16:08:29 -07:00
Edison Su
f41c800d88 merge to master 2013-06-14 19:06:33 -07:00
Nitin Mehta
e73aafc09a CLOUDSTACK-2940
Allowing Replacement of realhostip.com with a customized domain for SSVM. Though the config variable was there we were always hardcoding to realhostip.com
Reviewed-by: Abhi
2013-06-12 11:51:45 +05:30
Anthony Xu
354d259d55 volume size is virtual disk size not physical size, so uploaded volume should use virtual size 2013-05-29 15:37:13 -07:00
Min Chen
4611b515db Not passing format to VolumeDataStore due to removal of format column
from volume_store_ref.
2013-05-23 11:02:49 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Alex Huang
3047929367 Merged 2013-05-10 16:21:43 -07:00
Min Chen
fa11575212 Add store_role to template_store_ref, and add search function to find
template_store_ref entry based on DataStoreRole and ZoneId.
2013-05-08 22:06:07 -07:00
Sanjay Tripathi
e56d2a401c CLOUDSTACK-2188 : Parsing error with Download Monitor while checking the health of downloaded templates
Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
2013-05-06 15:11:49 +05:30
Min Chen
c60c373a38 Modify DownloadCommand to pass DataTO. 2013-05-02 23:05:19 -07:00
Edison Su
2384276536 make template download testable 2013-05-02 00:38:11 -07:00
Min Chen
36c1538f06 Bugfix to make deployDataCenter.py work. 2013-04-30 17:42:48 -07:00
Min Chen
471ad51080 Handle Volume type in DownloadCommand. 2013-04-26 16:34:23 -07:00
Min Chen
de27f0ff53 Clean up DownloadMonitor and TemplateManagerImpl. 2013-04-25 16:49:46 -07:00
Min Chen
792fc471a2 Remove VolumeHostDao references from codebase. 2013-04-24 11:11:58 -07:00
Edison Su
abf40435f3 refactor downloadlistener, sync system vm templates when adding a new image store 2013-04-21 22:46:02 -07:00
Min Chen
6f70fe28e8 Trigger system vm template download while adding image store. Just a
code skeleton, waiting for some code in EndPoint.
2013-04-19 19:37:06 -07:00
Min Chen
fe4f53bfcd Fix SecStorageSetupCommand for Nfs image store. 2013-04-17 17:16:01 -07:00
Min Chen
1b3994e180 Fix copyTemplateCmd. 2013-04-16 16:38:14 -07:00
Min Chen
593337565e Add S3 code to handle DownloadCommand for registerTemplate. 2013-04-15 14:44:39 -07:00
Min Chen
bb64672715 Refactor DownloadMonitorImpl code, move some functionalities to
TemplateServiceImpl and VolumeServiceImpl.
2013-04-11 18:09:42 -07:00
Min Chen
dcbeea057b Extract a common routine to associate template to zones in
template_zone_ref table.
2013-04-11 10:20:58 -07:00
Min Chen
02686583cf First draft of register template using image store. 2013-04-10 18:02:53 -07:00
Chiradeep Vittal
2e6c65fd34 QuickCloud: sanitize logs for normal running of agents outside systemvm 2013-04-09 14:45:27 -07:00
Chiradeep Vittal
c6e226da74 CLOUDSTACK-524: in some cases (especially the built-in CentOS template), the template downloader does not use the configured http proxy
The DownloadProgress command is used to restart failed or stuck download jobs -- and it would not include the proxy information, unlike the DownloadCommand which always did

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-04-08 17:29:54 -07:00
Chiradeep Vittal
67a99cbbc3 CLOUDSTACK-524: in some cases (especially the built-in CentOS template), the template downloader does not use the configured http proxy
The DownloadProgress command is used to restart failed or stuck download jobs --
It would not include the proxy information, unlike the DownloadCommand which always did

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
2013-04-08 17:07:35 -07: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
Sanjay Tripathi
10236bee26 CLOUDSTACK-1374 - When user uploads a volume using uploadVolume API command, only volume_host_ref table is getting updated with corresponding size of volume and "volumes" table, the size of volume still remains zero even ager the volume gets completely downloaded.
Signed-off-by: Nitin Mehta <nitin.mehta@citrix.com>
2013-02-26 10:51:25 +05:30
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
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