Bug 926998 - NAT is not working on OVS when l3 agent runs on same host as compute node
Summary: NAT is not working on OVS when l3 agent runs on same host as compute node
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-quantum
Version: 2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: beta
: 3.0
Assignee: RHOS Maint
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks: quantum_ovs_tracker
TreeView+ depends on / blocked
 
Reported: 2013-03-24 17:34 UTC by Ofer Blaut
Modified: 2020-01-03 14:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-06 19:48:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
iptables output (4.42 KB, text/plain)
2013-03-24 17:34 UTC, Ofer Blaut
no flags Details

Description Ofer Blaut 2013-03-24 17:34:04 UTC
Created attachment 715599 [details]
iptables output

Description of problem:

My setup include OVS and two hosts
host 1 : quanutm server + L3 agent + compute node
host 2 : DHCP +  compute node


Traffic is sent from VMs via L3 agent to the External router .

Traffic is sent but no NAT is performed 

There is connecticity to the external router

router ID is configured on the l3.ini file

attached iptables nat output 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.create setup above 
2.ping from VMs to internet 
3.pings between VMs works 
  
Actual results:


Expected results:


Additional info:

Comment 2 Gary Kotton 2013-04-02 11:58:56 UTC
The problem occurs only when the l3 agent is running on the same host as the compute node.

Comment 4 Bob Kukura 2013-04-09 18:28:29 UTC
In my testing, this problem applies to SNAT, preventing VMs from accessing IPs via the external network. I ran tcpdump on the host looking at the external network's interface, and saw that outgoing traffic originating from a local VM was not getting SNAT'ed - it had the VM's private network IP as the source address. Outgoing traffic from a remote VM was getting properly SNAT'ed. Also, DNAT (incoming connections to floating IPs) did seem to work correctly to both local and remote VMs.

Gary, can you write up "known issue" doc text for this issue?

Comment 6 Perry Myers 2013-05-20 16:44:25 UTC
garyk: Is this issue resolved with proper netns support or is this still an outstanding item for rhos-3.0?

Comment 7 Rami Vaknin 2013-06-07 22:47:05 UTC
Verified on grizzly running on rhel6.4 with openstack-quantum-2013.1.1-10.el6ost.

I've installed OpenStack Networking + OVS on 2 machines environment - one machine with compute node, the second one with compute node + l3 + dhcp + all services.

I've assigned a floating ip to the instace and managed to ping from the outside world to the instance and from the instance to the outside world.

Here are my iptables rules
==========================

$ iptables -t nat -L -nv
Chain PREROUTING (policy ACCEPT 85 packets, 9419 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   85  9419 quantum-openvswi-PREROUTING  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   85  9419 nova-api-PREROUTING  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain POSTROUTING (policy ACCEPT 81 packets, 6304 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   81  6304 quantum-openvswi-POSTROUTING  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 MASQUERADE  tcp  --  *      *       192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535 
    0     0 MASQUERADE  udp  --  *      *       192.168.122.0/24    !192.168.122.0/24    masq ports: 1024-65535 
    0     0 MASQUERADE  all  --  *      *       192.168.122.0/24    !192.168.122.0/24    
   81  6304 nova-api-POSTROUTING  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   81  6304 quantum-postrouting-bottom  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   81  6304 nova-postrouting-bottom  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 70 packets, 4200 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   70  4200 quantum-openvswi-OUTPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0           
   70  4200 nova-api-OUTPUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain nova-api-OUTPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain nova-api-POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain nova-api-PREROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain nova-api-float-snat (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain nova-api-snat (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   81  6304 nova-api-float-snat  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain nova-postrouting-bottom (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   81  6304 nova-api-snat  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain quantum-openvswi-OUTPUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain quantum-openvswi-POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain quantum-openvswi-PREROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain quantum-openvswi-float-snat (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain quantum-openvswi-snat (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   81  6304 quantum-openvswi-float-snat  all  --  *      *       0.0.0.0/0            0.0.0.0/0           

Chain quantum-postrouting-bottom (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   81  6304 quantum-openvswi-snat  all  --  *      *       0.0.0.0/0            0.0.0.0/0


Note You need to log in before you can comment on or make changes to this bug.