[GitHub] [cloudstack] richardlawley commented on issue #3353: 4.11.2 HA VRs with Second Public NIC get different routes between Startup and Failover

2019-05-28 Thread GitBox
richardlawley commented on issue #3353: 4.11.2 HA VRs with Second Public NIC 
get different routes between Startup and Failover
URL: https://github.com/apache/cloudstack/issues/3353#issuecomment-496615072
 
 
   I've found some additional cases where routes aren't added properly, leading 
to two additional problems with static NAT VMs with multiple public subnets:
   
   1. VMs with static NAT IPs on range corresponding to eth3 cannot ping other 
IPs from another network on the same range
   2.  VMs cannot always ping each other using their external IP address.  This 
one I know has been fixed before, so this is either a regression or a missed 
test case.
   
   I traced the cause of these to be 
[here](https://github.com/apache/cloudstack/blob/master/systemvm/debian/opt/cloud/bin/cs/CsAddress.py#L522).
  The intention of the code is that it runs when the first IP address is added, 
however in practice this means it only runs when there is one IP assigned to 
the interface - if you start the VR with multiple IPs present then the route is 
added correctly.
   
   The route table of a "broken" router looks like this:
   
   ~~~
   # ip route show table Table_eth3
   default via X.X.X.X dev eth3 proto static 
   throw X.X.X.X/Y proto static 
   ~~~
   
   The fixed version is:
   
   ~~~
   # ip route show table Table_eth3
   default via X.X.X.X dev eth3 proto static 
   throw X.X.X.X/Y proto static 
   throw 10.1.1.0/24 proto static 
   throw 169.254.0.0/16 proto static
   ~~~
   
   My current working code is by changing the affected block to:
   
   ~~~
   if self.get_type() in ["public"]:
   route.set_route("table %s throw %s proto static" % 
(tableName, self.config.address().dbag['eth0'][0]['network']))
   route.set_route("table %s throw %s proto static" % 
(tableName, self.config.address().dbag['eth1'][0]['network']))
   ~~~
   
   Once we're done rolling this out, I'm happy to put together a PR, but I'm 
very aware that the VR code contains quite a few different scenarios, and I'm 
not yet familiar with how to write tests for this functionality.  


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [cloudstack] richardlawley commented on issue #3353: 4.11.2 HA VRs with Second Public NIC get different routes between Startup and Failover

2019-05-24 Thread GitBox
richardlawley commented on issue #3353: 4.11.2 HA VRs with Second Public NIC 
get different routes between Startup and Failover
URL: https://github.com/apache/cloudstack/issues/3353#issuecomment-495596096
 
 
   These routes also get restored when a new static NAT association is made.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services