571 Commits

Author SHA1 Message Date
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
9be70843fd removed unused static main in ConsoleProxyPasswordBasedEncryptor
This closes #11
This closes #10
This closes #176
2015-04-17 12:07:04 +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
Rohit Yadav
c8901a7990 utils: use a better extended implementation of SSLSocketFactory
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b4a5a32a7488ecd93f295670e7f641fc32198aa7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 17:32:07 +05:30
Nitin Mehta
765622658a Avoid distributing private key for realhostip.com
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d94a5720efbadb2e538dc68c45c88288486b68f6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 15:02:27 +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
Rajani Karuturi
92669e314e volume upload: modified parsing logic
vhd file download works fine. some open issues with parsing params
2015-01-29 16:55:28 +05:30
Rohit Yadav
0d74d7bdea use a preferable protocol that works on most infra
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit f5f6c2d1a74444bbbf5a5f4565953b6410b87a5c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapperImpl.java

(cherry picked from commit 1bab1d0855f8813a54028aa58715db75d9c06ca0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-29 16:03:29 +05:30
Rohit Yadav
607ac8f4f4 services, awsapi: use better string comparision
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d08369ad06b6d5ef801f79493c2aa4bdaeab1b83)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-22 18:10:23 +05:30
Rohit Yadav
664186f483 CLOUDSTACK-8160: use preferable protocols
(cherry picked from commit debfcdef788ce0d51be06db0ef10f6815f9b563b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-21 18:04:45 +05:30
Bharat Kumar
2a2d4364e1 made changes to move a file to the specified localtion
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-01-20 16:02:33 +05:30
Rajani Karuturi
a31e1bff33 volume upload: fixed build error from the commit b0a96c4c85f2d6dfe57ce3474ce95ebb3cec6d2a 2015-01-20 12:44:05 +05:30
Rajani Karuturi
b0a96c4c85 volume upload: fixed nio server blocking thread issue 2015-01-20 12:27:26 +05:30
Rajani Karuturi
15ae33a5b6 volume upload: refactored post upload command and used it during template registration 2015-01-20 09:24:14 +05:30
Rajani Karuturi
ad6b7b30cb Volume upload: sending the nfsstore url in the metadata
decoding the metadata and deserialising it on receiving it
2015-01-19 18:04:14 +05:30
Rajani Karuturi
ca0f9de6c7 volume upload: parsing post body to get all the params 2015-01-19 12:04:30 +05:30
Koushik Das
7900ae5d9f volume-upload: initializing state for volume and also setting the post url in volume_store_ref 2015-01-19 11:03:42 +05:30
Rajani Karuturi
c5be9d0b9b volume upload: removed debug messages in post request handler. 2015-01-17 04:23:44 +05:30
Rajani Karuturi
ef0c5d35cf volume upload: added post request parser to get the file content 2015-01-17 04:06:29 +05:30
Bharat Kumar
5e1bd634a4 Added changes to maintain and send the upload progress.
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-01-17 04:06:29 +05:30
Rajani Karuturi
1bf4058732 volume upload: removed the handlerFactory and the handler which were required by NioServer 2015-01-16 17:19:19 +05:30
Rajani Karuturi
ebaa4dd38e volume upload: added httpcomponents server and removed nio server
removing nio server as it is currently handling only https connections
and the parsing logic is also specific to agent communication.

current limitation of httpcomponents server is that the entire file is
read in memory. need figure out how to read it in chunks and send it
through a inputstreamreader to save on secondary storage.
2015-01-16 17:15:14 +05:30
Koushik Das
627f5a62dc volume upload: management server polling and upload status from agent
MS polling logic to query status for volumes that are uploaded
2015-01-14 10:19:12 +05:30
Daan Hoogland
9239f93a7d CID-1257434 try with resource 2015-01-12 20:37:21 +01:00
Likitha Shetty
bc235ed5eb CLOUDSTACK-5485. Cannot process more than 5 concurrent snapshots.
Number of threads on SSVM agent for connection with MS (Agent->NioClient) should be configurable using global config 'workers'.
2015-01-07 09:41:24 +05:30
Wei Zhou
84c44b6314 CLOUDSTACK-8140: CS fails to start after secstorage/consoleproxy.service.offering is set to uuid 2015-01-06 10:23:44 +01:00
Rajani Karuturi
42fdc343f5 volume upload: starting NIO server on SSVM 2015-01-06 11:07:10 +05:30
Sebastien Goasguen
cdc66c9e70 Small typo correction, exisits -> exists
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #57
2014-12-15 11:26:19 +05:30
Axel Delahaye
f73ad2e8b3 console-proxy add support of AltGr key and FR azerty keyboard
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-08 18:05:43 +05:30
Rohit Yadav
fac7bfc5d5 CLOUDSTACK-8011: Upgrade maven dependencies
Changes;
- Upgrades maven-war plugin to 4.5 (faster war packaging)
- Upgrade spring framework to latest minor release
- Upgrade ehcache, jasypt, httpclient, httpcore and other core dependencies
- Upgrade to latest ipv6 library, fix unit test NetUtilsTest
- httpcore and httpclient are sharing same version variable
- commons-httpclient is different that httpclient, the fix gives it a separate var
- Apidocs failed to generate and get stuck with new reflections version, for now
  we will continue using 0.9.8

Newer dependencies can be listed using:
mvn versions:display-dependency-updates -Dnoredist -Dsimulator -P developer,systemvm

Testing;
- Tested using Maven 3.2.1
- Local noredist build with unit tests succeeds
- CloudStack mgmt server started, basic business layer tests work
- Observed 10-15% build time improvement using new maven-war plugin

Branch: bugfix/4.5-8011 (commits are squashed in favour of a linear history)

Pull request:
https://github.com/apache/cloudstack/pull/50

This closes #50

TravisCI build summary:
https://travis-ci.org/shapeblue/cloudstack/builds/42902172

- Build passes with unit tests
- Apidocs generates successfully
- Most integration tests pass, some fail due to timeout errors, second re-run
  passes some of them

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-04 02:12:51 +05:30
Rajani Karuturi
b6c86bdb75 changed commons-io version to the latest stable 2.4
also updated version numbers in all the poms its used.
2014-11-28 17:01:16 +05:30
Rajani Karuturi
d2ef7295f9 volume upload: sending the preshared key to ssvm
sending the key to ssvm in the secondary storage setup command
saving it in a file on ssvm
2014-11-28 16:40:20 +05:30
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
Nitin Mehta
e87bb20d0c CLOUDSTACK-7916: Generate Alerts if System VMs cannot be started. 2014-11-14 13:35:40 -08:00
Nitin Mehta
3907bc6f9d CLOUDSTACK-7916: Generate Alerts if System VMs cannot be started. 2014-11-14 13:18:27 -08:00
Santhosh Edukulla
1aef5cba66 Fixed Coverity Issues 2014-11-03 16:45:30 +05:30
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Sheng Yang
57c4841403 CLOUDSTACK-7814: Fix default passphrase for keystores
In upgrade case, the db.properties file is not changed, but the following commit
would require passphrase for keystore in it, thus result in error(NPE in fact
due to there is no such properity).

commit 918c320438980f070150f872e3a3ba907572af83
Author: Upendra Moturi <upendra.moturi@sungard.com>
Date: Fri Jun 20 11:41:58 2014 +0530
CLOUDSTACK-6847.Link.java and console proxy files have hardcoded value

This commit fix it by put default value for passphrases, also set correct
passphrase if fail-safe keystore is used.
2014-10-28 16:25:52 -07:00
Anthony Xu
70112bd145 CLOUDSTACK-7761:
Revert "when system VM ping times out, stop system VM"

This reverts commit ee23be1942001ab732cfb3ad50fa24163cb88a48.
2014-10-21 17:19:57 -07:00