← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1152794] Re: Wrong IP configuration if router interface is attached with port_id

 

Indeed I remembered there was a reason for this behaviour, but I forgot
about it.

This is why I waited for comments before setting target/importance.

I think we can set this bug to invalid


** Changed in: quantum
       Status: New => Invalid

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

Title:
  Wrong IP configuration if router interface is attached with port_id

Status in OpenStack Quantum (virtual network service):
  Invalid

Bug description:
  In a nuthsell:

  if a router interface is created using port_id instead of subnet_id, the router interface will have an IP picked from the subnet's allocation pool, and not the gateway_ip. However, the DHCP agent will still send the gateway_ip in the 'router' option.
  The default route on the guest is therefore wrong as the nexthop is not correct.

  As a result I'm observing cirros instances stuck as boot. tcpdump
  shows ARP requests for 10.0.1.1 (gateway_ip) whereas the router
  interface is at 10.0.1.2. The fact that the image is stuck might be
  cirros-specific, but the configuration still needs to be fixed.

  How to reproduce:

  Assume we have a network called net2, with a subnet called sub2
  (10.0.1.0/24) and router called router2:

  quantum port-create net2 --name rtr_port
  Created a new port:
  +-----------------+---------------------------------------------------------------------------------+
  | Field           | Value                                                                           |
  +-----------------+---------------------------------------------------------------------------------+
  | admin_state_up  | True                                                                            |
  | device_id       |                                                                                 |
  | device_owner    |                                                                                 |
  | fixed_ips       | {"subnet_id": "6f83134b-f168-4da4-86a5-411b762c344e", "ip_address": "10.0.1.2"} |
  | id              | 70592664-f5ab-4732-8624-460648e1f591                                            |
  | mac_address     | fa:16:3e:a7:a3:7b                                                               |
  | name            | rtr_port                                                                        |
  | network_id      | ecb149aa-53c1-47fb-a5ed-48900d450812                                            |
  | security_groups | c7287c73-f7b1-456a-af5a-5a07604996c0                                            |
  | status          | DOWN                                                                            |
  | tenant_id       | 965057f34e274632aedbb8aedf89e6e4                                                |
  +-----------------+---------------------------------------------------------------------------------+

  curl -i http://192.168.0.3:9696/v2.0/routers/26d08299-6e49-4be2-a396-95ed6e9f9077/add_router_interface.json -X PUT -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: eeb88f6b6be446299f371a2027acc051" -d '{"port_id": "70592664-f5ab-4732-8624-460648e1f591"}'
  HTTP/1.1 200 OK
  Content-Type: application/json; charset=UTF-8
  Content-Length: 104
  Date: Fri, 08 Mar 2013 22:19:17 GMT

  {"subnet_id": "6f83134b-f168-4da4-86a5-411b762c344e", "port_id":
  "70592664-f5ab-4732-8624-460648e1f591"}

  salvatore@ubuntu:~/git/devstack$ quantum port-show rtr_port 
  +-----------------+---------------------------------------------------------------------------------+
  | Field           | Value                                                                           |
  +-----------------+---------------------------------------------------------------------------------+
  | admin_state_up  | True                                                                            |
  | device_id       | 26d08299-6e49-4be2-a396-95ed6e9f9077                                            |
  | device_owner    | network:router_interface                                                        |
  | fixed_ips       | {"subnet_id": "6f83134b-f168-4da4-86a5-411b762c344e", "ip_address": "10.0.1.2"} |
  | id              | 70592664-f5ab-4732-8624-460648e1f591                                            |
  | mac_address     | fa:16:3e:a7:a3:7b                                                               |
  | name            | rtr_port                                                                        |
  | network_id      | ecb149aa-53c1-47fb-a5ed-48900d450812                                            |
  | security_groups | c7287c73-f7b1-456a-af5a-5a07604996c0                                            |
  | status          | ACTIVE                                                                          |
  | tenant_id       | 965057f34e274632aedbb8aedf89e6e4                                                |
  +-----------------+---------------------------------------------------------------------------------+
  salvatore@ubuntu:~/git/devstack$ quantum subnet-show sub2   
  +------------------+--------------------------------------------+
  | Field            | Value                                      |
  +------------------+--------------------------------------------+
  | allocation_pools | {"start": "10.0.1.2", "end": "10.0.1.254"} |
  | cidr             | 10.0.1.0/24                                |
  | dns_nameservers  |                                            |
  | enable_dhcp      | True                                       |
  | gateway_ip       | 10.0.1.1                                   |
  | host_routes      |                                            |
  | id               | 6f83134b-f168-4da4-86a5-411b762c344e       |
  | ip_version       | 4                                          |
  | name             | sub2                                       |
  | network_id       | ecb149aa-53c1-47fb-a5ed-48900d450812       |
  | tenant_id        | 965057f34e274632aedbb8aedf89e6e4           |
  +------------------+--------------------------------------------+

  salvatore@ubuntu:~/git/devstack$ nova boot --image f039f91f-03ac-418e-a630-5dd3fa54379e --flavor 1 --nic net-id=ecb149aa-53c1-47fb-a5ed-48900d450812 testvm2
  +-----------------------------+--------------------------------------+
  | Property                    | Value                                |
  +-----------------------------+--------------------------------------+
  | status                      | BUILD                                |
  | updated                     | 2013-03-08T22:38:56Z                 |
  | OS-EXT-STS:task_state       | scheduling                           |
  | key_name                    | None                                 |
  | image                       | cirros-0.3.1-x86_64-uec              |
  | hostId                      |                                      |
  | OS-EXT-STS:vm_state         | building                             |
  | flavor                      | m1.tiny                              |
  | id                          | 8263e822-88ff-4666-bb5f-c151e82d8578 |
  | security_groups             | [{u'name': u'default'}]              |
  | user_id                     | ac0804edb3f946fa817efc4124e772d5     |
  | name                        | testvm2                              |
  | adminPass                   | Kd77EbLiobHn                         |
  | tenant_id                   | 965057f34e274632aedbb8aedf89e6e4     |
  | created                     | 2013-03-08T22:38:56Z                 |
  | OS-DCF:diskConfig           | MANUAL                               |
  | metadata                    | {}                                   |
  | accessIPv4                  |                                      |
  | accessIPv6                  |                                      |
  | progress                    | 0                                    |
  | OS-EXT-STS:power_state      | 0                                    |
  | OS-EXT-AZ:availability_zone | None                                 |
  | config_drive                |                                      |
  +-----------------------------+--------------------------------------+

  salvatore@ubuntu:~/git/devstack$ sudo ip netns exec qdhcp-ecb149aa-53c1-47fb-a5ed-48900d450812 tcpdump -i tapf6840c4f-b3
  tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  listening on tapf6840c4f-b3, link-type EN10MB (Ethernet), capture size 65535 bytes
  ^C23:39:47.812467 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:48.812396 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:49.811678 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:50.811738 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:51.812615 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:54.983503 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:55.980314 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:56.980304 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:57.979845 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:58.980249 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:39:59.979622 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:03.152975 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:04.151450 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:05.151654 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:06.152875 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:07.151657 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:08.152593 ARP, Request who-has 10.0.1.1 tell 10.0.1.4, length 28
  23:40:09.313161 ARP, Request who-has 10.0.1.3 tell 10.0.1.4, length 28
  23:40:09.313174 ARP, Reply 10.0.1.3 is-at fa:16:3e:6f:29:5a (oui Unknown), length 28

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