Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/773#issuecomment-137937224
LGTM Tested with two VPCs, each with a VM and created VPN between them.
Then destroyed one router, and stop/started one VM to trigger the recreation of
the VPC. That worked, and it came up with the correct nics:
```
root@r-7-VM:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP qlen 1000
link/ether 0e:00:a9:fe:00:05 brd ff:ff:ff:ff:ff:ff
inet 169.254.0.5/16 brd 169.254.255.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP qlen 1000
link/ether 06:7c:92:00:00:17 brd ff:ff:ff:ff:ff:ff
inet 192.168.23.23/24 brd 192.168.23.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP qlen 1000
link/ether 02:00:22:cf:00:03 brd ff:ff:ff:ff:ff:ff
inet 10.0.1.1/24 brd 10.0.1.255 scope global eth2
```
As a double check had a look at the VPN:
```
000 #2: "vpn-192.168.23.24/0x1":500 STATE_QUICK_I2 (sent QI2, IPsec SA
established); EVENT_SA_REPLACE in 2485s; newest IPSEC; eroute owner; isakmp#1;
idle; import:admin initiate
000 #2: "vpn-192.168.23.24/0x1" [email protected]
[email protected] [email protected] [email protected] ref=0
refhim=4294901761
000 #1: "vpn-192.168.23.24/0x1":500 STATE_MAIN_I4 (ISAKMP SA established);
EVENT_SA_REPLACE in 85228s; newest ISAKMP; lastdpd=-1s(seq in:0 out:0); idle;
import:admin initiate
```
Pings on their internal IPs from one VM to another across the two VPCs also
worked. The service was properly restored after a destroy and that was the main
goal. Well done @wilderrodrigues ! Also love the tests you wrote.
---
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.
---