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 [email protected]
[email protected]'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 [email protected]
[email protected]'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 [email protected] or file a JIRA ticket
with INFRA.
---