This message is an update message that indicates that the VM port is ready. The admin_state is up while the ofport number is assigned. The problem is here. It is not respected.
In the function above, it will set the right ofport number and 'is_local' = True.
Finally it will notify openflow applications to add local port. At this point, the VM port will be set up and the corresponding dhcp flows will be installed.
All in all, the problem is why the port update message is not processed. During the debugging, I noticed the update message path:
The logs according to the described problem during the VM creation:
2016-04-10 16:27:45.233 INFO dragonflow. db.api_ nb [-] Pushing Update to Queue: Action:create, Table:ovsinterface, Key:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38 Value:uuid: c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:-1, name:tap87e9d12 7-a3, admin_state:, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type: Topic:None db.api_ nb [-] Pushing Update to Queue: Action:update, Table:ovsinterface, Key:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38 Value:uuid: c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:7, name:tap87e9d12 7-a3, admin_state:down, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type: Topic:None db.api_ nb [-] Pushing Update to Queue: Action:update, Table:ovsinterface, Key:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38 Value:uuid: c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:7, name:tap87e9d12 7-a3, admin_state:up, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type: Topic:None controller. ryu_base_ app [-] port added 7 controller. ryu_base_ app [-] port modified 7 controller. topology [-] Ovs port updated: uuid:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:-1, name:tap87e9d12 7-a3, admin_state:, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type:
2016-04-10 16:27:45.237 INFO dragonflow.
2016-04-10 16:27:45.243 INFO dragonflow.
2016-04-10 16:27:45.244 INFO dragonflow.
2016-04-10 16:27:45.244 INFO dragonflow.
2016-04-10 16:27:45.245 INFO dragonflow.
You can see that there is only one ovs port updated message during VM creation:
2016-04-10 16:27:45.245 INFO dragonflow. controller. topology [-] Ovs port updated: uuid:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:-1, name:tap87e9d12 7-a3, admin_state:, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type:
This message happened when a VM port is being created, and its ofport = -1. At this time, the port is ignored. See the code below: /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ controller/ topology. py#L63
https:/
However, in the log, you can see that there's one important message that wasn't processed:
2016-04-10 16:27:45.243 INFO dragonflow. db.api_ nb [-] Pushing Update to Queue: Action:update, Table:ovsinterface, Key:c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38 Value:uuid: c594bfc3- 2cfe-4ce6- a60d-834df7e2da 38, ofport:7, name:tap87e9d12 7-a3, admin_state:up, type:vm, iface_id: 87e9d127- a395-410d- 87a8-cad4e3a413 cd, peer:, attached_ mac:fa: 16:3e:1c: 88:92, remote_ip:, tunnel_type: Topic:None
This message is an update message that indicates that the VM port is ready. The admin_state is up while the ofport number is assigned. The problem is here. It is not respected.
We can assume that if it is respected:
There should be a funcitonal call from distributed topology: ovs_port_updated with the right ofport number. As a result, it will call _vm_port_updated. /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ controller/ topology. py#L139
https:/
Then logical_ port_updated in local controller will be called next. /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ controller/ df_local_ controller. py#L183
https:/
In the function above, it will set the right ofport number and 'is_local' = True.
Finally it will notify openflow applications to add local port. At this point, the VM port will be set up and the corresponding dhcp flows will be installed.
All in all, the problem is why the port update message is not processed. During the debugging, I noticed the update message path:
(1) Put the message to the queue: https:/ /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ db/api_ nb.py#L150 /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ db/api_ nb.py#L165 /github. com/openstack/ dragonflow/ blob/master/ dragonflow/ db/api_ nb.py#L228- L231
(2) Read from the queue: https:/
(3) Apply db change: https:/
In the step 3, the update messages related with 'ovsinterface' table are all ignored.