29434 Commits

Author SHA1 Message Date
Remi Bergsma
26936cdb2b Merge pull request #1242 from wido/fix-kvm-libvirt-test
test: Fix Libvirt test so that it works on WindowsThis test failed on Windows, using the File.separator it should run fine on Windows.

* pr/1242:
  test: Fix Libvirt test so that it works on Windows

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-19 17:54:44 +01:00
Remi Bergsma
f98f983583 Merge release branch 4.7 to master
* 4.7:
  ui: improve metrics view implementation
  CLOUDSTACK-9132: API createVolume takes empty string for name parameter
2016-01-19 17:48:25 +01:00
Remi Bergsma
c7ad1b6083 Merge pull request #1319 from nitin-maharana/CloudStack-Nitin15_4.7
CLOUDSTACK-9132: API createVolume takes empty string for name parameterSteps to Reproduce:
================

Create a volume using createVolume API where parameter name is empty.
It creates a volume with empty name.
But the name parameter is mandatory.(Issue)

Expected Behaviour:
================

It shouldn't create a volume with an empty name. Error should be returned.

Solution:
=======

Added a condition to check in case of empty string. If the name is an empty string, it generates a random name for the volume. Made the name field optional in UI as well as in API.

* pr/1319:
  CLOUDSTACK-9132: API createVolume takes empty string for name parameter

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-19 17:44:56 +01:00
Daan Hoogland
9e72796e96 CLOUDSTACK-9239 throw exception on deprecated command 2016-01-19 10:29:43 +01:00
Remi Bergsma
57a2a0beff Merge pull request #1347 from shapeblue/4.7-metrics-fixes
ui: improve metrics view implementation- Implement Search boxes in all Metrics views
- Fix threshold calculations for host and storage pool metrics view
- Consider overcommit ratios for calculation allocated thresholds
- Save/pass context while navigating across resources and metrics view

cc @remibergsma @DaanHoogland

![screen shot 2016-01-18 at 12 55 42 pm](https://cloud.githubusercontent.com/assets/95203/12390720/dfec51a0-bde2-11e5-8bdd-373f41a9c5d4.png)

![screen shot 2016-01-18 at 12 56 08 pm](https://cloud.githubusercontent.com/assets/95203/12390731/ee572cb0-bde2-11e5-8228-087cc506958e.png)

![screen shot 2016-01-18 at 12 55 55 pm](https://cloud.githubusercontent.com/assets/95203/12390732/ee58163e-bde2-11e5-9d78-befc6cd3f145.png)

* pr/1347:
  ui: improve metrics view implementation

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-18 16:32:48 +01:00
Remi Bergsma
fac259f0fb Merge release branch 4.7 to master
* 4.7:
  Fix execution counter to support separate counts per thread
  Add test to check that each thread has it's own execution counter
  CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
2016-01-18 16:00:29 +01:00
Remi Bergsma
f0fca60993 Merge pull request #1336 from nitin-maharana/CloudStack-Nitin19_4.7
CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failingEXPECTED BEHAVIOUR:
====================
Root Volume migration within cluster should work.

ACTUAL BEHAVIOUR:
==================
Root volume migration within cluster failed.

This situation arises when there are two management server accessing the same database.
When the migration request comes the command is forwarded from one management server to another because the host is owned by the second management server. So, serialisation of map from one to another fails.

Fix:
===
This is fixed by converting the maps to lists.

* pr/1336:
  CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-18 15:57:05 +01:00
Rohit Yadav
750c11b494 ui: improve metrics view implementation
- Implement Search boxes in all Metrics views
- Fix threshold calculations for host and storage pool metrics view
- Consider overcommit ratios for calculation allocated thresholds
- Save/pass context while navigating across resources and metrics view

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-18 12:50:57 +01:00
Remi Bergsma
1f1da0fa59 Merge pull request #1294 from miguelaferreira/nsx-execution-counter-per-thread
Implement a NSX API request execution counter per threadThe NSX plugin has a execution counter to prevent infinite recursion (and as a result a stack overflow exception). However, the thread safeness of this counter are not as desired. The counter was implemented with an AtomicInteger which make it safe for multiple threads to update and read it. The desired property would be to have a counter per thread.

This PR addresses that issue.

* pr/1294:
  Fix execution counter to support separate counts per thread
  Add test to check that each thread has it's own execution counter

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-18 12:41:21 +01:00
Remi Bergsma
00f106d878 Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9230: Remove unnecessary return statement from cloudStack.js
2016-01-18 12:40:13 +01:00
Remi Bergsma
c9922ea955 Merge pull request #1344 from DaanHoogland/master
resolving a conflict due to reformatting

* pr/1344:
  CLOUDSTACK-9154 - Sets the pub interface down when all guest nets are gone
  CLOUDSTACK-9187 - Makes code ready for more something like ethXXXX, if we ever get that far
  CLOUDSTACK-9188 -  Reads network GC interval and wait from configDao
  CLOUDSTACK-9187 - Fixes interface allocation to VRRP instances
  CLOUDSTACK-9187 - Adds test to cover multiple nics and nic removal
  CLOUDSTACK-9154 - Adds test to cover nics state after GC
  CLOUDSTACK-9154 - Returns the guest iterface that is marked as added

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-18 12:12:35 +01:00
Boris Schrijver
73c0242df3 Enhance VR performance by selectively executing tasks instead of brute-forcing 2016-01-18 11:40:59 +01:00
Miguel Ferreira
c35c4164d9 Fix execution counter to support separate counts per thread 2016-01-18 09:24:32 +01:00
Miguel Ferreira
21d2423709 Add test to check that each thread has it's own execution counter 2016-01-18 09:24:32 +01:00
Remi Bergsma
fa41bc769c Revert "Merge pull request #1228 from borisroman/CLOUDSTACK-9149"
This reverts commit c459dfe62c57c72ced99ddb0c7d8a9547a380305, reversing
changes made to 2afb739f0656d14e5c298bf469f797fff6da221b.
2016-01-17 22:06:50 +01:00
Remi Bergsma
24277e1d8e Merge pull request #1335 from nitin-maharana/CloudStack-Nitin18_4.7
CLOUDSTACK-9230: Remove unnecessary return statement from cloudStack.jsRemoved the unnecessary return statement.
The statement is never reached.

* pr/1335:
  CLOUDSTACK-9230: Remove unnecessary return statement from cloudStack.js

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 20:47:52 +01:00
Daan Hoogland
addb26455a Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9154 - Sets the pub interface down when all guest nets are gone
  CLOUDSTACK-9187 - Makes code ready for more something like ethXXXX, if we ever get that far
  CLOUDSTACK-9188 -  Reads network GC interval and wait from configDao
  CLOUDSTACK-9187 - Fixes interface allocation to VRRP instances
  CLOUDSTACK-9187 - Adds test to cover multiple nics and nic removal
  CLOUDSTACK-9154 - Adds test to cover nics state after GC
  CLOUDSTACK-9154 - Returns the guest iterface that is marked as added

 Conflicts:
	engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
2016-01-17 20:04:11 +01:00
Remi Bergsma
ff89587fd1 Merge pull request #1277 from ekholabs/fix/4.7-rvpc-net-gc-CLOUDSTACK-9154
[4.7] Critical VPCVR issues fixed: CLOUDSTACK-9154; CLOUDSTACK-9187; and CLOUDSTACK-9188This PR applies the same fixes as in the PR #1259, but against branch 4.7.

Please refer to PR #1259 for the tests results and all the comments already made there.

Issues fixed are:

* CLOUDSTACK-9154: rVPC doesn't recover from cleaning up of network garbage collector
* CLOUDSTACK-9187: rVPC routers in Master/Master due to concurrency problem when writing the keepalivd.conf
* CLOUDSTACK-9188: NetworkGarbageCollector is not using gc.interval and gc.wait from settings

Those changes have been covered by 2 new tests added to ```smoke/test_vpc_redundant.py```:

* test_04_rvpc_network_garbage_collector_nics
* test_05_rvpc_multi_tiers

The test ```test_04_rvpc_network_garbage_collector_nics``` depends on the global settings for the network.gc.interval and gc.wait. If one wants the test to run quicker, please change the settings (default is 600 seconds for each) and restart the Management Server before running the tests. I would suggest to set it to 60 seconds.

In addition, the NetworkGarbageCollector was redefining the settings above mentioned and not reading their values through ConfigDao. Due to that, the settings were not being applied properly and the test was waiting to long to check the VPC routers.

* pr/1277:
  CLOUDSTACK-9154 - Sets the pub interface down when all guest nets are gone
  CLOUDSTACK-9187 - Makes code ready for more something like ethXXXX, if we ever get that far
  CLOUDSTACK-9188 -  Reads network GC interval and wait from configDao
  CLOUDSTACK-9187 - Fixes interface allocation to VRRP instances
  CLOUDSTACK-9187 - Adds test to cover multiple nics and nic removal
  CLOUDSTACK-9154 - Adds test to cover nics state after GC
  CLOUDSTACK-9154 - Returns the guest iterface that is marked as added

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 19:12:43 +01:00
Remi Bergsma
262be758bc Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9240 remove 40GB filesize limit from SSVM scripts
2016-01-17 13:45:48 +01:00
Remi Bergsma
329c012b79 Merge pull request #994 from pritisarap12/snapshot-has-no-attribute-len
CLOUDSTACK-9001: Modifying snapshot results validation Currently snapshots results validation is based on length of snapshot result but if snapshot creation fails then None type object will not have "len" attribute hence modifying the validation.

* pr/994:
  CLOUDSTACK-9001: Modifying snapshot results validation in testpath_uuid_event testpath

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:40:31 +01:00
Remi Bergsma
a4d0af2133 Merge pull request #1000 from pritisarap12/CLOUDSTACK-9005-Modifying-tearDown-function
CLOUDSTACK-9005: Modifying tearDown functionModifying tearDown function to check if data volume is in detached state before deleting the volume

* pr/1000:
  CLOUDSTACK-9005: Modifying tearDown function

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:38:40 +01:00
Remi Bergsma
ad420bb1df Merge pull request #1041 from pritisarap12/CLOUDSTACK-9041-Modifying-template-creation-from-snapshot-function-in-base.py
CLOUDSTACK-9041: Modifying template creation from snapshot function In create_from_snapshot function of Template class there is no parameter to accept if the template is public hence default it is creating private templates
Hence adding this parameter.

* pr/1041:
  CLOUDSTACK-9041: Modifying template creation from snapshot function in base.py

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:37:03 +01:00
Remi Bergsma
7d4b3d4d80 Merge pull request #1343 from remibergsma/CLOUDSTACK-9240
CLOUDSTACK-9240 remove 40GB filesize limit from SSVM scriptsBoth createvolume.sh and createtmplt.sh have a 40GB hardcoded limit for the size of the template that gets created. I could not find any justification of that. I am just removing them as they caused us a huge headache when we tried to create bigger templates and they failed without any good error.

This closes #1223 (This PR was against master, made a new one against 4.7)

Thanks Syed <syed1.mushtaq@gmail.com>

* pr/1343:
  CLOUDSTACK-9240 remove 40GB filesize limit from SSVM scripts

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:31:27 +01:00
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
Remi Bergsma
fb658f575d Merge pull request #1226 from borisroman/CLOUDSTACK-9148
Removed .pydevproject from plugin kvm hypervisor.Ping @wido @wilderrodrigues @remibergsma @miguelaferreira

It's there for no apparent reason...

Running integration tests now.

```
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:12.189s
[INFO] Finished at: Sat Dec 12 02:13:01 CET 2015
[INFO] Final Memory: 102M/808M
[INFO] ------------------------------------------------------------------------
```

* pr/1226:
  Removed .pydevproject from plugin kvm hypervisor.

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:04:58 +01:00
Remi Bergsma
c459dfe62c Merge pull request #1228 from borisroman/CLOUDSTACK-9149
Removed cloud-cli folder and contents, as it is not maintained or used anymore.Remove legacy code.

Compiles ok:
```
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7:16.245s
[INFO] Finished at: Sat Dec 12 15:06:24 CET 2015
[INFO] Final Memory: 101M/821M
[INFO] ------------------------------------------------------------------------
```

Running integration tests now! Ping @wido @wilderrodrigues @remibergsma

* pr/1228:
  Removed cloud-cli folder and contents, as it is not maintained or used anymore.

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 13:02:02 +01:00
Remi Bergsma
2afb739f06 Merge pull request #1309 from wido/CLOUDSTACK-9210
CLOUDSTACK-9210: Pass secondary IPs to default_network_rules() functionThis is a mandatory argument but it was NOT passed which caused the
re-programming of security groups to fail.

Simple fix to just add the argument since the variable is available
there.

* pr/1309:
  CLOUDSTACK-9210: Pass secondary IPs to default_network_rules() function

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-17 12:56:10 +01:00
Remi Bergsma
1b8c464e6b Merge release branch 4.7 to master
* 4.7:
  Implement CheckHealthCommand for NSX controllers
  Fix log message that refers to agent, not host
  Prevent NullPointerException when host does not belong to a pod
2016-01-16 21:38:28 +01:00
Remi Bergsma
a767407fd2 Merge pull request #1293 from miguelaferreira/nsx-heath-check
Add Health Check Command to NSX pluginThe NSX plugin does not support the HeathCheckCommand. Instead it fakes a PingCommand as a call tot he control cluster status API.
However, we have seen in production that the management server will sometimes find the NSX controller to be behind on ping and that will trigger a HealthCheckCommand which will return with an unsupported command answer.
Once this happens the controller is put into Alert state and will not recover until the management sever is restarted.

In addition, during the investigation, there will be a null pointer exception due tot he fact that the NSX controllers do not live in a pod.

This PR tries to address those two issues.

* pr/1293:
  Implement CheckHealthCommand for NSX controllers
  Fix log message that refers to agent, not host
  Prevent NullPointerException when host does not belong to a pod

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 20:39:43 +01:00
Remi Bergsma
24818af23a Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9222 Prevent cloud.log.1 filling up the disk
  Add integration test for restartVPC with cleanup, and Private Gateway enabled.
  Nullpointer Exception in NicProfileHelperImpl
2016-01-16 20:25:29 +01:00
Remi Bergsma
4dabd1311c Merge pull request #1328 from borisroman/nullpointer_nicprofilehelperimpl
NicProfileHelperImpl NullpointerException when ipVO is nullWhen a VPC has a private gateway, and one would like to restart the VPC with **cleanup** it would fail.

This PR adds a NullPointer check and verifies it with an integration test.

```
test_01_vpc_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_01_vpc_privategw_acl | Status : SUCCESS ===
ok
test_02_vpc_privategw_static_routes (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_02_vpc_privategw_static_routes | Status : SUCCESS ===
ok
test_03_vpc_privategw_restart_vpc_cleanup (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_03_vpc_privategw_restart_vpc_cleanup | Status : SUCCESS ===
ok
test_04_rvpc_privategw_static_routes (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_04_rvpc_privategw_static_routes | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 4 tests in 2945.055s

OK
```

* pr/1328:
  Add integration test for restartVPC with cleanup, and Private Gateway enabled.
  Nullpointer Exception in NicProfileHelperImpl

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 20:15:52 +01:00
Remi Bergsma
c13c5540b0 Merge pull request #1329 from remibergsma/delay_compress_fix
CLOUDSTACK-9222 Prevent cloud.log.1 filling up the diskDelay Compress results in more space usage than needed. Since we have copy truncate we don't need it.

* pr/1329:
  CLOUDSTACK-9222 Prevent cloud.log.1 filling up the disk

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 20:13:49 +01:00
Remi Bergsma
75b68c6829 Merge release branch 4.7 to master
* 4.7:
  Fix unable to setup more than one Site2Site VPN Connection
  FIX S2S VPN rVPC: Check only redundant routers in state MASTER
  PEP8 of integration/smoke/test_vpc_vpn
  Add S2S VPN test for Redundant VPC
  Make integration/smoke/test_vpc_vpn Hypervisor independant
  FIX VPN: non-working ipsec commands
  [UI] MADNESS
  [DB] Add force_encap field to s2s_customer_gateway table
  [ROUTER] Add forceencaps field to python router ipsec config method
  [TEST] unittest needs rework
  [MARVIN] Add forceencap field to VpnCustomerGateway class in marvin base
  [CORE] Add Force UDP Encapsulation option to Site2Site VPN
  CLOUDSTACK-9186: Root admin cannot see VPC created by Domain admin user
  CLOUDSTACK-9192: UpdateVpnCustomerGateway is failing
  CLOUDSTACK-6485 prevent ip asignment of private gw iface
  CLOUDSTACK-9204 Do not error when staticroute is already gone
  make both check lines consistent
  CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh
  CLOUDSTACK-9202 Bump ssh timeout
2016-01-16 19:54:41 +01:00
Remi Bergsma
5fdc77e16c Merge pull request #1276 from michaelandersen/fix/site2sitevpn
[4.7] FIX Site2SiteVPN on redundant VPCThis PR:
- fixes the inability to setup more than one Site2Site VPN connection from a VPC
- fixes starting of Site2Site VPN on redundant VPC
- fixes Site2Site VPN state checking on redundant VPC
- improves the vpc_vpn test to allow multple hypervisors
- adds an integration test for Site2Site VPN on redundant VPC

Tested it on 4.7 single Xen server zone:

command:
```
nosetests --with-marvin --marvin-config=/data/shared/marvin/mct-zone1-xen1.cfg -a tags=advanced,required_hardware=true /tmp/test_vpc_vpn.py
```

results:
```
Test Site 2 Site VPN Across redundant VPCs ... === TestName: test_01_redundant_vpc_site2site_vpn | Status : SUCCESS ===
ok
Test Remote Access VPN in VPC ... === TestName: test_01_vpc_remote_access_vpn | Status : SUCCESS ===
ok
Test Site 2 Site VPN Across VPCs ... === TestName: test_01_vpc_site2site_vpn | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 3 tests in 1490.076s

OK
```

also performed numerous manual inspections of state of VPN connections and connectivity between VPC's

* pr/1276:
  Fix unable to setup more than one Site2Site VPN Connection
  FIX S2S VPN rVPC: Check only redundant routers in state MASTER
  PEP8 of integration/smoke/test_vpc_vpn
  Add S2S VPN test for Redundant VPC
  Make integration/smoke/test_vpc_vpn Hypervisor independant
  FIX VPN: non-working ipsec commands

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:51:46 +01:00
Remi Bergsma
450db8c6cd Merge pull request #1291 from remibergsma/bump-ssh-timeout
CLOUDSTACK-9202 Bump ssh timeout for VR commandsIt seems the VR needs more time for some of its commands. Until we figured out the root cause, this allows the VRs to start again.

Error seen:
```
2015-12-28 14:35:18,201 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) Timed out in waiting SSH execution result
2015-12-28 14:35:18,201 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) Command: com.cloud.agent.api.Command failed while starting virtua
l router
2015-12-28 14:35:18,201 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) The guru did not like the answers so stopping VM[DomainRouter|r-1534-VM]
.Answer":{"result":true,"wait":0}},{"com.cloud.agent.api.Answer":{"result":false,"details":"Timed out in waiting SSH execution result","wait":0}}] }
```

* pr/1291:
  CLOUDSTACK-9202 Bump ssh timeout

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:47:01 +01:00
Remi Bergsma
66a933afab Merge pull request #1296 from remibergsma/fix-checkrouter-script47
CLOUDSTACK-9181 Prevent syntax error in checkrouter.shAdded quotes to prevent syntax errors in weird situations.

Error seen in mgt server:
```
2015-12-15 14:30:32,371 DEBUG [c.c.a.m.AgentManagerImpl] (RedundantRouterStatusMonitor-7:ctx-0dd8ef3e) Details from executing class com.cloud.agent.api.CheckRouterCommand: Status: UNKNOWN
/opt/cloud/bin/checkrouter.sh: line 28: [: =: unary operator expected
/opt/cloud/bin/checkrouter.sh: line 31: [: =: unary operator expected
```
Cause:
```
root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
./checkrouter.sh: line 28: [: =: unary operator expected
./checkrouter.sh: line 31: [: =: unary operator expected
Status: UNKNOWN
```

Somehow a nic was missing.

After fix the script can handle this:

```
root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
Status: UNKNOWN
```

The other states are also reported fine:
```
root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
Status: MASTER
```

```
root@r-1192-VM:/opt/cloud/bin# ./checkrouter.sh
Status: BACKUP
```

While at it, I also removed the INTERFACES variable/constant as it was only used once and hardcoded the second time. Now both are hardcoded and easier to read.

* pr/1296:
  make both check lines consistent
  CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:46:06 +01:00
Remi Bergsma
b4ebfb640e Merge pull request #1298 from remibergsma/staticroute_delete_47
CLOUDSTACK-9204 Do not error when staticroute is already goneWhen deleting a static route fails because it isn't there any more (KeyError), it should succeed instead.

Error seen:
```
[INFO] Processing JSON file static_routes.json.1451560145
Traceback (most recent call last):
File "/opt/cloud/bin/update_config.py", line 140, in <module>
process_file()
File "/opt/cloud/bin/update_config.py", line 52, in process_file
qf.load(None)
File "/opt/cloud/bin/merge.py", line 258, in load
proc = updateDataBag(self)
File "/opt/cloud/bin/merge.py", line 91, in _init_
self.process()
File "/opt/cloud/bin/merge.py", line 131, in process
dbag = self.process_staticroutes(self.db.getDataBag())
File "/opt/cloud/bin/merge.py", line 179, in process_staticroutes
return cs_staticroutes.merge(dbag, self.qFile.data)
File "/opt/cloud/bin/cs_staticroutes.py", line 26, in merge
del dbag[key]
KeyError: u'192.168.0.3'
```

* pr/1298:
  CLOUDSTACK-9204 Do not error when staticroute is already gone

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:43:24 +01:00
Remi Bergsma
317c28a7e5 Merge pull request #1299 from remibergsma/CLOUDSTACK-6485
CLOUDSTACK-6485 prevent ip asignment of private gw ifacePrevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network. This was fixed in 4.4 by 1f209ff226a24979cf3a43ce0c02e05c84dd4dc2, reimplemented for 4.7

* pr/1299:
  CLOUDSTACK-6485 prevent ip asignment of private gw iface

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:42:17 +01:00
Remi Bergsma
146a6fd3ec Merge pull request #1300 from nitin-maharana/CloudStack-Nitin10_4.7
CLOUDSTACK-9192: UpdateVpnCustomerGateway is failingReproducible Steps:
================
1.Create a customer gateway for a VPC.
2.Edit it using UI(API call is UpdateVpnCustomerGateway).
3.When we try to update the customer vpn gateway with connection state is not in "Error", we see the API error but that won't be reflected to the user in UI.

Actual Behaviour:
==============
The API throws error. But UI doesn't show it to user.

Expected Behaviour:
================
The UI should show the error to user.

Fix:
===
TypeError: json.updatecustomergatewayresponse is undefined
The response name was wrong so corrected it.
It should be json.updatevpncustomergatewayresponse.
Added the error function.

* pr/1300:
  CLOUDSTACK-9192: UpdateVpnCustomerGateway is failing

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:41:04 +01:00
Remi Bergsma
1b5c64578f Merge pull request #1301 from nitin-maharana/CloudStack-Nitin3_4.7
CLOUDSTACK-9186: Root admin cannot see VPC created by Domain admin userIssue:
=====
Root admin cannot see LB rules and Public LB IP addresses created by domain-admin in UI therefore root admin cannot manage those.

Reproducible Steps:
================
Log in as a Domain-Admin account and create a VPC with vpc virtual router as public load balancer provider
click on the newly created VPC -> click on the VPC tier -> click internal LB
Add internal LB,
Logoff domain-admin and login as root admin
Navigate the VPC created previously and click internal LB, internal lb is not showing up.
Same steps for Public LB IP addresses except select the correct Network offering while creating a tier.

Expected Behaviour:
================
Root admin should be able to manage VPC created by Domain admin user .

Actual Behaviour:
==============
Root admin cannot see VPC created by Domain admin user and hence not able to manage it.

Fix:
===
Added the parameter listAll=true in case of Internal LB as well as Public LB IP addresses.

* pr/1301:
  CLOUDSTACK-9186: Root admin cannot see VPC created by Domain admin user

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:40:07 +01:00
Remi Bergsma
55667896d0 Merge pull request #1317 from michaelandersen/vpn/forceencap
[4.7] ADD Force UDP encapsulation option to Site2Site VPNThis PR adds the option to enable forced UDP encapsulation of ESP packets during a setup of a site2site vpn. This options enforces the 'forceencaps' option in the openswan ipsec config:
https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection

* pr/1317:
  [UI] MADNESS
  [DB] Add force_encap field to s2s_customer_gateway table
  [ROUTER] Add forceencaps field to python router ipsec config method
  [TEST] unittest needs rework
  [MARVIN] Add forceencap field to VpnCustomerGateway class in marvin base
  [CORE] Add Force UDP Encapsulation option to Site2Site VPN

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:38:42 +01:00
Remi Bergsma
f79b3e1c2a Merge pull request #1341 from wido/CLOUDSTACK-9238
CLOUDSTACK-9238: Increase URL fields to 2048 charachters from 255255 characters is to small for various URLs like S3 pre-signed URLs.

This causes one or more characters to be chopped of the end of the URL
and this renders them useless.

Internally in the code all URLs are passed as Strings and they are not
sized limited. This was purely in the database.

Other URL fields in the database were already 2048 characters.

This limit was introduced in the 4.1 to 4.2 upgrade when Object storage
like S3 and Swift was introduced in CloudStack for Secondary Storage.

* pr/1341:
  CLOUDSTACK-9238: Increase URL fields to 2048 charachters from 255

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-16 19:36:47 +01:00
Wido den Hollander
a171bbc96d CLOUDSTACK-9238: Increase URL fields to 2048 charachters from 255
255 characters is to small for various URLs like S3 pre-signed URLs.

This causes one or more characters to be chopped of the end of the URL
and this renders them useless.

Internally in the code all URLs are passed as Strings and they are not
sized limited. This was purely in the database.

Other URL fields in the database were already 2048 characters.

This limit was introduced in the 4.1 to 4.2 upgrade when Object storage
like S3 and Swift was introduced in CloudStack for Secondary Storage.
2016-01-14 14:06:04 +01:00
Nitin Kumar Maharana
49f78d18a8 CLOUDSTACK-9237: Create LB Healthcheck issues - button alignment and error message goes outside the window
Increased the size of width of dialog box.
Json response parsing was missing. Added it.
2016-01-14 15:23:01 +05:30
Nitin Kumar Maharana
3787f4d92b CLOUDSTACK-9236: Load Balancing Health Check button displayed when non-NetScaler offering is used
This button will be shown only when the load balancer is NetScaler.
Otherwise it is hidden.
2016-01-14 12:25:22 +05:30
Nitin Kumar Maharana
b02e9f0010 CLOUDSTACK-9235: Autoscale button is missing in VPC
In case of VPC, it checks the services available.
If LB is there, It checks the provider is Netscaler then it shows the button or hides it.
2016-01-14 12:04:13 +05:30
Nitin Kumar Maharana
40e3dfc617 CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
This situation arises when there are two management server accessing the same database.
When the migration request comes the command is forwarded from one management server to another because
the host is owned by the second management server. So, serialization of map from one to another fails.
This is fixed by converting the maps to lists.
2016-01-13 22:42:53 +05:30
Nitin Kumar Maharana
1c01b4ed8c CLOUDSTACK-9230: Remove unnecessary return statement from cloudStack.js
Removed the unnecessary return statement.
The statement is never reached.
2016-01-13 16:00:20 +05:30
Nitin Kumar Maharana
8e778151e1 CLOUDSTACK-9229: Autoscale policy creation failing in VPC due to zoneid missing in createAutoScaleVmProfile
Added a conditon to check whether the zoneid in networks is undefined,
If that is undefined, it gets the zoneid from ipaddresses argument.
Fixed a localization issue.
2016-01-13 15:47:06 +05:30
Michael Andersen
435a98cd3f Fix unable to setup more than one Site2Site VPN Connection 2016-01-12 11:24:35 +01:00