You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by wilderrodrigues <gi...@git.apache.org> on 2016/02/13 15:55:31 UTC
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
GitHub user wilderrodrigues opened a pull request:
https://github.com/apache/cloudstack/pull/1413
Fix unique mac address per rVPC router
This PR fixes an issue we faced yesterday in production with Redundant VPCs and Private Gateways.
In that case, we ended up with 2 interfaces - 1 per VPC router - having the same mac address. Also, both interfaces were up, which caused traffic issues.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ekholabs/cloudstack fix/4.8-unique_mac_address_per_rvpc_router
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1413.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 #1413
----
commit ca62a382fb1147262b51674c4e12833ea8cce2fc
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Date: 2016-02-13T11:59:20Z
Generate new mac address if router is redundant and nic profile exists
commit 145dda1978bc60f484befe1824774b0a04337979
Author: Wilder Rodrigues <wr...@schubergphilis.com>
Date: 2016-02-13T14:48:30Z
Put private gateway interface down on 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-184181722
@wilderrodrigues had a quick look. Why can't the gateway interface be up on the backup? Ip conflict? cause otherwise it seems no issue to me. Do the gateways use a vip?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-184191105
@DaanHoogland A private gw uses a single ip address so there's your issue :-)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-216517829
Well, the open version of it - PR 1483
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
RE: [GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique
mac address ...
Posted by Dean Close <de...@icloudhosting.com>.
Thank you, I'm going to raise a separate bug report about the issues I've found with RvR setups. If I work on a patch I'll fork from the master branch unless I hear otherwise.
Dean
-----Original Message-----
From: kiwiflyer [mailto:git@git.apache.org]
Sent: 05 April 2016 14:28
To: dev@cloudstack.apache.org
Subject: [GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-205804779
@dsclose - just FYI. As far as I'm aware, this PR has not been committed yet. @ustcweizhou has requested a new PR/rebase.
I just pulled these into our build tree last night, so I was going to start testing it as well.
---
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 infrastructure@apache.org or file a JIRA ticket with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-205804779
@dsclose - just FYI. As far as I'm aware, this PR has not been committed yet. @ustcweizhou has requested a new PR/rebase.
I just pulled these into our build tree last night, so I was going to start testing it as well.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by ustcweizhou <gi...@git.apache.org>.
Github user ustcweizhou commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-203884447
@wilderrodrigues will you create a new PR for this ? This PR is not merged.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by GabrielBrascher <gi...@git.apache.org>.
Github user GabrielBrascher commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1413#discussion_r55127619
--- Diff: server/src/com/cloud/network/element/VpcVirtualRouterElement.java ---
@@ -559,9 +559,16 @@ public boolean applyACLItemsToPrivateGw(final PrivateGateway gateway, final List
final DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId());
final NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO);
+ final Network privateNetwork = _networkModel.getNetwork(gateway.getNetworkId());
+
boolean result = true;
for (final DomainRouterVO domainRouterVO : routers) {
- result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
+ final NicProfile nicProfile = _networkModel.getNicProfile(domainRouterVO, privateNetwork.getId(), null);
+ if (nicProfile != null) {
+ result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
--- End diff --
@wilderrodrigues I think it might be more readable if changed to:
`return networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);`
Thanks.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by dsclose <gi...@git.apache.org>.
Github user dsclose commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-205716220
@wilderrodrigues @ustcweizhou Sorry to arrive late to the party but this appears to break/ignore some RvR functionality. 4 things in particular stand out:
1. All public interfaces should be down in both redundanant virtual routers. Non-public interfaces should be up. The master.py script will bring up public interfaces on master routers. I had been discussing this with @ustcweizhou on the Cloudstack mailing list, Wei had provided a solution based upon the check_is_up method of the CsIP class (in CsAddress.py) but the commit at 8bbea5eeb6598b213b78a324c184841dbba69280 in #1413 appears to contradict what we discussed.
2. Redundant virtual routers can have multiple public interfaces. Presumably, so can VPC routers - although I've not experimented with that. The source-NAT IP will be assigned to eth2 - as will any public IP on the same subnet. Public IPs on different subnets will be assigned to eth3, eth4, eth5 etc. with a new device being created for each separate subnet. The commit 11e61f7054234e17343e9a11948f1804d732ac6c in #1413 does not account for this.
3. Because of point 2, we know that a new interface will be created on an RvR when an IP on a new subnet is assigned to it. Because of point 1, we know that that interface will be down because the master.py script will not have run since it was created. Currently a failover must be induced before this interface will be brought up - I'm yet to address this issue because of point 4, next.
4. Currently static-NATs do not work on RvR setup when they are on a different subnet to the source-NAT IP. There are two reasons for this; one is missing iptables config allowing traffic across interfaces other than eth2. The second reason is that connmarks are being assigned to outbound traffic from eth0 (guest network) which are being used to match traffic to an interface in the IP rules. Traffic intended for a public network therefore gets routed out of the default gateway interface (eth2), breaking any static-NAT traffic on public IPs not assigned to eth2.
I'd like to contribute to points 3 and 4 but issue #1413 appears to have been marked as closed. To remedy these points I might need to overwrite code committed as part of this issue, so it seems best to start a conversation about it before rolling the sleeves up and getting stuck in.
Are these issues being considered else where?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-216560940
Thank you sir...
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-183729063
LGTM
Master router:

Backup router before master destroy:

Backup now master:

What works fine now (and was broken before):
- eth2 (private gw) is only UP on master (used to be both UP on master/backup)
- eth2 has unique mac addresses on each router (used to be the same)
- a crash of router brings up private gw on new master
Integration tests are running as we spreak.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by dsclose <gi...@git.apache.org>.
Github user dsclose commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-205831656
Thank you. I've raised CLOUDSTACK-9339 on Jira about the non-VPC RvR issues. As my company needs those issues solved in the short term I'll begin working on a fix from the 4.7 branch.
If that fix is later useful upstream then I shall create a PR. If I need to re-work things from a different branch then I'll be happy to do so subsequently
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-184246895
blwah
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-216517631
I'm about to start testing 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-184850454
Hi,
I fixed the issues mentioned in the commits descriptions and added more tests in order to cover them.
I'm running the tests and will add the results once they are done.
Cheers,
Wilder
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-205820963
@dsclose This bug exists as far back as 4.6 I believe, as that was when RvR for VPC was introduced. So you might want base your patch on 4.7 and then it can be pulled into later releases.
Gentlemen,
@wilderrodrigues @remibergsma @ustcweizhou @DaanHoogland @swill
How do you guys want to handle this. Should Dean base his PR on top of Wilders rebase, or are you guys going to collaborate on a solution?
- Si
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by GabrielBrascher <gi...@git.apache.org>.
Github user GabrielBrascher commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1413#discussion_r55127726
--- Diff: server/src/com/cloud/network/element/VpcVirtualRouterElement.java ---
@@ -559,9 +559,16 @@ public boolean applyACLItemsToPrivateGw(final PrivateGateway gateway, final List
final DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId());
final NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO);
+ final Network privateNetwork = _networkModel.getNetwork(gateway.getNetworkId());
+
boolean result = true;
for (final DomainRouterVO domainRouterVO : routers) {
- result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
+ final NicProfile nicProfile = _networkModel.getNicProfile(domainRouterVO, privateNetwork.getId(), null);
+ if (nicProfile != null) {
+ result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
--- End diff --
Sorry @wilderrodrigues, the "for" there makes sense to the result variable.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-183682371
I have done manual tests, but please do not merge it before I push the existing integrations tests that I'm improving now to cover those findings.
Cheers,
Wilder
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-183715170
Manual Tests:
* Master Router
```
root@r-23-VM:~# ip addr | grep eth3 | grep state | awk '{print $9;}'
UP
root@r-23-VM:~# ip addr | grep link/ether | awk '{print $2;}' | sed -n 4p
06:fd:7a:00:00:6e
root@r-23-VM:~#
```
* Backup Router
```
root@r-24-VM:~# ip addr | grep link/ether | awk '{print $2;}' | sed -n 4p
06:e6:12:00:00:6e
root@r-24-VM:~# ip addr | grep eth3 | grep state | awk '{print $9;}'
DOWN
root@r-24-VM:~#
```
* New integration test
```
[root@cs2 integration]# less /tmp//MarvinLogs/test_privategw_acl_99S5RY/results.txt
test_05_rvpc_privategw_check_interface (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_05_rvpc_privategw_check_interface | Status : SUCCESS ===
ok
----------------------------------------------------------------------
Ran 1 test in 905.904s
OK
/tmp//MarvinLogs/test_privategw_acl_99S5RY/results.txt (END)
```
I commented out the other 4 tests in the test_privategw_acl.py in order to get the new test running quicker.
Ping @remibergsma @bhaisaab @wido @runseb @DaanHoogland @borisroman @resmo @NuxRo
Please, run other integration tests in order to check agains this PR.
Cheers,
Wilder
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: Fix unique mac address per rVPC router
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-183966121
During the tests we found a couple of issues:
1. Default route was being set to private gateway interface after the master router went through a crash (or stop/start)
2. Once restarting the Old master router, it was going to backup mode (good) but the private gateway interface was set to UP (bad)
Manual Tests:
1. VPC created
2. Tier added
3. VM created
4. Pub IP acquired
5. ACL + rule created
6. PF created
7. SSH into machine and pigged google
* Interface and Route on Master
```
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 06:fb:e8:00:00:66 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.100/24 brd 10.0.3.255 scope global eth3
root@r-3-VM:~#
root@r-3-VM:~# ip route show
default via 192.168.23.1 dev eth1
10.0.1.0/26 dev eth2 proto kernel scope link src 10.0.1.16
10.0.3.0/24 dev eth3 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.55
192.168.23.0/24 dev eth1 proto kernel scope link src 192.168.23.53
root@r-3-VM:~#
```
Interface and Route on Backup
```
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 06:7d:6a:00:00:66 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.100/24 brd 10.0.3.255 scope global eth3
root@r-4-VM:~#
root@r-4-VM:~# ip route show
10.0.1.0/26 dev eth2 proto kernel scope link src 10.0.1.34
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.198
root@r-4-VM:~#
```
* Stop Master Router
* Interface and Route on (new) Master
```
5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 06:7d:6a:00:00:66 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.100/24 brd 10.0.3.255 scope global eth3
root@r-4-VM:~#
root@r-4-VM:~# ip route show
default via 192.168.23.1 dev eth1
10.0.1.0/26 dev eth2 proto kernel scope link src 10.0.1.34
10.0.3.0/24 dev eth3 proto kernel scope link src 10.0.3.100
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.1.198
192.168.23.0/24 dev eth1 proto kernel scope link src 192.168.23.53
root@r-4-VM:~#
```
* Restart the (old) Master router
* SSH into the VM and ping google again
```
sbpltk1zffh04:sbp_dev wrodrigues$ ssh root@192.168.23.54
root@192.168.23.54's password:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=47 time=13.045 ms
64 bytes from 8.8.8.8: seq=1 ttl=47 time=12.019 ms
64 bytes from 8.8.8.8: seq=2 ttl=47 time=11.299 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 11.299/12.121/13.045 ms
#
```
* Interface is DOWN on Backup router
```
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 06:fb:e8:00:00:66 brd ff:ff:ff:ff:ff:ff
inet 10.0.3.100/24 brd 10.0.3.255 scope global eth3
root@r-3-VM:~#
```
* Route on the backup router
```
root@r-3-VM:~# ip route show
10.0.1.0/26 dev eth2 proto kernel scope link src 10.0.1.16
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.3.56
root@r-3-VM:~#
```
* Routes working fine! SSH into the VM and pinged google again.
```sbpltk1zffh04:sbp_dev wrodrigues$ ssh root@192.168.23.54
root@192.168.23.54's password:
# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=47 time=19.080 ms
64 bytes from 8.8.8.8: seq=1 ttl=47 time=10.590 ms
64 bytes from 8.8.8.8: seq=2 ttl=47 time=13.668 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 10.590/14.446/19.080 ms
# exitConnection to 192.168.23.54 closed.
sbpltk1zffh04:sbp_dev wrodrigues$
```
I will update the integration test in order to cover the scenario above.
Cheers,
Wilder
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues closed the pull request at:
https://github.com/apache/cloudstack/pull/1413
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1413#discussion_r55236035
--- Diff: server/src/com/cloud/network/element/VpcVirtualRouterElement.java ---
@@ -559,9 +559,16 @@ public boolean applyACLItemsToPrivateGw(final PrivateGateway gateway, final List
final DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId());
final NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO);
+ final Network privateNetwork = _networkModel.getNetwork(gateway.getNetworkId());
+
boolean result = true;
for (final DomainRouterVO domainRouterVO : routers) {
- result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
+ final NicProfile nicProfile = _networkModel.getNicProfile(domainRouterVO, privateNetwork.getId(), null);
+ if (nicProfile != null) {
+ result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
--- End diff --
No worries, @GabrielBrascher
:)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-185635109
LGTM, based on the tests below. This runs in prod at SBP.
Test results:
```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced,required_hardware=true \
component/test_vpc_redundant.py \
component/test_routers_iptables_default_policy.py \
component/test_routers_network_ops.py \
component/test_vpc_router_nics.py \
smoke/test_loadbalance.py \
smoke/test_internal_lb.py \
smoke/test_ssvm.py \
smoke/test_network.py
```
Result:
```
Check the password file in the Router VM ... === TestName: test_isolate_network_password_server | Status : SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network ... === TestName: test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Status : SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network and check default routes ... === TestName: test_02_redundant_VPC_default_routes | Status : SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network ... === TestName: test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | Status : SUCCESS ===
ok
Create a redundant VPC with 1 Tier, 1 VM, 1 ACL, 1 PF and test Network GC Nics ... === TestName: test_04_rvpc_network_garbage_collector_nics | Status : SUCCESS ===
ok
Create a redundant VPC with 1 Tier, 1 VM, 1 ACL, 1 PF and test Network GC Nics ... === TestName: test_05_rvpc_multi_tiers | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policy on RouterVM ... === TestName: test_02_routervm_iptables_policies | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policies on VPC router ... === TestName: test_01_single_VPC_iptables_policies | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_01_isolate_network_FW_PF_default_routes_egress_true | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_02_isolate_network_FW_PF_default_routes_egress_false | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_03_RVR_Network_check_router_state | Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test nics after destroy ... === TestName: test_01_VPC_nics_after_destroy | Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test default routes ... === TestName: test_02_VPC_default_routes | Status : SUCCESS ===
ok
Check that the /etc/dhcphosts.txt doesn't contain duplicate IPs ... === TestName: test_router_dhcphosts | Status : SUCCESS ===
ok
Test to create Load balancing rule with source NAT ... === TestName: test_01_create_lb_rule_src_nat | Status : SUCCESS ===
ok
Test to create Load balancing rule with non source NAT ... === TestName: test_02_create_lb_rule_non_nat | Status : SUCCESS ===
ok
Test for assign & removing load balancing rule ... === TestName: test_assign_and_removal_lb | Status : SUCCESS ===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic to 3 vm's in a Single VPC ... === TestName: test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Status : SUCCESS ===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic to 3 vm's in a Redundant VPC ... === TestName: test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | Status : SUCCESS ===
ok
Test to verify access to loadbalancer haproxy admin stats page ... === TestName: test_03_vpc_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS ===
ok
Test to verify access to loadbalancer haproxy admin stats page ... === TestName: test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS ===
ok
Test SSVM Internals ... === TestName: test_03_ssvm_internals | Status : SUCCESS ===
ok
Test CPVM Internals ... === TestName: test_04_cpvm_internals | Status : SUCCESS ===
ok
Test stop SSVM ... === TestName: test_05_stop_ssvm | Status : SUCCESS ===
ok
Test stop CPVM ... === TestName: test_06_stop_cpvm | Status : SUCCESS ===
ok
Test reboot SSVM ... === TestName: test_07_reboot_ssvm | Status : SUCCESS ===
ok
Test reboot CPVM ... === TestName: test_08_reboot_cpvm | Status : SUCCESS ===
ok
Test destroy SSVM ... === TestName: test_09_destroy_ssvm | Status : SUCCESS ===
ok
Test destroy CPVM ... === TestName: test_10_destroy_cpvm | Status : SUCCESS ===
ok
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
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
test_05_rvpc_privategw_check_interface (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_05_rvpc_privategw_check_interface | Status : SUCCESS ===
ok
Test for port forwarding on source NAT ... === TestName: test_01_port_fwd_on_src_nat | Status : SUCCESS ===
ok
Test for port forwarding on non source NAT ... === TestName: test_02_port_fwd_on_non_src_nat | Status : SUCCESS ===
ok
Test for reboot router ... === TestName: test_reboot_router | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_1_static_nat_rule | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_2_nat_rule | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Status : SUCCESS ===
ok
----------------------------------------------------------------------
Ran 45 tests in 23064.950s
OK
```
And:
```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced,required_hardware=false \
smoke/test_routers.py \
smoke/test_network_acl.py \
smoke/test_privategw_acl.py \
smoke/test_reset_vm_on_reboot.py \
smoke/test_vm_life_cycle.py \
smoke/test_vpc_vpn.py \
smoke/test_service_offerings.py \
component/test_vpc_offerings.py \
component/test_vpc_routers.py
```
Result:
```
Test router internal advanced zone ... === TestName: test_02_router_internal_adv | Status : SUCCESS ===
ok
Test restart network ... === TestName: test_03_restart_network_cleanup | Status : SUCCESS ===
ok
Test router basic setup ... === TestName: test_05_router_basic | Status : SUCCESS ===
ok
Test router advanced setup ... === TestName: test_06_router_advanced | Status : SUCCESS ===
ok
Test stop router ... === TestName: test_07_stop_router | Status : SUCCESS ===
ok
Test start router ... === TestName: test_08_start_router | Status : SUCCESS ===
ok
Test reboot router ... === TestName: test_09_reboot_router | Status : SUCCESS ===
ok
Test reset virtual machine on reboot ... === TestName: test_01_reset_vm_on_reboot | Status : SUCCESS ===
ok
Test advanced zone virtual router ... === TestName: test_advZoneVirtualRouter | Status : SUCCESS ===
ok
Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : SUCCESS ===
ok
Test Multiple Deploy Virtual Machine ... === TestName: test_deploy_vm_multiple | Status : SUCCESS ===
ok
Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : SUCCESS ===
ok
Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : SUCCESS ===
ok
Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : SUCCESS ===
ok
Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status : SUCCESS ===
ok
Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status : SUCCESS ===
ok
Test migrate VM ... === TestName: test_08_migrate_vm | Status : SUCCESS ===
ok
Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm | Status : SUCCESS ===
ok
Test to create service offering ... === TestName: test_01_create_service_offering | Status : SUCCESS ===
ok
Test to update existing service offering ... === TestName: test_02_edit_service_offering | Status : SUCCESS ===
ok
Test to delete service offering ... === TestName: test_03_delete_service_offering | Status : SUCCESS ===
ok
Test for delete account ... === TestName: test_delete_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for admin account ... === TestName: test_public_ip_admin_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for user account ... === TestName: test_public_ip_user_account | Status : SUCCESS ===
ok
Test for release public IP address ... === TestName: test_releaseIP | Status : SUCCESS ===
ok
Test create VPC offering ... === TestName: test_01_create_vpc_offering | Status : SUCCESS ===
ok
Test VPC offering without load balancing service ... === TestName: test_03_vpc_off_without_lb | Status : SUCCESS ===
ok
Test VPC offering without static NAT service ... === TestName: test_04_vpc_off_without_static_nat | Status : SUCCESS ===
ok
Test VPC offering without port forwarding service ... === TestName: test_05_vpc_off_without_pf | Status : SUCCESS ===
ok
Test VPC offering with invalid services ... === TestName: test_06_vpc_off_invalid_services | Status : SUCCESS ===
ok
Test update VPC offering ... === TestName: test_07_update_vpc_off | Status : SUCCESS ===
ok
Test list VPC offering ... === TestName: test_08_list_vpc_off | Status : SUCCESS ===
ok
test_09_create_redundant_vpc_offering (integration.component.test_vpc_offerings.TestVPCOffering) ... === TestName: test_09_create_redundant_vpc_offering | Status : SUCCESS ===
ok
Test start/stop of router after addition of one guest network ... === TestName: test_01_start_stop_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test reboot of router after addition of one guest network ... === TestName: test_02_reboot_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test to change service offering of router after addition of one guest network ... === TestName: test_04_chg_srv_off_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test destroy of router after addition of one guest network ... === TestName: test_05_destroy_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test to stop and start router after creation of VPC ... === TestName: test_01_stop_start_router_after_creating_vpc | Status : SUCCESS ===
ok
Test to reboot the router after creating a VPC ... === TestName: test_02_reboot_router_after_creating_vpc | Status : SUCCESS ===
ok
Tests to change service offering of the Router after ... === TestName: test_04_change_service_offerring_vpc | Status : SUCCESS ===
ok
Test to destroy the router after creating a VPC ... === TestName: test_05_destroy_router_after_creating_vpc | Status : SUCCESS ===
ok
----------------------------------------------------------------------
Ran 41 tests in 7430.071s
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...
Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/1413#issuecomment-185052627
Hi,
I squashed a few commits that make sense to be squashed and amended all commit messages in order to add the CloudStack issue number. In addition, I removed a commit by @borisroman related to another fix. Why? That commit is not part of this fix and will follow in a separate PR.
Cheer,
Wilder
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---