191 Commits

Author SHA1 Message Date
nvazquez
64c6debf00 CLOUDSTACK-9252: Little refactor 2016-02-05 06:56:08 -08:00
nvazquez
3fb18bd494 CLOUDSTACK-9252: New refactor 2016-02-03 07:08:39 -08:00
nvazquez
cc50c20b4b CLOUDSTACK-9252: Remove static dependencies, refactor 2016-02-01 12:58:51 -08:00
nvazquez
76dc2705b7 CLOUDSTACK-9252: Remove duplicates getNfsVersion, refactor 2016-02-01 12:50:58 -08:00
nvazquez
e524f65570 CLOUDSTACK-9252: Support configurable nfs version 2016-02-01 12:50:58 -08:00
nvazquez
0bc1b2727a CLOUDSTACK-9252: Add nfs version to commands 2016-02-01 12:50:58 -08:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
Remi Bergsma
4ecfc29267 Merge release branch 4.6 to master
* 4.6:
  Use version for RC branch name instead of branch
  make sure all files are updates with new version
  Update L10N resource files with 4.6 strings from Transifex (20151129)
  Fix secondary storage not working with swift
  CLOUDSTACK-9083: Add disk serial to kvm virt xml
2015-11-30 22:30:52 +01:00
Syed
1e67a5d2c8 Fix secondary storage not working with swift 2015-11-27 13:48:18 -05:00
Daan Hoogland
329b3a5611 CID-1339965 handle retrun value on failure 2015-11-27 10:30:11 +01:00
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
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
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Remi Bergsma
b38c3bed0c Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-13 21:27:57 +01:00
Remi Bergsma
e31ade03c6 Updating pom.xml version numbers for release 4.6.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 15:45:34 +01:00
Rohit Yadav
8922707076 CLOUDSTACK-9019: Add storage network offering in ssvm only if storage network is defined
During creation of SSVM, checks and adds NetworkOffering.SystemStorageNetwork to
offerings only if storage network exists for the target datacenter

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-03 13:47:23 +05:30
Rajani Karuturi
1056171aca CLOUDSTACK-8808: Successfully registered VHD template is downloaded
again due to missing virtualsize property in template.properties

We have multiple file processors to process different types of image
formats. The processor interface has two methods getVirtualSize() and
process().

    1. getVirtualSize() as the name says, returns the virtual size of
the file and is used at get the size while copying files from NFS to s3
    2. process() returns FormatInfo struct which has fileType, size,
virutalSize, filename.  on successfully downloading a template, each
file is passed to all the processors.process() and whichever returns a
FormatInfo, that will be used to create template.properties file.  If
process() throws an InternalErrorException, template installation fails.
But, if process() returns null, template registration is successful with
template.properties missing some attributes like virtualSize, file
format etc. which results in this bug on restart of ssvm/cloud
service/management server.

failing the template download if virutalsize or some other properties
cannot be determined.

The following changes are done:
getVirtualSize() to always return size(if it can calculate, get virtual
size else return file size). This would mean the following changes

    1. QCOW2Processor.getVirtualSize() to return file size if virtual
size calculation fails
    2. VHDProcessor.getVirtualSize() to return file size if virtual size
calculation fails

process() to throw InternalErrorException if virtual size calculation
fails or any other exceptions occur. This would mean the following
changes

    1. OVAProcessor to throw InternalErrorException if untar fails
    2. QCOW2Processor to throw InternalErrorException if virtual size
calculation fails
    3. VHDProcessor to throw InternalErrorException if virtual size
calculation fails
2015-09-30 15:43:51 +05:30
Boris Schrijver
4a770fc63a Fixed Findbugs issue introduced by 1c6378ec0056e8c75990a4a0c15e99b2df162a75 PR #795. 2015-09-14 10:56:11 +02:00
Boris Schrijver
1971614e31 Added QCOW2 virtual size checking for S3.
- Cleaned up S3TemplateDownloader
- Created static QCOW2 utils class.
- Reformatted some parts of DownloadManagerImpl
2015-09-10 16:45:48 +02: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
Boris Schrijver
5db3371840 Refactored NicProfile.java for readability.
See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.
2015-08-17 14:12:10 +02:00
Wido den Hollander
9dbc99c608 CLOUDSTACK-8648: Pass the proper storage layer when configuring
Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
2015-07-26 10:25:06 -04:00
Wido den Hollander
554f5f9fbb CLOUDSTACK-8648: Do not configure the ImageFormat Processor when fetching filesize
It will throw an exception and that's needed.

Also, make the log show about which file we are talking about

Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
2015-07-26 10:25:05 -04:00
Koushik Das
9ec2a6c29c CLOUDSTACK-8623: CPVM fails to start after MS is restarted during its initial start-up process
If SSVM cannot be started then the existing entry is removed and a new SSVM gets created. Made similar changes for CPVM as well.
Also cleaned up some log messages in SSVM and CPVM manager code.
2015-07-14 10:55:19 +05:30
Daan Hoogland
bb2c02d144 coverity 1116693: properties template file creation unlikely but if repetitive, serious.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:24 +02:00
Koushik Das
d423df66cc CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Code cleanup, added helper method to get default system offering based on "system.vm.use.local.storage".
2015-05-19 21:32:14 +05:30
Koushik Das
3f7e31ed05 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Made system.vm.use.local.storage a zone level configuration.
2015-05-19 21:32:14 +05:30
Rohit Yadav
df3dea58a2 CLOUDSTACK-6139: Fix regression, allow zone level systemvm localstorage config
From b3f18e7d74a0f09db9977554a6c7648b7edbc33d, the zone level systemvm local
storage setting never worked as it needed to be moved to config depot.

(cherry picked from commit 279efb04324249a2e1a5487b58b40a723baf4600)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2015-05-01 15:27:40 +02:00
Rajani Karuturi
d39b993512 Fixed a few findbugs issues after the merge 0b83559
HttpUploadServerHandler.java:142, DM_BOXED_PRIMITIVE_FOR_PARSING
NfsSecondaryStorageResource.java:2630, DM_BOXED_PRIMITIVE_FOR_PARSING
NfsSecondaryStorageResource.java:2775, DM_DEFAULT_ENCODING
EncryptionUtil.java:59, DM_DEFAULT_ENCODING
2015-04-30 13:56:44 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Rajani Karuturi
75ae90b073 volume-upload: added account level secondary storage resource limit checks 2015-04-24 15:48:44 +05:30
Rajani Karuturi
0525e4763b volume-upload: refactored some error messages 2015-04-24 15:45:29 +05:30
Rajani Karuturi
a7e511c1a3 Added file exists check for onetime post url
also, fixed an issue where in the upload was going to error state in
case of parallel call to the same post url
2015-04-17 18:08:23 +05:30
Rajani Karuturi
ce823a3a26 Returning template/volume download percent in UploadStatusAnswer
Also updating the store ref entries on receiving the answer.
2015-04-09 15:38:58 +05:30
Rajani Karuturi
878b43bc64 volume-upload: removed hardcoded vhd for Image format check. 2015-03-30 17:56:59 +05:30
Rajani Karuturi
018023c1ef volume upload: added validation for file formats
merged TemplateUtils and ImageStoreUtil to a singe ImageStoreUtil
also added a unittest for ImageStoreUtil
2015-03-20 16:25:13 +05:30
Rajani Karuturi
d5dffb5dc9 volume upload: added md5 checksum validation
also fixed the issue wherein the successful uploads where also moving to
error state as the channelinactive is called after the end of successful
upload as well.
added a fileuploaded boolean to check when the channel is inactive.
2015-03-18 12:20:51 +05:30
Rajani Karuturi
6b8b4b92e6 handling tcp close event in netty server
while the file is in uploading state and connection is reset by peer,
volume upload request posted again shows the upload is IN_Progress
state. marking them as errored
2015-03-17 15:21:25 +05:30
Rajani Karuturi
3de5d9db5f volume upload: Restart of MS leads to loss of browser uploaded templates
on restart of management server, template sync runs. It checks for
templates in ssvm using the uniquename. If it doesnt find any, cleans
the directory. In case of uploaded templates, these are getting saved
using name instead on uniquename and hence template sync cant find them
and does cleanup. Using uniquename in template.properties now.
2015-03-16 12:45:24 +05:30
Rajani Karuturi
b16520bcec volume upload: added max size check for temaplte/volume post upload
used the existing configuration variables max.template.iso.size and
storage.max.volume.upload.size for templates and volumes respectively.
2015-03-03 17:27:40 +05:30
Rajani Karuturi
58f2fb1bb1 volume upload: post response http error code is 200 even for error case
Returned appropriate error code(bad request, internal server error, ok)
2015-02-17 12:31:38 +05:30
Rajani Karuturi
643165a07e volume upload: used netty server to do the file upload 2015-02-17 12:31:27 +05:30
Rajani Karuturi
01c41d09db volume upload: returning the install path and size in UploadStatusCommand 2015-02-17 11:28:32 +05:30
Rohit Yadav
1a6df6f978 CLOUDSTACK-7908: Add user_id column to vm_instance table
Design Document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Allow+VM+listing+by+User+ID

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:02:38 +05:30
Rohit Yadav
d5538fbe3b Publish secstorage failure, removed by a12ab8a2b3a14d2fed2bca287823bb558d0501fb
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 15:55:13 +05:30
Rajani Karuturi
7231daa71d volume upload: fixed the post body parsing logic
as long as the boundary is completely in the byte buffer it works.
2015-01-29 16:55:29 +05:30