← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1489184] [NEW] Port is unbound from a compute node, the DVR scheduler needs to check whether the router can be deleted on the L3-agent

 

Public bug reported:

In my environment where there is a compute node and a controller node.
On the compute node the L3-agent mode is 'dvr' on the controller node
the L3-agent mode is 'dvr-snat'. Nova-compute is only running on the
compute node.

Start: the compute node has no VMs running, there are no namespaces on
the compute node.

1. Created a network and a router
   neutron net-create demo-net
   neutron subnet-create sb-demo-net demo-net 10.1.2.0/24
   neutron router-create demo-router
   neutron router-interface-add demo-router sb-demo-net
   neutron router-gateway-set demo-router public

my-net's UUID is 0d3f0103-43e9-45a2-8ca2-b29700039297
my-router's UUID is 1bbfafde-b1d4-4752-9dd0-4b23bbeca22b

2. Created a port: 
stack@Dvr-Ctrl2:~/DEVSTACK/demo$ neutron port-create demo-net
The port's UUID is 278743d7-b057-4797-8b2b-faaf5fe13a4a

Note: the port is not associated with a floating IP.

3. Boot up a VM using the port:
nova boot --flavor 1 --image <IMAGE_UUID> --nic port-id=278743d7-b057-4797-8b2b-faaf5fe13a4a  demo-p11vm01

Wait for the VM to come up on the compute node.

4. Deleted the VM.

5. The port still exists and is now unbound from the compute node (device owner and binding:host_id are now None):
stack@Dvr-Ctrl2:~/DEVSTACK/demo$ ../manage/osadmin neutron port-show 278743d7-b057-4797-8b2b-faaf5fe13a4a
+-----------------------+---------------------------------------------------------------------------------+
| Field                 | Value                                                                           |
+-----------------------+---------------------------------------------------------------------------------+
| admin_state_up        | True                                                                            |
| allowed_address_pairs |                                                                                 |
| binding:host_id       |                                                                                 |
| binding:profile       | {}                                                                              |
| binding:vif_details   | {}                                                                              |
| binding:vif_type      | unbound                                                                         |
| binding:vnic_type     | normal                                                                          |
| device_id             |                                                                                 |
| device_owner          |                                                                                 |
| extra_dhcp_opts       |                                                                                 |
| fixed_ips             | {"subnet_id": "b45d41ca-134f-4274-bb05-50fab100315e", "ip_address": "10.1.2.4"} |
| id                    | 278743d7-b057-4797-8b2b-faaf5fe13a4a                                            |
| mac_address           | fa:16:3e:a6:f7:d1                                                               |
| name                  |                                                                                 |
| network_id            | 0d3f0103-43e9-45a2-8ca2-b29700039297                                            |
| port_security_enabled | True                                                                            |
| security_groups       | 8b68d1c9-cae7-4f0b-8fb5-6adb5a515246                                            |
| status                | DOWN                                                                            |
| tenant_id             | a7950bd5a61548ee8b03145cacf90a53                                                |
+-----------------------+---------------------------------------------------------------------------------+

The Router is still scheduled on the compute node.

stack@Dvr-Ctrl2:~/DEVSTACK/demo$ ../manage/osadmin neutron l3-agent-list-hosting-router 1bbfafde-b1d4-4752-9dd0-4b23bbeca22b
+--------------------------------------+-------------+----------------+-------+----------+
| id                                   | host        | admin_state_up | alive | ha_state |
+--------------------------------------+-------------+----------------+-------+----------+
| 2fc1f65b-4c05-4cec-95eb-93dda39a6eec | Dvr-Ctrl2   | True           | :-)   |          |
| dae065fb-b140-4ece-8824-779cf6426337 | DVR-Compute | True           | :-)   |          |
+--------------------------------------+-------------+----------------+-------+----------+


When the port is unbound, the router should no longer be scheduled on the compute node as it is no longer needed on the compute node.  The reason is that when the port is no longer bound to the compute node, the DVR scheduler didn't check whether the router can be removed from an L3-agent.

** Affects: neutron
     Importance: Undecided
     Assignee: Stephen Ma (stephen-ma)
         Status: New


** Tags: l3-dvr-backlog

** Changed in: neutron
     Assignee: (unassigned) => Stephen Ma (stephen-ma)

** Tags added: l3-dvr-backlog

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

Title:
  Port is unbound from a compute node, the DVR scheduler needs to check
  whether the router can be deleted on the L3-agent

Status in neutron:
  New

Bug description:
  In my environment where there is a compute node and a controller node.
  On the compute node the L3-agent mode is 'dvr' on the controller node
  the L3-agent mode is 'dvr-snat'. Nova-compute is only running on the
  compute node.

  Start: the compute node has no VMs running, there are no namespaces on
  the compute node.

  1. Created a network and a router
     neutron net-create demo-net
     neutron subnet-create sb-demo-net demo-net 10.1.2.0/24
     neutron router-create demo-router
     neutron router-interface-add demo-router sb-demo-net
     neutron router-gateway-set demo-router public

  my-net's UUID is 0d3f0103-43e9-45a2-8ca2-b29700039297
  my-router's UUID is 1bbfafde-b1d4-4752-9dd0-4b23bbeca22b

  2. Created a port: 
  stack@Dvr-Ctrl2:~/DEVSTACK/demo$ neutron port-create demo-net
  The port's UUID is 278743d7-b057-4797-8b2b-faaf5fe13a4a

  Note: the port is not associated with a floating IP.

  3. Boot up a VM using the port:
  nova boot --flavor 1 --image <IMAGE_UUID> --nic port-id=278743d7-b057-4797-8b2b-faaf5fe13a4a  demo-p11vm01

  Wait for the VM to come up on the compute node.

  4. Deleted the VM.

  5. The port still exists and is now unbound from the compute node (device owner and binding:host_id are now None):
  stack@Dvr-Ctrl2:~/DEVSTACK/demo$ ../manage/osadmin neutron port-show 278743d7-b057-4797-8b2b-faaf5fe13a4a
  +-----------------------+---------------------------------------------------------------------------------+
  | Field                 | Value                                                                           |
  +-----------------------+---------------------------------------------------------------------------------+
  | admin_state_up        | True                                                                            |
  | allowed_address_pairs |                                                                                 |
  | binding:host_id       |                                                                                 |
  | binding:profile       | {}                                                                              |
  | binding:vif_details   | {}                                                                              |
  | binding:vif_type      | unbound                                                                         |
  | binding:vnic_type     | normal                                                                          |
  | device_id             |                                                                                 |
  | device_owner          |                                                                                 |
  | extra_dhcp_opts       |                                                                                 |
  | fixed_ips             | {"subnet_id": "b45d41ca-134f-4274-bb05-50fab100315e", "ip_address": "10.1.2.4"} |
  | id                    | 278743d7-b057-4797-8b2b-faaf5fe13a4a                                            |
  | mac_address           | fa:16:3e:a6:f7:d1                                                               |
  | name                  |                                                                                 |
  | network_id            | 0d3f0103-43e9-45a2-8ca2-b29700039297                                            |
  | port_security_enabled | True                                                                            |
  | security_groups       | 8b68d1c9-cae7-4f0b-8fb5-6adb5a515246                                            |
  | status                | DOWN                                                                            |
  | tenant_id             | a7950bd5a61548ee8b03145cacf90a53                                                |
  +-----------------------+---------------------------------------------------------------------------------+

  The Router is still scheduled on the compute node.

  stack@Dvr-Ctrl2:~/DEVSTACK/demo$ ../manage/osadmin neutron l3-agent-list-hosting-router 1bbfafde-b1d4-4752-9dd0-4b23bbeca22b
  +--------------------------------------+-------------+----------------+-------+----------+
  | id                                   | host        | admin_state_up | alive | ha_state |
  +--------------------------------------+-------------+----------------+-------+----------+
  | 2fc1f65b-4c05-4cec-95eb-93dda39a6eec | Dvr-Ctrl2   | True           | :-)   |          |
  | dae065fb-b140-4ece-8824-779cf6426337 | DVR-Compute | True           | :-)   |          |
  +--------------------------------------+-------------+----------------+-------+----------+

  
  When the port is unbound, the router should no longer be scheduled on the compute node as it is no longer needed on the compute node.  The reason is that when the port is no longer bound to the compute node, the DVR scheduler didn't check whether the router can be removed from an L3-agent.

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


Follow ups