Public bug reported:

When adding network(subnet) into router immediately after creating
network(subnet), there is no metadata proxy process created in dhcp
namespace to listen on port 80. It causes problem when deleted
network(subnet) from router: it won't call metadata service successfully
until restarting dhcp service. Restarting dhcp service is just a
workaround and is not acceptable as solution.


This problem is introduced in Newton release. When adding network, it
will check whether the network has isolated ipv4 subnet. It queries all
ports belonging to the network, and see whether there is any port used
as gateway. if yes, then it thinks the subnet is not isolated. If we add
subnet to router immediately after creating subnet, the process of
network creation( creating metadata proxy) and the process of adding
subnet to interface happens at the same time. The seconds process
creates port as gateway quickly and then the first process checks and
treats it no isolated, and then will kill metadata proxy created soon
earlier.

# /etc/neutron/dhcp_agent.ini
enable_isolated_metadata = True
enable_metadata_network = True

#execute the following commands in batch without interruption.
neutron net-create network_1
neutron subnet-create --name subnet_1 network_1 172.60.0.0/24
neutron router-interface-add default subnet_1

# there is no 80 port.
 ip netns exec qdhcp-c5791b7d-ec3e-4e96-9a32-b9d1217ed330 netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
PID/Program name   
tcp        0      0 172.16.255.2:53         0.0.0.0:*               LISTEN      
16926/dnsmasq      
tcp        0      0 169.254.169.254:53      0.0.0.0:*               LISTEN      
16926/dnsmasq      
tcp6       0      0 fe80::f816:3eff:fe80:53 :::*                    LISTEN      
16926/dnsmasq      
udp        0      0 172.16.255.2:53         0.0.0.0:*                           
16926/dnsmasq      
udp        0      0 169.254.169.254:53      0.0.0.0:*                           
16926/dnsmasq      
udp        0      0 0.0.0.0:67              0.0.0.0:*                           
16926/dnsmasq      
udp6       0      0 :::547                  :::*                                
16926/dnsmasq      
udp6       0      0 fe80::f816:3eff:fe80:53 :::*                                
16926/dnsmasq

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1655605

Title:
  metadata proxy won't start in dhcp namespace when network(subnet) is
  removed from router

Status in neutron:
  New

Bug description:
  When adding network(subnet) into router immediately after creating
  network(subnet), there is no metadata proxy process created in dhcp
  namespace to listen on port 80. It causes problem when deleted
  network(subnet) from router: it won't call metadata service
  successfully until restarting dhcp service. Restarting dhcp service is
  just a workaround and is not acceptable as solution.


  This problem is introduced in Newton release. When adding network, it
  will check whether the network has isolated ipv4 subnet. It queries
  all ports belonging to the network, and see whether there is any port
  used as gateway. if yes, then it thinks the subnet is not isolated. If
  we add subnet to router immediately after creating subnet, the process
  of network creation( creating metadata proxy) and the process of
  adding subnet to interface happens at the same time. The seconds
  process creates port as gateway quickly and then the first process
  checks and treats it no isolated, and then will kill metadata proxy
  created soon earlier.

  # /etc/neutron/dhcp_agent.ini
  enable_isolated_metadata = True
  enable_metadata_network = True

  #execute the following commands in batch without interruption.
  neutron net-create network_1
  neutron subnet-create --name subnet_1 network_1 172.60.0.0/24
  neutron router-interface-add default subnet_1

  # there is no 80 port.
   ip netns exec qdhcp-c5791b7d-ec3e-4e96-9a32-b9d1217ed330 netstat -tunlp
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State     
  PID/Program name   
  tcp        0      0 172.16.255.2:53         0.0.0.0:*               LISTEN    
  16926/dnsmasq      
  tcp        0      0 169.254.169.254:53      0.0.0.0:*               LISTEN    
  16926/dnsmasq      
  tcp6       0      0 fe80::f816:3eff:fe80:53 :::*                    LISTEN    
  16926/dnsmasq      
  udp        0      0 172.16.255.2:53         0.0.0.0:*                         
  16926/dnsmasq      
  udp        0      0 169.254.169.254:53      0.0.0.0:*                         
  16926/dnsmasq      
  udp        0      0 0.0.0.0:67              0.0.0.0:*                         
  16926/dnsmasq      
  udp6       0      0 :::547                  :::*                              
  16926/dnsmasq      
  udp6       0      0 fe80::f816:3eff:fe80:53 :::*                              
  16926/dnsmasq

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1655605/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to