28220 Commits

Author SHA1 Message Date
Devdeep Singh
adf6b588dd CLOUDSTACK-8687: Update prepare template api to seed/prepare a template
only on a given primary storage. Currently, the prepare template api
will seed/prepare a given template on all the primary storage pools in
a zone. If however, a user wishes to prepare a template only a
particular storage pool, it isn't possible. Updated the api to take
storage pool id as an optional parameter. If the pool id is provided
then the template is prepared only on the given primary storage pool
2015-08-19 10:04:05 +05:30
Remi Bergsma
3006b1614d Merge pull request #704 from resmo/feature/CLOUDSTACK-8740
CLOUDSTACK-8740: add custom.css to make custom UI styles easier

* pr/704:
  CLOUDSTACK-8740: add custom.css to make custom UI styles easier

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 17:57:11 +02:00
Remi Bergsma
4325574270 Merge pull request #703 from ksowmya/disablestorage_pep8
Disablestorage pep8CLOUDSTACK-8738: Added Maintenance mode related fixes into base.py for test_disablestoragepool.
Also fixed pep8 issues in script, most of them for E501 (long lines) with max-line-length set to default

Test Result:
Test Steps: ... === TestName: test_01_disable_enable_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_01_disable_enable_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE  storage pools found
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE wide storage pools found
Test Steps: ... === TestName: test_01_cross_cluster_attach_disk | Status : SUCCESS ===
ok

* pr/703:
  Fixed pep8 issues
  CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 16:37:02 +02:00
Remi Bergsma
29f9e1db49 Merge pull request #711 from radu-stefanache/radu-stefanache-patch-1
Typo correctionCannnot != Cannot

* pr/711:
  Typo correction

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 16:20:38 +02:00
Wido den Hollander
64a2cbdae6 Merge pull request #708 from radu-stefanache/master
Fixed typoSpotted this using Elasticsearch .

* pr/708:
  Typo correction

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-18 12:03:24 +02:00
Radu Stefanache
931e20c7f6 Typo correction
Cannnot != Cannot
2015-08-18 10:57:41 +01:00
Wido den Hollander
8a1d632273 Merge pull request #709 from borisroman/CLOUDSTACK-8742
Removed double encoding of Public Key from JS.See Cloudstack issue CLOUDSTACK-8742 & CLOUDSTACK-8649 for information.

* pr/709:
  Removed double encoding of Public Key from JS.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-18 11:43:36 +02:00
Boris Schrijver
f9e21da5dd Removed double encoding of Public Key from JS.
See Cloudstack issue CLOUDSTACK-8742 for information.
2015-08-17 22:56:17 +02:00
Wido den Hollander
bc51a42fc2 Merge pull request #705 from borisroman/CLOUDSTACK-8736
Refactored NicProfile.java for readability.Only changed names and reorganized them! No functional implementation change.

See issue CLOUDSTACK-8736 for ongoing effort to clean up network code.

* pr/705:
  Refactored NicProfile.java for readability.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-08-17 15:24:06 +02: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
Rene Moser
b1978a1169 CLOUDSTACK-8740: add custom.css to make custom UI styles easier 2015-08-17 14:10:08 +02:00
Remi Bergsma
9c7e81e748 Merge pull request #695 from karuturi/CLOUDSTACK-8669
CLOUDSTACK-8669: create volume failed due to null charsetAdded a new private method getCharSetFromConnection() which checks if
the connection charset is null and if it is null, returns
StringUtils.getPreferredCharset

regression caused by commit f03411ca0436c8b52f5e60b0c8820fd1d1ba2ff6

* pr/695:
  CLOUDSTACK-8669: create volume failed due to null charset
  CLOUDSTACK-8669: making StringUtils.getDefaultCharset protected

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 13:54:54 +02:00
Sowmya Krishnan
8bd1ca14ce Fixed pep8 issues 2015-08-17 16:57:33 +05:30
Sowmya Krishnan
2a0eaaebd3 CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool 2015-08-17 16:22:54 +05:30
Sowmya Krishnan
b407c526f7 Revert "CLOUDSTACK-8738 - Added two methods which were missed out earlier in base.py for Storage Pool maintenance"
This reverts commit 4223c519dd8c8a09eb577171a2e9075b01e6ede4.
2015-08-17 15:59:05 +05:30
Remi Bergsma
479733f9fe Merge pull request #701 from koushik-das/CLOUDSTACK-8737
CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes

Removed out-of-band VR reboot code

Refer to the discussion on dev list (http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201506.mbox/%3cAC13E3C1-3719-4B48-A35D-DBC4BA7041D0@schubergphilis.com%3e)

* pr/701:
  CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes Removed out-of-band VR reboot code

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 12:02:50 +02:00
Sowmya Krishnan
4223c519dd CLOUDSTACK-8738 - Added two methods which were missed out earlier in base.py for Storage Pool maintenance 2015-08-17 15:51:48 +05:30
Koushik Das
f2f29525ae CLOUDSTACK-8737: Remove out-of-band VR reboot code based on persistent VR configuration changes
Removed out-of-band VR reboot code
2015-08-17 14:49:32 +05:30
Remi Bergsma
caa524b01b Merge pull request #630 from manuiiit/pull-2
Fixed Coverity issue "Dereference null return value"Fixed Coverity issue "Dereference null return value"

* pr/630:
  Fixed Coverity issue "Dereference null return value"

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-17 08:38:38 +02:00
Rajani Karuturi
c180a6db03 CLOUDSTACK-8669: create volume failed due to null charset
Added a new private method getCharSetFromConnection() which checks if
the connection charset is null and if it is null, returns
StringUtils.getPreferredCharset

regression caused by commit f03411ca0436c8b52f5e60b0c8820fd1d1ba2ff6
2015-08-17 10:20:28 +05:30
Remi Bergsma
ca9d246876 Merge pull request #686 from milamberspace/MissingSomesL10N
[CLOUDSTACK-8427] Add missing localization for some labels in Web UI- on new functionnality: upload volume/template from Local
- on the zone configuration wizard for the "Next" button
- update French messages properties from transifex
- Improve some French translations ("Tlverser" for "Upload")

* pr/686:
  Add missing localization for some labels in Web UI - on new functionnality: upload volume/template from Local - on the zone configuration wizard for the "Next" button - update French messages properties from transifex - Improve some French translations ("Téléverser" for "Upload")

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 22:11:28 +02:00
manuiiit
3cc0fecccc Fixed Coverity issue "Dereference null return value" 2015-08-15 01:34:24 +05:30
Remi Bergsma
64ff67da55 Merge pull request #654 from DaanHoogland/CLOUDSTACK-8656
Cloudstack 8656: do away with more silently ignoring exceptions.a lot of messages added.
some restructuring for test exception assertions and try-with-resource blocks

* pr/654: (29 commits)
  CLOUDSTACK-8656: more logging instead of sysout
  CLOUDSTACK-8656: use catch block for validation
  CLOUDSTACK-8656: class in json specified not found
  CLOUDSTACK-8656: removed unused classes
  CLOUDSTACK-8656: restructure of tests
  CLOUDSTACK-8656: reorganise sychronized block
  CLOUDSTACK-8656: restructure tests to ensure exception throwing
  CLOUDSTACK-8656: validate the throwing of ServerApiException
  CLOUDSTACK-8656: logging ignored exceptions
  CLOUDSTACK-8656: try-w-r removes need for empty catch block
  CLOUDSTACK-8656: try-w-r instead of clunckey close-except
  CLOUDSTACK-8656: deal with empty SQLException catch block by try-w-r
  CLOUDSTACK-8656: unnecessary close construct removed
  CLOUDSTACK-8656: message about timed buffer logging
  CLOUDSTACK-8656: message about invalid number from store
  CLOUDSTACK-8656: move cli test tool to separate file
  CLOUDSTACK-8656: exception is the rule for some tests
  CLOUDSTACK-8656: network related exception logging
  CLOUDSTACK-8656: reporting ignored exceptions in server
  CLOUDSTACK-8656: log in case we are on a platform not supporting UTF8
  ...

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 21:38:49 +02:00
Daan Hoogland
b6f1d29e64 CLOUDSTACK-8656: more logging instead of sysout 2015-08-14 17:28:29 +02:00
Daan Hoogland
adcd0c0c0d CLOUDSTACK-8656: use catch block for validation 2015-08-14 17:25:04 +02:00
Daan Hoogland
384a2e9cee CLOUDSTACK-8656: class in json specified not found 2015-08-14 16:29:21 +02:00
Daan Hoogland
237f922ff7 CLOUDSTACK-8656: removed unused classes 2015-08-14 16:14:17 +02:00
Daan Hoogland
bb8facc37c CLOUDSTACK-8656: restructure of tests 2015-08-14 16:07:12 +02:00
Daan Hoogland
882de20e1c CLOUDSTACK-8656: reorganise sychronized block 2015-08-14 16:03:17 +02:00
Daan Hoogland
07bee3149c CLOUDSTACK-8656: restructure tests to ensure exception throwing 2015-08-14 15:43:54 +02:00
Daan Hoogland
2eee6aa999 CLOUDSTACK-8656: validate the throwing of ServerApiException 2015-08-14 15:13:39 +02:00
Daan Hoogland
de2d78b18b CLOUDSTACK-8656: logging ignored exceptions 2015-08-14 15:11:38 +02:00
Daan Hoogland
6f2f81c4ac CLOUDSTACK-8656: try-w-r removes need for empty catch block 2015-08-14 14:43:03 +02:00
Daan Hoogland
a923abf178 CLOUDSTACK-8656: try-w-r instead of clunckey close-except 2015-08-14 14:38:58 +02:00
Daan Hoogland
6c7ab8a5a5 CLOUDSTACK-8656: deal with empty SQLException catch block by try-w-r 2015-08-14 14:09:38 +02:00
Daan Hoogland
6227c44ca4 CLOUDSTACK-8656: unnecessary close construct removed 2015-08-14 13:59:59 +02:00
Daan Hoogland
08e6e1633c CLOUDSTACK-8656: message about timed buffer logging 2015-08-14 13:29:35 +02:00
Daan Hoogland
4213a22127 CLOUDSTACK-8656: message about invalid number from store 2015-08-14 13:21:46 +02:00
Daan Hoogland
3229d96015 CLOUDSTACK-8656: move cli test tool to separate file 2015-08-14 13:15:11 +02:00
Daan Hoogland
f203acc074 CLOUDSTACK-8656: exception is the rule for some tests 2015-08-14 13:07:48 +02:00
Remi Bergsma
05a29f01b4 Merge pull request #693 from remibergsma/s2svpn-fixes
Fix site-to-site VPN featureThis is work done together with @jayapalu on fixing the site2site VPN. The first part was done in PR #690 by @jayapalu. On top of that, some other fixes were needed and those are added in this PR. It made sense to make a new PR which includes all fixes so we can actually test it.

The original PR #690 is already merged into this one, so can be closed. Since the commit ids are kept the same, merging this will close both.

I closely compared the 4.4/4.5 implementation with the new 4.6 one. I did not only make it work, but also added some security improvements (some of which were also in 4.4/4.5). I noticed the pre shared key was being logged, so removed that as well.

This is how I tested and verified it:
https://github.com/schubergphilis/MCT-shared/tree/master/helper_scripts/cloudstack/vpn_tests
When I have some time available, I'll write a Marvin test for it that we can include in the repo.

It now works(tm) with one manual step due to CLOUDSTACK-8685:
We need a default gateway before site-to-site VPN will actually work. It will connect, but not forward packets. The reason for this, is due to the iptables setup. VM1 has router1 as gateway, but router1 does not know the route to VM2 so it will give up. With a default gateway, the packets are about to be forwarded to the default gateway but when they reach eth1 the public nic, iptables kicks in, does some magic and forwards it through the ipsec tunnel. So, you need a default gw set to upstream.

Workaround for now is setting the route manually:
``route add default gw 1.2.3.4``  or  ``ip route add default via 1.2.3.4``

In other words, we need to fix CLOUDSTACK-8685 soon, too.

Thanks to @snuf @jayapalu!

@jayapalu @snuf could you please review this?

* pr/693:
  do not log sensitive site-to-site VPN PSK
  tighten security of site-to-site VPN
  CLOUDSTACK-8730: fix s2s iptables rules and ipsec config
  CLOUDSTACK-8710: Fixed applying iptables rules for s2s vpn

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 13:05:53 +02:00
Remi Bergsma
0fcc7297e0 Merge pull request #680 from borisroman/CLOUDSTACK-8580
Interface changes related to CLOUDSTACK-8580See issue CLOUDSTACK-8580 and individual commits.

* pr/680:
  Made interface changes related to CLOUDSTACK-8580

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 11:47:36 +02:00
Boris Schrijver
655fcc924f Made interface changes related to CLOUDSTACK-8580
Added responses to ListCapabilities to reflect CLOUDSTACK-8580 changes.

This to add these options to the gui. See issue CLOUDSTACK-8580.

3be14e978a

Removed comments as proposed by Daan Hoogland.
2015-08-14 11:13:21 +02:00
Milamber
72e55029ef Improve debug message when the scheduler prepare to snapshot (volume 'id' and add volume name)
Signed-off-by: Milamber <milamber@apache.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #676

(cherry picked from commit 606afe341dce93b7efe88d0989029848947f25aa)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 14:12:46 +05:30
Rohit Yadav
f7778194f0 tools: fix build_asf.sh release script to remove -SNAPSHOT from bunch of files
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit cc63611cc24f67fcfa8d8cd13e9da445d9220c1e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 13:55:18 +05:30
Rohit Yadav
952a853392 CLOUDSTACK-8696: Port Rajani's regions fix to 451to452 sql upgrade path
Upgrade paths from 4.5.1 exists to both 4.5.2, and 4.6.0. Since 4.5.2 and 4.6.0
are not release, and the bug affects 4.5 branch; this patch aims to port that
fix from master to both 4.5/master branches.

Ported from commit b6a7804

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 13:16:58 +05:30
Remi Bergsma
7ddec661ca Merge pull request #690 from jayapalu/vpn
CLOUDSTACK-8710: Fixed applying iptables rules for s2s vpn
@remibergsma @wilderrodrigues
Moved applying iptables rules apply after vpn configuration so that vpn specific rules also get applied

* pr/690:
  CLOUDSTACK-8710: Fixed applying iptables rules for s2s vpn

This closes #690

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-14 09:11:21 +02:00
Remi Bergsma
4f8ab51f7f do not log sensitive site-to-site VPN PSK
Logging before:
2015-08-12 16:30:07,126 Searching for 192.168.23.6  and replacing with 192.168.23.6 192.168.23.5: PSK "preSharedKey"

Logging after:
2015-08-12 16:30:07,126 Searching for 192.168.23.6  and replacing with 192.168.23.6 192.168.23.5: PSK "****"
2015-08-14 09:07:25 +02:00
Remi Bergsma
9b97719c5c tighten security of site-to-site VPN
It was like this in 4.4 and 4.5
2015-08-14 09:05:59 +02:00
Remi Bergsma
382458317e CLOUDSTACK-8730: fix s2s iptables rules and ipsec config
For site2site VPN to work, we need a default gateway to be set.
See CLOUDSTACK-8685
2015-08-14 09:02:21 +02:00