106 Commits

Author SHA1 Message Date
Khosrow Moossavi
b6d420bec3 CLOUDSTACK-9677: Adding storage policy support for swift as secondary storage (#2412)
Original-Author: @pdube on PR Fixes #1830.
2018-04-26 00:42:15 +02:00
dahn
ed7811a9a2 CLOUDSTACK-10046 checksum validation for any java supported Digests-type (#2246)
* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264" didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5" didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* CLOUDSTACK-10046 digest helper for calculating checksums

* CLOUDSTACK-10046 cleanup unused checksum code

* CLOUDSTACK-10046 padding method proof of concept

* CLOUDSTACK-10046 only compare checksums if old value is valid

* Adding positive and negative tests for md5, sha-1 and sha-256, for xen, vmware and kvm hypervisors.
KVM Results:

 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 189, in test_02_1_create_template_with_checksum_sha1_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{sha-1}bf580a13f791d86acf3449a7b457a91a14389264" didn\'t match the given value, "{sha-1}someInvalidValue"\n']
=== TestName: test_02_1_create_template_with_checksum_sha1_negative | Status : SUCCESS ===
=== TestName: test_02_create_template_with_checksum_sha1 | Status : SUCCESS ===.
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 203, in test_03_1_create_template_with_checksum_sha256_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{SHA-256}efc03633f2b8f5db08acbcc5dc1be9028572dfd8f1c6c8ea663f0ef94b458c5" didn\'t match the given value, "{SHA-256}someInvalidValue"\n']
=== TestName: test_03_1_create_template_with_checksum_sha256_negative | Status : SUCCESS ===
=== TestName: test_03_create_template_with_checksum_sha256 | Status : SUCCESS ===
 Negative Test Passed - Exception Occurred Under template download ['Traceback (most recent call last):\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 217, in test_04_1_create_template_with_checksum_md5_negative\n    self.download(self.apiclient, template.id)\n', '  File "/Users/bstoyanov/Documents/sb2/cloudstack/test/integration/smoke/test_templates.py", line 260, in download\n    template.status)\n', 'Exception: Failed to download template: status - Failed post download script: checksum "{md5}ada77653dcf1e59495a9e1ac670ad95f" didn\'t match the given value, "{md5}someInvalidValue"\n']
=== TestName: test_04_1_create_template_with_checksum_md5_negative | Status : SUCCESS ===
=== TestName: test_04_create_template_with_checksum_md5 | Status : SUCCESS ===

* Adding additional test with no checksum added when registering template
Result:
test_05_create_template_with_no_checksum (integration.smoke.test_templates.TestCreateTemplateWithChecksum) ... === TestName: test_05_create_template_with_no_checksum | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 42.320s

OK

* Fixing negative tests exception handling

* Adding tests for ISO checksum validation and fixing a zero prefix failure test in templates

* CLOUDSTACK-10046 padding

* CLOUDSTACK-10046 usability additions

* yet another IDE artifact hindering checkstyle
2017-10-11 11:49:06 +02:00
Daan Hoogland
70ef0788c9 CLOUDSTACK-9408: Fix download urls in sql and scripts
This fixes the agreed upon url on download.cloudstack.org in various
sql files and misc scripts.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-20 12:33:33 +05:30
Remi Bergsma
69022f97c5 CLOUDSTACK-9240 remove 40GB filesize limit from SSVM scripts
Thanks Syed <syed1.mushtaq@gmail.com>
2016-01-17 13:26:43 +01:00
Wei Zhou
9221cb3e0d CLOUDSTACK-9101: resize root volume of stopped vm on KVM 2015-12-03 14:54:49 +01:00
Wei Zhou
92344c006d CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +02:00
Remi Bergsma
2f858a7d08 clean-ups in the file
- replace tabs with 4 spaces
- removed trailing spaces
- fixed indenting
- made if; then look the same
2015-08-11 14:55:16 +02:00
Remi Bergsma
ee9b644e28 this query had no -P port specified so did not work 2015-08-11 14:51:11 +02:00
Remi Bergsma
8a1e79f518 make sane defaults for MySQL settings
In dev environments, there is no /etc/cloudstack/management/db.properties file
That forces you to specify all parameters on the command line. This commit
sets some defaults, like port 3306, user root and localhost.

When available, it will still get settings from the config file and it will
also allow you to override it on the command line. So it is fully backwards
compatible.
2015-08-11 14:51:11 +02:00
Ilya Musayev
469d9ebed4 CLOUDSTACK-8624: Added the support for mysql db port and lowered the requiremnts for available disk capacity to 2.1GB VS original 5GB as it was too excessive. 2015-07-10 07:24:41 +05:30
miguelaferreira
e983246cd4 Set the url accordingly when installing a system vm template
The script that installs the system vm templates sets the uuid column
for the template being installed, however it does not set the respective
url column. This commit changes that.

Signed-off-by: Remi Bergsma <apache@remi.nl>

This closes #348
2015-06-02 16:00:15 +02:00
Anshul Gangwar
aa7ae1b918 CLOUDSTACK-8416: added support for FIPS compliant checksum. It will now support md5, sha1, sha224, sha256, sha384 and sha512 checksums.
In same checksum parameter user can pass any of the above algorithms hash
This closes #196
2015-04-30 14:38:44 +05:30
Funs
c27c69438b hypervisors: add OVM3 plugin that supports OVM 3.2.1/3.3.x
This is a plugin that puts in ovm3 support ranging from 3.3.1 to 3.3.2. Basic
functionality is in here, advanced networking etc..

Snapshots only work when a VM is stopped now due to the semantics of OVM's raw
image implementation (so snapshots should work on a storage level underneath the
hypervisor shrug)

This closes #113

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 11:33:42 +05:30
Marcus Sorensen
9bf2626e57 CLOUDSTACK-8263: KVM - use virsh instead of libvirt for resizing qcow2, as libvirt bindings are insufficient
Change-Id: I08246219cb1469a46dc6a9ec76a8c3a67b0b8bf6
2015-02-17 18:09:41 -08:00
Marcus Sorensen
ed8184a5b2 CLOUDSTACK-8263: KVM - notify qemu process of resized volume for libvirt-resized storage
Change-Id: Iddd8bb068855d3565075d3ecf7c6c0f074d00e1a
2015-02-17 14:25:55 -08:00
Rohit Yadav
518853ab43 packaging: updated hardcoded jasypt version to 1.9.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 43f39a1ec37de08e5b8e97dfd74a853c0aae76c7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-04 04:04:30 +05:30
Edison Su
0e3aebbb9d CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished
2014-11-19 15:53:06 -08:00
Rajesh Battala
67ff7dac82 CLOUDSTACK-7654 fixed issues with zip format templates. 2014-10-07 12:39:09 +05:30
Edison Su
f30fc6b673 need to check ccp-qemu-img 2014-08-12 15:13:42 -07:00
Daan Hoogland
c79ab570b0 Revert "CLOUDSTACK-6967: Initial OVM3 drop"
This reverts commit 8a485b9b59e4108e862022baf7477f768380b325.
2014-06-24 10:24:01 +02:00
Funs
8a485b9b59 CLOUDSTACK-6967: Initial OVM3 drop
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
(cherry picked from commit ed47763e2525a21fa4578d199492462d0fb1c7ef)

Conflicts:
	api/src/com/cloud/network/NetworkService.java
	api/src/org/apache/cloudstack/api/ApiConstants.java
	api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java
	engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java
	plugins/pom.xml
	server/src/com/cloud/network/NetworkServiceImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/test/com/cloud/vpc/MockNetworkManagerImpl.java
	ui/scripts/docs.js
2014-06-23 12:39:10 +02:00
Damodar Reddy
603eab751a CLOUDSTACK-6701, CLOUDSTACK-6702:
1. Integrate System Seed Template into MSI Installer
2. Added progress bar status messages for custom actions at needed places.

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2014-06-04 12:23:33 +05:30
Devdeep Singh
e59420c514 CLOUDSTACK-5691: Fix for attaching an uploaded volume to instance running
on hyperv. There were multiple issues here. Upload volume was actually
failing because the post download check for vhd on the cifs share was
unsuccessful. Also the agent code wasn't parsing the volume path correctly.
Fixed it too.
2014-01-03 16:55:28 +05:30
Rajesh Battala
bd639bf145 CLOUDSTACK-5520 CLOUDSTACK-5418 Script errors seen when trying to seed the 64 bit Xenserver templates. 2013-12-27 14:46:55 +05:30
Rajesh Battala
50c9377774 CLOUDSTACK-5312 added hyperv support in seeding the systemvm template script 2013-12-05 11:59:59 +05:30
Devdeep Singh
d14592fe93 Make sure only unit tests are run during build time and not functional tests.
Fixing rebase issues after integrating with wmi v2 implementation.
Removing the executable attribute from some files.
Remove the unused wmi v1 interface file.
Unit test for DestroyCommand implementation in hyperv agent.
Fixed VM state changes w.r.t wmi version 2 changes
If a VM is already running, deploy virtual machine shouldn't fail and throw an exception.
Don't run vhd-util on templates which are present on CIFS. Hyperv uses cifs as secondary storage
Add a SCSI controller by default. This is needed so that data volumes can be added/removed
on a running vm.
Remove the hard coded path in the agent code.
Rat fixes for hyper agent. Added the missing headers in files where it was missing.
2013-11-04 18:48:54 +05:30
Edison Su
4fb4593553 CLOUDSTACK-4618: fix CLVM 2013-09-25 16:29:16 -07:00
Dave Cahill
062eab8df4 Fix specifying db passwd in cloud-install-sys-tmplt
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2013-08-12 10:59:37 +02:00
Anthony Xu
76e79851a0 vhd-util check doesn't work for some corrupted vhd file, use vhd-util read instead 2013-07-17 15:01:01 -07:00
Rene Diepstraten
53e6a1c0fa Removed unused script scripts/storage/qcow2/cleanupmyvms.sh
Signed-off-by: Rene Diepstraten <mail@renediepstraten.nl>
2013-07-17 18:35:38 +02:00
Edison Su
bf32776f9f be able to upload template into swift 2013-07-16 18:07:06 -07:00
Edison Su
0c1ae20e77 add inital swift support
Conflicts:

	server/src/com/cloud/resource/ResourceManagerImpl.java
	server/test/com/cloud/resource/MockResourceManagerImpl.java
2013-07-13 02:07:03 -07:00
Edison Su
34f6538454 CLOUDSTACK-2970: wait is in seconds in command 2013-06-14 17:57:34 -07:00
Min Chen
18aeef3ef1 Merge branch 'master' (up to commit
c30d9be3cea30339cfff40c1002906634291b373) into object_store.
2013-06-12 11:20:32 -07:00
Anthony Xu
0b728f2e77 remove unused file 2013-05-29 13:51:22 -07:00
Edison Su
492127c035 fix kvm 2013-05-12 18:27:37 -07:00
Edison Su
5aeca646ae make create template from volume/snapshot work 2013-05-07 20:18:19 -07:00
Phong Nguyen
aa79ccf985 CLOUDSTACK-922: LXC Support in Cloudstack.
Signed-off-by: Edison Su <sudison@gmail.com>
2013-04-01 15:41:42 -07:00
Wido den Hollander
29baacd120 debian: Include jasypt in the cloudstack-common package
This is required for the cloud-install-sys-tmplt installer.

Signed-off-by: Wido den Hollander <wido@42on.com>
2013-03-31 14:16:31 +02:00
Marcus Sorensen
0ca85659a6 CLOUDSTACK-1651 - point agent scripts to correct logging location, due to move
of /var/log/cloud to /var/log/cloudstack

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1363112422 -0600
2013-03-12 12:20:22 -06:00
Wido den Hollander
e4b2fe42e0 CLOUDSTACK-1206: Change path from /etc/cloud to /etc/cloudstack
Reported-by: Pradeep Soundararajan <pradeep.soundararajan@citrix.com>
2013-02-08 10:50:48 +01:00
Marcus Sorensen
750fb2c31e Summary: Fix improper variable assignment in resizevolume.sh (remove $)
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360089640 -0700
2013-02-05 11:40:40 -07:00
Marcus Sorensen
8c5b82dfb4 Summary: several scripts are not mode executable
Detail: several scripts in the scripts directory weren't marked executable.
Normally this is handled/fixed in the packaging, but harder to deal with in
development environments, so marking them executable.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358446902 -0700
2013-01-17 11:21:42 -07:00
Marcus Sorensen
1ff7a147bd Revert "Summary: fix ipsectunnel.sh being called as ipsectunnel in KVM S2S vpn"
This reverts commit 1a2e69fb22a64b84960860965d4f757637ac5e12.
accidentally pushed mode change of sh file as well, need to split this out
2013-01-17 11:17:43 -07:00
Marcus Sorensen
1a2e69fb22 Summary: fix ipsectunnel.sh being called as ipsectunnel in KVM S2S vpn
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358446410 -0700
2013-01-17 11:13:30 -07:00
Marcus Sorensen
975021dda1 Summary: adding resizeVolume api call
Detail: This merges the resizevolume feature branch, which provides the
ability to migrate a disk between disk offerings, thereby changing its
size, or specifying a new size if current disk offering is custom.

BUG-ID: CLOUDSTACK-644
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358358209 -0700
2013-01-16 17:43:35 -07:00
Marcus Sorensen
7ce2227108 Summary: master - Copy qcow2 instead of converting if source and dest are qcow2
Detail: If source image is qcow2, and we want a qcow2 image, then doing a
convert strips off compression and any snapshots the user had in that image. If
a backing file exists, we stick with convert so we can pull in both the backing
file and the COW image, otherwise we just cp the qcow2 file. This is also faster

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354755241 -0700
2012-12-05 17:54:01 -07:00
Marcus Sorensen
a91df8f32d Summary: master - Fix typo in createvolume.sh
Detail: createvolume.sh had '$qemu-img' in one spot instead of '$qemu_img' as it
uses everywhere else

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1354754792 -0700
2012-12-05 17:46:32 -07:00
Edison Su
d068a40fe8 t-templateid-to-bypass-db-access-during-cloud-instal 2012-09-17 11:27:38 -07:00
Hiroaki Kawai
b3d4246a14 typo in cloud-install-sys-tmplt 2012-09-11 18:37:24 -07:00