[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2016-01-12 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1276#issuecomment-170863132
  
ping @sanju1010 @wido @terbolous 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2016-01-11 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1276#issuecomment-170636254
  
ping @DaanHoogland 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2016-01-11 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1276#issuecomment-170543474
  
just ran the test again after adding the validateList method:

command:
```
osetests --with-marvin 
--marvin-config=/data/shared/marvin/mct-zone1-xen1.cfg -a 
tags=advanced,required_hardware=true test/integration/smoke/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 1567.984s

OK
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2016-01-11 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r49317967
  
--- Diff: test/integration/smoke/test_vpc_vpn.py ---
@@ -494,9 +526,411 @@ def create_natrule(self, vpc, vm, public_port, 
private_port, public_ip, network,
 vm.public_port = int(public_port)
 return nat_rule
 
+def _validate_vpc_offering(self, vpc_offering):
+
+self.logger.debug("Check if the VPC offering is created 
successfully?")
+vpc_offs = VpcOffering.list(
+self.apiclient,
+id=vpc_offering.id
+)
+self.assertEqual(
--- End diff --

@sanju1010 I implemented the validateList on both mentioned places


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2016-01-07 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r49099622
  
--- Diff: test/integration/smoke/test_vpc_vpn.py ---
@@ -494,9 +526,411 @@ def create_natrule(self, vpc, vm, public_port, 
private_port, public_ip, network,
 vm.public_port = int(public_port)
 return nat_rule
 
+def _validate_vpc_offering(self, vpc_offering):
+
+self.logger.debug("Check if the VPC offering is created 
successfully?")
+vpc_offs = VpcOffering.list(
+self.apiclient,
+id=vpc_offering.id
+)
+self.assertEqual(
+isinstance(vpc_offs, list),
+True,
+"List VPC offerings should return a valid list"
+)
+self.assertEqual(
+vpc_offering.name,
+vpc_offs[0].name,
+"Name of the VPC offering should match with listVPCOff data"
+)
+self.logger.debug(
+"VPC offering is created successfully - %s" %
+vpc_offering.name)
+return
+
+def _create_vpc_offering(self, offering_name):
+
+vpc_off = None
+if offering_name is not None:
+
+self.logger.debug("Creating VPC offering: %s", offering_name)
+vpc_off = VpcOffering.create(
+self.apiclient,
+self.services[offering_name]
+)
+
+self._validate_vpc_offering(vpc_off)
+self.cleanup.append(vpc_off)
+
+return vpc_off
+
 @attr(tags=["advanced"], required_hardware="true")
-def test_vpc_site2site_vpn(self):
-"""Test VPN in VPC"""
+def test_01_vpc_site2site_vpn(self):
+"""Test Site 2 Site VPN Across VPCs"""
+self.logger.debug("Starting test: test_01_vpc_site2site_vpn")
+# 0) Get the default network offering for VPC
+networkOffering = NetworkOffering.list(
+self.apiclient, 
name="DefaultIsolatedNetworkOfferingForVpcNetworks")
+self.assert_(networkOffering is not None and len(
+networkOffering) > 0, "No VPC based network offering")
+
+# Create and Enable VPC offering
+vpc_offering = self._create_vpc_offering('vpc_offering')
+self.assert_(vpc_offering is not None, "Failed to create VPC 
Offering")
+vpc_offering.update(self.apiclient, state='Enabled')
+
+vpc1 = None
+# Create VPC 1
+try:
+vpc1 = VPC.create(
+apiclient=self.apiclient,
+services=self.services["vpc"],
+networkDomain="vpc1.vpn",
+vpcofferingid=vpc_offering.id,
+zoneid=self.zone.id,
+account=self.account.name,
+domainid=self.domain.id
+)
+except Exception as e:
+self.fail(e)
+finally:
+self.assert_(vpc1 is not None, "VPC1 creation failed")
+
+self.logger.debug("VPC1 %s created" % vpc1.id)
+
+vpc2 = None
+# Create VPC 2
+try:
+vpc2 = VPC.create(
+apiclient=self.apiclient,
+services=self.services["vpc2"],
+networkDomain="vpc2.vpn",
+vpcofferingid=vpc_offering.id,
+zoneid=self.zone.id,
+account=self.account.name,
+domainid=self.account.domainid
+)
+except Exception as e:
+self.fail(e)
+finally:
+self.assert_(vpc2 is not None, "VPC2 creation failed")
+
+self.logger.debug("VPC2 %s created" % vpc2.id)
+
+default_acl = NetworkACLList.list(
+self.apiclient, name="default_allow")[0]
+
+ntwk1 = None
+# Create network in VPC 1
+try:
+ntwk1 = Network.create(
+apiclient=self.apiclient,
+services=self.services["network_1"],
+accountid=self.account.name,
+domainid=self.account.domainid,
+networkofferingid=networkOffering[0].id,
+zoneid=self.zone.id,
+vpcid=vpc1.id,
+aclid=default_acl.id
+)
+except Exception 

[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2015-12-23 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r48382355
  
--- Diff: test/integration/smoke/test_vpc_vpn.py ---
@@ -468,7 +500,7 @@ def get_ssh_client(self, virtual_machine, services, 
retries):
 
 return ssh_client
 
-def create_natrule(self, vpc, vm, public_port, private_port, 
public_ip, network, services=None):
+def _create_natrule(self, vpc, vm, public_port, private_port, 
public_ip, network, services=None):
--- End diff --

a matter of style i guess, i consistently changed private methods/non-tests 
to be prefixed with an underscore.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-23 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-166835953
  
Hi @sanju1010,  @wilderrodrigues asked me to extend the test_vpc_vpn script 
and in the proces i added the other hypervisors. 
https://github.com/apache/cloudstack/pull/1276
Could you review?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1276#issuecomment-166714201
  
As for:

> Is there a timing issue possible where both routers would be in the same 
state? If so, it might be good to > throw an exception before doing any 
operations (i.e. if the loop exits, and no routers were found to be MASTER).

A dual MASTER state should not be possible, but even if it occurred it 
would, in this context worst case,  trigger a vpn state check on both routers. 

>  I would suggest adding a test that turns one of the routers off, and 
then seeing if the VPN connection works correctly.

This makes sense and i will manually verify and if possible automate this 
tomorrow. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r48290122
  
--- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
@@ -916,6 +916,9 @@ protected void updateSite2SiteVpnConnectionState(final 
List rout
 }
 continue;
 }
+if (router.getIsRedundantRouter() && 
router.getRedundantState() != RedundantState.MASTER){
--- End diff --

ok @pdube so getConnectionsForRouter() returns vpn connections based on the 
vpcid of the router. As both the backup and master router have the same vpcid 
assigned it makes sense to first exclude backup routers and then to exclude 
non-running routers. 

I forced pushed the change. @pdube could you test?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r48288107
  
--- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
@@ -916,6 +916,9 @@ protected void updateSite2SiteVpnConnectionState(final 
List rout
 }
 continue;
 }
+if (router.getIsRedundantRouter() && 
router.getRedundantState() != RedundantState.MASTER){
--- End diff --

after some more thought: You could be right. if the BACKUP is not running 
and goes through the previous inspection  AND has a attached vpn connection 
will be marked as disconnected. 
need to investigate a bit to see what 
_s2sVpnMgr.getConnectionsForRouter(router) would return for a backup router.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1276#discussion_r48286045
  
--- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
@@ -916,6 +916,9 @@ protected void updateSite2SiteVpnConnectionState(final 
List rout
 }
 continue;
 }
+if (router.getIsRedundantRouter() && 
router.getRedundantState() != RedundantState.MASTER){
--- End diff --

Not per se, as the previous if statement skips the iteration if the router 
to be checked is not in a running state. And running state is required to do 
any further state checking. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/1276

FIX Site2SiteVPN on redundant VPC

This PR:

- 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

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack fix/site2sitevpn

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1276.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1276


commit a6753346fe3d0bcdedb437d01e7b0bb6a13b14bf
Author: Michael Andersen 
Date:   2015-12-21T15:25:41Z

FIX VPN: non-working ipsec commands

commit 17bedf79f6a830180ec87a549571c4cf434cd618
Author: Michael Andersen 
Date:   2015-12-21T18:07:26Z

FIX S2S VPN rVPC: Check only redundant routers in state MASTER

commit 87e5f357353107695b8b4677d24ae557184d8ef7
Author: Michael Andersen 
Date:   2015-12-22T10:16:23Z

Make integration/smoke/test_vpc_vpn Hypervisor independant

commit 39b71a4d735525416ed5b5cf72b8c6a32c036989
Author: Michael Andersen 
Date:   2015-12-22T11:00:55Z

Add S2S VPN test for Redundant VPC

commit f6364fce6834ea259cd36fdf55458e78eeb300c2
Author: Michael Andersen 
Date:   2015-12-22T11:29:44Z

PEP8 of integration/smoke/test_vpc_vpn




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
Github user michaelandersen closed the pull request at:

https://github.com/apache/cloudstack/pull/1275


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: FIX Site2SiteVPN on redundant VPC

2015-12-22 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/1275

FIX Site2SiteVPN on redundant VPC

This PR:

- 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 a 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

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack fix/site2sitevpn

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1275.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1275


commit a6753346fe3d0bcdedb437d01e7b0bb6a13b14bf
Author: Michael Andersen 
Date:   2015-12-21T15:25:41Z

FIX VPN: non-working ipsec commands

commit 17bedf79f6a830180ec87a549571c4cf434cd618
Author: Michael Andersen 
Date:   2015-12-21T18:07:26Z

FIX S2S VPN rVPC: Check only redundant routers in state MASTER

commit 87e5f357353107695b8b4677d24ae557184d8ef7
Author: Michael Andersen 
Date:   2015-12-22T10:16:23Z

Make integration/smoke/test_vpc_vpn Hypervisor independant

commit 39b71a4d735525416ed5b5cf72b8c6a32c036989
Author: Michael Andersen 
Date:   2015-12-22T11:00:55Z

Add S2S VPN test for Redundant VPC

commit f6364fce6834ea259cd36fdf55458e78eeb300c2
Author: Michael Andersen 
Date:   2015-12-22T11:29:44Z

PEP8 of integration/smoke/test_vpc_vpn




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-9123 - As a Developer I want t...

2015-12-10 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1204#issuecomment-163539898
  
Ran tests on Xenserver 6.2:

Results:
```
Test to verify access to loadbalancer haproxy admin stats page ... === 
TestName: test02_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS 
===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic 
to 3 vm's ... === TestName: test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 
| Status : SUCCESS ===
ok

--
Ran 2 tests in 1064.773s

OK

```
Environment:

```
1 XenServer 6.2
Management Server on CentOS 7.1
```

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

LGTM!
good work @wilderrodrigues 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-08 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-162837936
  
Gotcha. We could add templates for the other hypervisors (vmware and 
hyperv) from http://dl.openvm.eu/cloudstack/macchinina/x86_64/ 

And remove the default_hypervisor variable and replace it for a dynamic 
template selection based on the nosetests hypervisor parameter.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-07 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-162651522
  
So removed my last comment about field 7 to 6.  We need to choose 1 type of 
template os for both kvm and xen and base the test on that.   @sanju1010: the 
machininna was already in there and working for kvm at least.  would you mind 
making that template work?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-07 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-162545461
  
Hi Sanju,

Isn't it the point of the test to verify this exact connectivity?

But I any case I don't believe connectivity is the reason this test is
failing. I changed the -f option on line 711 back to field 7 and the test
passes now.

Please refactor that line and try again.

Best regards, Michael


On Monday, 7 December 2015, sanju1010  wrote:

> Hi Remi,
>
> As I mentioned in my PR the second test failure is related to connectivity
> issues between the vms part of s2s vpn. It is not because of my changes.
>
> Thanks,
> Sanjeev
> On Dec 7, 2015 7:48 PM, "Remi Bergsma"  > wrote:
>
> > Doesn't work for me either:
> >
> > Test Remote Access VPN in VPC ... === TestName:
> test_vpc_remote_access_vpn | Status : SUCCESS ===
> > ok
> > Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status :
> EXCEPTION ===
> > ERROR
> >
> > The original one works:
> >
> > Test Remote Access VPN in VPC ... === TestName:
> test_vpc_remote_access_vpn | Status : SUCCESS ===
> > ok
> > Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status :
> SUCCESS ===
> > ok
> >
> > --
> > Ran 2 tests in 1054.998s
> >
> > OK
> >
> > —
> > Reply to this email directly or view it on GitHub
> > <https://github.com/apache/cloudstack/pull/1156#issuecomment-162535442>.
> >
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/cloudstack/pull/1156#issuecomment-162539384>.
>


-- 
Michael Andersen



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-07 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-162522267
  
ping @sanju1010 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fixed issues with test_vpc_vpn script

2015-12-07 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1156#issuecomment-162520027
  
Just tested this on 4.6.1-SNAPSHOT with the command:
``` 
nosetests --with-marvin 
--marvin-config=/data/shared/marvin/mct-zone1-xen1.cfg -a 
tags=advanced,required_hardware=true /tmp/test_vpc_vpn.py
```
and it failed:
```
Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : 
EXCEPTION ===
ERROR

==
ERROR: Test VPN in VPC
--
Traceback (most recent call last):
  File "/tmp/test_vpc_vpn.py", line 712, in test_vpc_site2site_vpn
self.assert_(int(packet_loss) == 0, "Ping did not succeed")
ValueError: invalid literal for int() with base 10: 'received,'
 >> begin captured stdout << -
=== TestName: test_vpc_site2site_vpn | Status : EXCEPTION ===


- >> end captured stdout << --
```
I'm pretty sure this has to do with: 
https://github.com/sanju1010/cloudstack/blob/09409a7ac264e864c45146927b86229c8e67fbc8/test/integration/smoke/test_vpc_vpn.py/#L711




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1028#issuecomment-153604321
  
changed the required_hardware tag to true and rebased to master and 
retested:
nosetests --with-marvin --marvin-config=../../../mct-zone1-kvm1.cfg -a 
tags=advanced,required_hardware=true  test_vpc_vpn.py

Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS 
===
ok

--
Ran 2 tests in 1056.887s

OK

nosetests --with-marvin --marvin-config=../../../mct-zone1-kvm1.cfg -a 
tags=advanced,required_hardware=false  test_vpc_vpn.py

--
Ran 0 tests in 0.000s

OK



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
Github user michaelandersen commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1028#discussion_r43748177
  
--- Diff: test/integration/smoke/test_vpc_vpn.py ---
@@ -570,127 +584,139 @@ def test_vpc_site2site_vpn(self):
 finally:
 self.assertIsNotNone(ntwk2, "Network failed to create")
 
-self.logger.debug("Network %s created in VPC %s" %(ntwk2.id, 
vpc2.id))
+self.logger.debug("Network %s created in VPC %s" % (ntwk2.id, 
vpc2.id))
 
 # Deploy a vm in network 2
 try:
 vm1 = VirtualMachine.create(self.apiclient, 
services=self.services["virtual_machine"],
-templateid=self.template.id,
-zoneid=self.zone.id,
-accountid=self.account.name,
-domainid= self.account.domainid,
-serviceofferingid=self.service_offering.id,
-networkids=ntwk1.id,
-hypervisor=self.services["virtual_machine"]["hypervisor"]
-)
+templateid=self.template.id,
+zoneid=self.zone.id,
+accountid=self.account.name,
+domainid=self.account.domainid,
+
serviceofferingid=self.service_offering.id,
+networkids=ntwk1.id,
+hypervisor=self.services[
+
"virtual_machine"]["hypervisor"]
+)
 except Exception as e:
 self.fail(e)
 finally:
 self.assert_(vm1 is not None, "VM failed to deploy")
 self.assert_(vm1.state == 'Running', "VM is not running")
 
-self.logger.debug("VM %s deployed in VPC %s" %(vm1.id, vpc1.id))
+self.logger.debug("VM %s deployed in VPC %s" % (vm1.id, vpc1.id))
 
 # Deploy a vm in network 2
 try:
 vm2 = VirtualMachine.create(self.apiclient, 
services=self.services["virtual_machine"],
-templateid=self.template.id,
-zoneid=self.zone.id,
-accountid=self.account.name,
-domainid= self.account.domainid,
-serviceofferingid=self.service_offering.id,
-networkids=ntwk2.id,
-hypervisor=self.services["virtual_machine"]["hypervisor"]
-)
+templateid=self.template.id,
+zoneid=self.zone.id,
+accountid=self.account.name,
+domainid=self.account.domainid,
+
serviceofferingid=self.service_offering.id,
+networkids=ntwk2.id,
+hypervisor=self.services[
+
"virtual_machine"]["hypervisor"]
+)
 except Exception as e:
 self.fail(e)
 finally:
 self.assert_(vm2 is not None, "VM failed to deploy")
 self.assert_(vm2.state == 'Running', "VM is not running")
 
-self.debug("VM %s deployed in VPC %s" %(vm2.id, vpc2.id))
+self.debug("VM %s deployed in VPC %s" % (vm2.id, vpc2.id))
 
 # 4) Enable Site-to-Site VPN for VPC
 vpn1_response = Vpn.createVpnGateway(self.apiclient, vpc1.id)
-self.assert_(vpn1_response is not None, "Failed to enable VPN 
Gateway 1")
+self.assert_(
+vpn1_response is not None, "Failed to enable VPN Gateway 1")
 self.logger.debug("VPN gateway for VPC %s enabled" % vpc1.id)
 
 vpn2_response = Vpn.createVpnGateway(self.apiclient, vpc2.id)
-self.assert_(vpn2_response is not None, "Failed to enable VPN 
Gateway 2")
+self.assert_(
+vpn2_response is not None, "Failed to enable VPN Gateway 2")
 self.logger.debug("VPN gateway for VPC %s enabled" % vpc2.id)
 
 # 5) Add VPN Customer gateway info
 src_nat_list = PublicIPAddress.list(
-self.apiclient,
-  

[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1028#issuecomment-153338894
  
executed tests with: 
nosetests --with-marvin --marvin-config=./mct-zone1-kvm1.cfg -a 
tags=advanced  test_vpc_vpn.py



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1028#issuecomment-153338369
  
Tested change on a KVM hypervisor:

Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS 
===
ok

--
Ran 2 tests in 1084.378s

OK



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/1028#issuecomment-153338103
  
@sanjeevneelarapu please review once build checks are completed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_vpc_vpn: Add template wait & r...

2015-11-03 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/1028

smoke/test_vpc_vpn: Add template wait & refactor

- Added a wait for template download as the test was failing in some 
environments
- Removed debug timer in setup and teardown
- Increased time.sleep before ssh connection from 10 to 20 seconds


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack fix/vpc_vpn

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1028.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1028


commit d6ee8caf3e15727ce30405c02452dca90f8f8a99
Author: Michael Andersen 
Date:   2015-11-03T12:25:35Z

smoke/test_vpc_vpn: Add template wait & refactor




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: smoke/test_internal_lb.py: Fix template n...

2015-10-23 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/971#issuecomment-150571635
  
ran the following test:
```
nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=../../../mct-zone1-kvm1.cfg -a tags=advanced  
test_internal_lb.py
```

with results:
```
Test to verify access to loadbalancer haproxy admin stats page ... === 
TestName: test02_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS 
===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic 
to 3 vm's ... === TestName: test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 
| Status : SUCCESS ===
ok
--
Ran 2 tests in 1156.295s
OK
```




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix template not ready error

2015-10-23 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/971

Fix template not ready error

Add wait for template download
Refactored template section of services

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack 
fix/loadbalancer-test

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/971.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #971


commit b95c8200e20e7a2bec369b2ba8b8c4fbbc71b0ca
Author: Michael Andersen 
Date:   2015-10-23T13:22:48Z

Add wait for template download
Refactored template section of services




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-22 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-150173017
  
The exceptions:
error: [Errno 113] No route to host
error: [Errno 111] Connection refused
until 
===SSH to Host 192.168.23.12 port : 22 SUCCESSFUL===
basically show the state change of the VM to which the test is trying to 
connect to.
the exceptions can be ignored as the test is able to login and perform the 
assertion


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-21 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-150027934
  
thanks for testing @miguelaferreira and @wilderrodrigues for chasing this pr
haven't seen this type of report before but looking at the combination of:

which says no errors, failures, nor skipped
AND
the {returns: [u'0']}  as output of the ping, which is the packet loss 
percentage i would say this test succeeded.
 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-21 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149805301
  
yes @wilderrodrigues it is most likely an environment issue. don't wait on 
me for this PR. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706996
  
from the mgt server log:
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(709693495@qtp-265638379-0:ctx-dfba94e8 ctx-8090674b ctx-c8da340d) Received 
unknown parameters for command createNetworkACL. Unknown p
arameters : cidr
INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:ctx-8ec951c2 
job-1957) Add job-1957 into job monitoring
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(API-Job-Executor-5:ctx-8ec951c2 job-1957 ctx-173033b6) Received unknown 
parameters for command createNetworkACL. Unknown parameters :
 cidr
INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:ctx-8ec951c2 
job-1957) Remove job-1957 from job monitoring
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(709693495@qtp-265638379-0:ctx-f8a13dcf ctx-86f02aa9 ctx-57be2ff6) Received 
unknown parameters for command createNetworkOffering. Unkn
own parameters : usevpc
ERROR [c.c.a.ApiServer] (709693495@qtp-265638379-0:ctx-ac06c612 
ctx-aacaf035 ctx-2f37a8d5) unhandled exception executing api command: 
[Ljava.lang.String;@9976afa
java.lang.NullPointerException
at 
com.cloud.network.vpc.VpcManagerImpl.createVpcPrivateGateway(VpcManagerImpl.java:1610)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy148.createVpcPrivateGateway(Unknown Source)
at 
org.apache.cloudstack.api.command.admin.vpc.CreatePrivateGatewayCmd.create(CreatePrivateGatewayCmd.java:150)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706469
  
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP 
connection (1): cs2.cloud.lan
requests.packages.urllib3.connectionpool: DEBUG: "GET 
/client/api?physicalnetworkid=200&vpcid=f2839995-7ebb-49be-b466-ad1da9274c7d&sourcenatsupported=true&aclid=420b9956-1ce3-4a7e-ac12-03615dcb09a2&vlan=30&gateway=10.147.30.1&netmask

=255.255.255.0&apiKey=m5d8bqnS-qAVICCTlFiUHwPKd_dWXSOkKEnd8ur_UO-1Kcza8fD3a97OqDDB96NuElYmNY_4q4klE7sdpgJYWQ&command=createPrivateGateway&signature=uD9jjAKOWv%2B%2F3oRHIhWU3VBSW%2Bc%3D&ipaddress=10.147.30.200&response=json
 HTTP/1.1" 
530 83
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL): 
ERROR: Exception:['Traceback (most recent call last):\n', '  File 
"/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 306, 
in __parseAnd
GetResponse\nresponse_cls)\n', '  File 
"/Library/Python/2.7/site-packages/marvin/jsonHelper.py", line 151, in 
getResultObj\nraise cloudstackException.CloudstackAPIException(respname, 
errMsg)\n', 'CloudstackAPIException: Execu
te cmd: createprivategateway failed, due to: errorCode: 530, 
errorText:None\n']
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", 
line 306, in __parseAndGetResponse
response_cls)
  File "/Library/Python/2.7/site-packages/marvin/jsonHelper.py", line 151, 
in getResultObj
raise cloudstackException.CloudstackAPIException(respname, errMsg)
CloudstackAPIException: Execute cmd: createprivategateway failed, due to: 
errorCode: 530, errorText:None



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706192
  
@remibergsma @wilderrodrigues  LGTM'ed this one too soon, was a bit too 
enthusiastic. sorry about that.  Ran the test just now, but it's failing!

nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=../../../mct-zone1-kvm1.cfg -a 
tags=advanced,required_hardware=false  test_privategw_acl.py


=== Marvin Init Logging Successful===
Creating Admin Account for Domain ID ==> 
01634a5a-726d-11e5-9395-5254001daa62
Creating a VPC offering..
Enabling the VPC offering created
Creating a VPC network in the account: 
test-TestPrivateGwACL-test_privategw_acl-KZ68F5
cCreate NetworkOffering
Created and Enabled NetworkOffering
Adding Network={'netmask': '255.255.255.0', 'displaytext': 'Test Network', 
'name': 'NETWORK-10.1.1.1'}
Created network with ID: b8914c96-9a92-4bbb-8e6b-51b1ed74a803
===final results are now copied to: 
/tmp/marvin//MarvinLogs/test_privategw_acl_GYMPT8===




test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) 
... === TestName: test_privategw_acl | Status : FAILED ===
FAIL

==
FAIL: test_privategw_acl 
(integration.smoke.test_privategw_acl.TestPrivateGwACL)
--
Traceback (most recent call last):
  File 
"/Users/mandersen/Projects/cloudstack/test/integration/smoke/test_privategw_acl.py",
 line 199, in test_privategw_acl
self.createPvtGw()
  File 
"/Users/mandersen/Projects/cloudstack/test/integration/smoke/test_privategw_acl.py",
 line 275, in createPvtGw
self.fail("Failed to create Private Gateway ==> %s" % e)
AssertionError: Failed to create Private Gateway ==> Execute cmd: 
createprivategateway failed, due to: errorCode: 530, errorText:None
 >> begin captured stdout << -
=== TestName: test_privategw_acl | Status : FAILED ===




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149694171
  
@remibergsma: why another run?  Jenkins (and travis) is green


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149500308
  
LGTM!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8952 - The redundant routers a...

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/940#issuecomment-149317933
  
LGTM!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8952 - The redundant routers a...

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/940#issuecomment-149317876
  
 nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=../../../mct-zone1-kvm1.cfg -a tags=advanced  test_vpc_vpn.py

Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS 
===
ok

--
Ran 2 tests in 728.939s

OK



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8952 - The redundant routers a...

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/940#issuecomment-149314829
  
Test to verify access to loadbalancer haproxy admin stats page ... === 
TestName: test02_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS 
===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic 
to 3 vm's ... === TestName: test_01_internallb_roundrobin_1VR_2VM_TCP_port22 | 
Status : SUCCESS ===
ok

--
Ran 2 tests in 1026.033s

OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149238771
  
run with:
nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=/data/shared/marvin/mct-zone1-kvm1.cfg -a tags=advanced  
test/integration/smoke/test_vpc_vpn.py



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-19 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/952

Improve marvin test site2site VPN

Add optional fields: iprange and fordisplay to Marvin base.py class method 
Vpn.create
Add optional field: passive to Marvin base.py class method 
Vpn.createVpnConnection

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack test/site2sitevpn

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/952.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #952


commit 1cbb57265e1a437f524ec0c672d353e57e79a46d
Author: Michael Andersen 
Date:   2015-10-19T14:47:46Z

Improve marvin test site2site VPN

Add optional fields: iprange and fordisplay to Marvin base.py class method 
Vpn.create
Add optional field: passive to Marvin base.py class method 
Vpn.createVpnConnection




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-149192133
  
@remibergsma @wilderrodrigues  can you guys have a look when the build 
tests are finished?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-19 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-149190264
  
fixed the first test
=== Marvin Init Logging Successful===
Successfully created account: test-TestInternalLb-SG7Y3N, id:   
 d64ee2ea-25e2-4e55-88f4-32e645c04451
Starting test_01_internallb_roundrobin_2VM_port80
Created network offering: 97df748a-8c43-4bc8-80b8-28afee94b353
Enabled network offering: 97df748a-8c43-4bc8-80b8-28afee94b353
Created network offering: a3732c73-05f3-483e-8658-fe6c77e3092e
Enabled network offering: a3732c73-05f3-483e-8658-fe6c77e3092e
Created VPC d48602c9-d909-457e-aa67-a342b7c2ec36
Created network e83caad2-268d-4871-8bdf-53687159a7e7 in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Created network a36fc321-83db-4cf6-9b5a-0b857d190528 in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Deployed VM id: fb2b70ce-1586-4722-bfcf-69ff0984e02b in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Deployed VM id: c7aaa4cf-fcbb-4ca4-9421-4877db71b249 in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Deployed VM id: 5420d5d5-66a5-4364-ba86-401f826a9c08 in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Deployed VM id: ffeef080-180c-4b5b-9f22-148b4519c57c in VPC 
d48602c9-d909-457e-aa67-a342b7c2ec36
Associating public IP for network: guestnet_test01
Associated 192.168.23.5 with network e83caad2-268d-4871-8bdf-53687159a7e7
Associating public IP for network: intlb_test01
Associated 192.168.23.6 with network a36fc321-83db-4cf6-9b5a-0b857d190528
Creating NAT rule in network for vm with public IP
Adding NetworkACL rules to make NAT rule accessible
Creating NAT rule in network for vm with public IP
Adding NetworkACL rules to make NAT rule accessible
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2001 RetryCnt:8===
===SSH to Host 192.168.23.6 port : 2001 SUCCESSFUL===
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
Creating NAT rule in network for vm with public IP
Adding NetworkACL rules to make NAT rule accessible
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2002 RetryCnt:8===
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2002 RetryCnt:8===
===SSH to Host 192.168.23.6 port : 2002 SUCCESSFUL===
===SSH to Host 192.168.23.6 port : 2002 SUCCESSFUL===
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
Creating NAT rule in network for vm with public IP
Adding NetworkACL rules to make NAT rule accessible
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2003 RetryCnt:8===
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2003 RetryCnt:8===
Trying SSH Connection: Host:192.168.23.6 User:root  
 Port:2003 RetryCnt:8===
===SSH to Host 192.168.23.6 port : 2003 SUCCESSFUL===
===SSH to Host 192.168.23.6 port : 2003 SUCCESSFUL===
===SSH to Host 192.168.23.6 port : 2003 SUCCESSFUL===
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /sbin/ip addr show eth0 |grep 'inet '| cut -f6 -d' ' > 
/tmp/index.html via Host: 192.168.23.6} {returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
{Cmd: /usr/sbin/httpd -v -p 0.0.0.0:80 -h /tmp/ via Host: 192.168.23.6} 
{returns: []}
Created LB b14f9573-121a-4489-9f08-6423c80a5d35 in VPC
Assigning virtual machines to LB: b14f9573-121a-4489-9f08-6423c80a5d35
Trying SSH Connection: Host:192.168.23.5 User:root  
 Port:2000 RetryCnt:8===
Trying SSH Connection: Host:192.168.23.5 User:root  
 Port:2000 RetryCnt:8===
Trying SSH Connection: Host:192.168.23.5 User:root  
 Port:2000 RetryCnt:8===
Trying SSH Conn

[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-15 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-148341058
  
squashed!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-15 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-148340689
  
nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=/data/shared/marvin/mct-zone1-kvm1.cfg -a tags=advanced  
test/integration/smoke/test_internal_lb.py



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-15 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-148337473
  
there should be a rule:
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:8081


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-15 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-148337333
  
the admin stats test fails because of a iptables misconfiguration on the 
ILBVM:
=== Marvin Init Logging Successful===
Successfully created account: test-TestInternalLb-LBXE9K, id:   
 a8c1784b-2718-4d59-bf28-6e0f3c777fe0
Starting test_02_internallb_haproxy_stats_on_all_interfaces
Retrieving haproxy stats settings
{'username': u'admin1', 'password': u'AdMiN123', 'stats_uri': 
u'/admin?stats', 'visibility': u'global', 'stats_port': u'8081'}
Created network offering: 549a04f3-f73c-4a0c-abf4-57bc02325d12
Enabled network offering: 549a04f3-f73c-4a0c-abf4-57bc02325d12
Created VPC 2d6aa658-b46f-43f6-8fe1-bcef5993e5b9
Created network deee9fb5-435c-4046-b15f-fe6e8b6b13fe in VPC 
2d6aa658-b46f-43f6-8fe1-bcef5993e5b9
Deployed VM id: 4b034739-82e1-4440-8037-422cee07fd57 in VPC 
2d6aa658-b46f-43f6-8fe1-bcef5993e5b9
Associating public IP for network: intlb_test02
Associated 192.168.23.5 with network deee9fb5-435c-4046-b15f-fe6e8b6b13fe
Created LB 9e54d08b-fc14-49cb-aea3-19fae5de87b9 in VPC
Assigning virtual machines to LB: 9e54d08b-fc14-49cb-aea3-19fae5de87b9
Creating NAT rule in network for vm with public IP
Adding NetworkACL rules to make NAT rule accessible
nwacl_nat={'startport': u'22', 'endport': u'22', 'aclid': 
u'38299456-ef52-40db-a6b8-d619d9ab869f', 'fordisplay': True, 'cidrlist': 
u'0.0.0.0/0', 'tags': [], 'number': 1, 'traffictype': u'Ingress', 'state': 
u'Active', 'action': u'Allow', 'protocol': u'tcp', 'id': 
u'9d678e4c-d70f-4cd5-a91b-8fe89cc745ef'}
Trying SSH Connection: Host:192.168.23.5 User:root  
 Port:22 RetryCnt:4===
===SSH to Host 192.168.23.5 port : 22 SUCCESSFUL===
Trying to connect to the haproxy stats url http://10.1.2.95:8081/admin?stats


IP tables config on the internallbvm:

root@b-6-VM:~# iptables -L
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT all  --  anywhere anywhere state 
RELATED,ESTABLISHED
ACCEPT all  --  anywhere anywhere state 
RELATED,ESTABLISHED
ACCEPT icmp --  anywhere anywhere
ACCEPT all  --  anywhere anywhere
ACCEPT tcp  --  anywhere anywhere state NEW tcp 
dpt:3922
ACCEPT tcp  --  anywhere 10.1.2.95tcp dpt:90 
state NEW

Chain FORWARD (policy DROP)
target prot opt source   destination

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination
root@b-6-VM:~#



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-14 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/933

Refactored & Added Internal LB smoke test

Added 1VPC 2TIER internal lb roundrobin test
Added 1VPC 1TIER internal lb admin stats test
Refactored existing test
Thanks @wilderrodrigues for examples and advice!

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack 
fix/loadbalancer-test

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/933.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #933


commit 51bddebc05e6c76d1f3a89036d55e4103beb736c
Author: Michael Andersen 
Date:   2015-10-14T19:19:45Z

Added 1VPC 2TIER internal lb roundrobin test
Added 1VPC 1TIER internal lb admin stats test
Refactored existing test




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8725 RVR functionality is brok...

2015-08-26 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/692#issuecomment-134932710
  
verified that conntrackd starts on redundant vpc routers. 
LGTM in that respect.

Design wise i feel we need to refactor this, naming of copy_if_needed is 
ambiguous. 
Also we're running a lot of boilerplate code which can be replaced by more 
widely used and maintained python packages. 
 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Fix for missing defaultroute on VPC route...

2015-08-24 Thread michaelandersen
GitHub user michaelandersen opened a pull request:

https://github.com/apache/cloudstack/pull/738

Fix for missing defaultroute on VPC router 

https://issues.apache.org/jira/browse/CLOUDSTACK-8685

Refactored CsRoute and CsAddress to:
 - add methods to add and verify the defaultroute
 - renamed methods flush, add, and routeTable to flush_table, add_route, 
add_table respectively. 

Added some suboptimal unit tests to TestCsRoutes

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/michaelandersen/cloudstack 
vpc_defaultroute_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/738.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #738


commit bb93a61ee70de491ef52806785828e3903f53853
Author: Michael Andersen 
Date:   2015-08-24T09:59:35Z

pep8 cleanup

commit a9eb4ba5c90136176b5ec395f0444a489abc639e
Author: Michael Andersen 
Date:   2015-08-24T10:53:19Z

Fixed defaultroute on VPC routers in CsRoute and CsAddress
Refactored CsRoute




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---