)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"843b8fbff49e9dc2a3f22387fd5121e991bbb90e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3aaa91ec_77e85b7d","updated":"2016-06-22 08:18:48.000000000","message":"by the way can you add a reno stub for this change","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"f432547f0cf27bc622ab951d2481c8795c87c0b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3aaa91ec_21803146","in_reply_to":"3aaa91ec_77e85b7d","updated":"2016-06-22 17:31:05.000000000","message":"Done","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"}],"releasenotes/notes/ensure-ovs-bridge-a0c1b51f469c92d0.yaml":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"81f9b15ec0530f90603af3deed906e366951cc1b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    properly. Before, it would be improperly plugged in the"},{"line_number":10,"context_line":"    same manner as VIFBridge (by creating a linux bridge and"},{"line_number":11,"context_line":"    veth pair) when it only needed to be added directly to"},{"line_number":12,"context_line":"    the OVS bridge."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_bd91bd54","line":12,"updated":"2016-06-23 11:06:45.000000000","message":"Errr, no it wouldn\u0027t. The plug/unplug methods were explicitly a no-op when seeing VIFOpenVSwitch - it didn\u0027t create any linux bridge / veth pair","commit_id":"d4f2d1f83b1dd005114f37cedd603ae2855f7d5f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"5d26c8bd395006bcf3b460d7830cd69a7f8ea8ec","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    properly. Before, it would be improperly plugged in the"},{"line_number":10,"context_line":"    same manner as VIFBridge (by creating a linux bridge and"},{"line_number":11,"context_line":"    veth pair) when it only needed to be added directly to"},{"line_number":12,"context_line":"    the OVS bridge."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_7015a847","line":12,"in_reply_to":"3aaa91ec_05a98824","updated":"2016-06-23 15:30:57.000000000","message":"Alright, I\u0027ll go ahead and file a bug for that and fix it in a separate patch.","commit_id":"d4f2d1f83b1dd005114f37cedd603ae2855f7d5f"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9f1a95b502e2a64c26219a29c845687b20fff92d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    properly. Before, it would be improperly plugged in the"},{"line_number":10,"context_line":"    same manner as VIFBridge (by creating a linux bridge and"},{"line_number":11,"context_line":"    veth pair) when it only needed to be added directly to"},{"line_number":12,"context_line":"    the OVS bridge."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_a3b51eef","line":12,"in_reply_to":"3aaa91ec_40e1d0cf","updated":"2016-06-23 11:42:43.000000000","message":"Ok, I see what its getting at now. It wouldn\u0027t impact guest connectivity though IIUC - it just means we\u0027d be creating a useless veth pair + linux bridge - libvirt would still be plugging straight into the real ovs bridge.\n\nI\u0027d prefer to see this fixed explicitly as a separate patch, before this patch, so we have clear history. It isn\u0027t nice to mix feature additions with bug fixes in the same patch","commit_id":"d4f2d1f83b1dd005114f37cedd603ae2855f7d5f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5c23b797e9990f351807d223e9e5853c758c6689","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    properly. Before, it would be improperly plugged in the"},{"line_number":10,"context_line":"    same manner as VIFBridge (by creating a linux bridge and"},{"line_number":11,"context_line":"    veth pair) when it only needed to be added directly to"},{"line_number":12,"context_line":"    the OVS bridge."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_05a98824","line":12,"in_reply_to":"3aaa91ec_a3b51eef","updated":"2016-06-23 15:16:32.000000000","message":"yes that what happening today.\n\nyes it would be good to split this.\n\nwe will likely want to do a new release of os-vif also as\nwith the current release you would end up with the veth pair pulse the tap added to br-int which may be a security issue as it could allow the guest to access the host if the ovs agent configure the vlan on both interfaces.","commit_id":"d4f2d1f83b1dd005114f37cedd603ae2855f7d5f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"beb5c2bb0295944b75ea11b092989ba8937a3906","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    properly. Before, it would be improperly plugged in the"},{"line_number":10,"context_line":"    same manner as VIFBridge (by creating a linux bridge and"},{"line_number":11,"context_line":"    veth pair) when it only needed to be added directly to"},{"line_number":12,"context_line":"    the OVS bridge."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3aaa91ec_40e1d0cf","line":12,"in_reply_to":"3aaa91ec_bd91bd54","updated":"2016-06-23 11:26:28.000000000","message":"actually because VIFOpenVSwitch inherits from VIFBridge\n\nhttps://github.com/openstack/os-vif/blob/2eb892caabd025b9263fce6a3bb1f125fe03ed6a/os_vif/objects/vif.py#L83-L87\n\nthe isinstance check for VIFBridge would have been true\nhttps://github.com/openstack/os-vif/blob/2eb892caabd025b9263fce6a3bb1f125fe03ed6a/vif_plug_ovs/ovs.py#L126-L127\n\nas such the hybrid plug stratagy was always used in os-vif even though libvirt whould have plugged tried to plug the tap directly into the ovs bridge.","commit_id":"d4f2d1f83b1dd005114f37cedd603ae2855f7d5f"}],"vif_plug_ovs/linux_net.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d9182a5b6950ff71864414c7a3a7d15e9f9c4f9c","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_1290acec","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"updated":"2016-06-17 10:52:06.000000000","message":"creation of the port and the  bridge should not be commended into an atomic action.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"717d906026bc855e6aa72c017cf4694ff0f12dbf","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_5255061c","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"in_reply_to":"7aa08908_1290acec","updated":"2016-06-17 14:56:06.000000000","message":"I\u0027m not against that, but what\u0027s your reasoning? If either the bridge or port creation fails, the whole action has failed, right?","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d14a55934b3bb84890644b10cf4d68ed79996734","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_737aabbb","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"in_reply_to":"7aa08908_22fa9a77","updated":"2016-06-18 10:58:00.000000000","message":"we could move that to the ovs agent but it seams more complicated.\nin that case every time a port is added to any bridge the that is not a patch port the agent would have to check if it has a neutron port id set in the external ids feild and then when its not the intergration bride or tunnel bridge it will have to set the external ids field on the bridge.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28f266e1675b6eeef591b06b61cfa2913634b66e","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_612b0a83","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"in_reply_to":"7aa08908_5255061c","updated":"2016-06-17 16:04:26.000000000","message":"we will need to set the neutron port id on the bridge so the ovs agent can identify the bridge to delete when the interface is unpluged.\n\nwe only want to do this when os-vif creates the bridge.\nif we are adding the interface to br-int we do not want to set the id so that the agent wont delete the br-int.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"15eeccf667de6edcef8f46958e40db0508baab86","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_22fa9a77","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"in_reply_to":"7aa08908_612b0a83","updated":"2016-06-17 20:02:28.000000000","message":"Would that logic be better inside the OVS agent instead? When it detects a trunk port has been created, it can set external_ids:trunk-port-id on the bridge itself (or any other attribute it needs).\n\nIf os-vif sets it, then we have to rely upon coordinated assumptions between Neutron and os-vif.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"ab352bd1ec9342224919200c1ebacdf2029214fe","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge)"},{"line_number":52,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":53,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":54,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_7d44be73","line":51,"range":{"start_line":51,"start_character":2,"end_line":51,"end_character":40},"in_reply_to":"7aa08908_737aabbb","updated":"2016-06-20 16:16:21.000000000","message":"Not necessarily, because trunk ports will only be plugged into their own OVS bridges, once the OVS agent knows that it\u0027s a trunk port, it can just call the equivalent of \"ovs-vsctl iface-to-br\" to get the bridge and set the necessary external_ids on it.\n\nI\u0027m all for adding simple functionality into os-vif to reduce the complexity of the OVS agent, but it seems like anything more than just creating the bridge if it doesn\u0027t already exist is going to be shot down in favor of giving Neutron as much control as possible.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28f266e1675b6eeef591b06b61cfa2913634b66e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    return cmd"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _create_ovs_bridge_cmd(bridge):"},{"line_number":65,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_a1f4d2f0","line":64,"range":{"start_line":64,"start_character":4,"end_line":64,"end_character":35},"updated":"2016-06-17 16:04:26.000000000","message":"this should optionally take the datapath type.\nwe need called as part of pluging a vhost-user port\nid needs to be \u0027netdev\u0027 otherwise the datapath needs to be \u0027system\u0027\n\nalternitivly we could allow the ovs agent to change the datapath type after the bridge is created but its probably cleaner to do it here.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"15eeccf667de6edcef8f46958e40db0508baab86","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    return cmd"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _create_ovs_bridge_cmd(bridge):"},{"line_number":65,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_e29412e9","line":64,"range":{"start_line":64,"start_character":4,"end_line":64,"end_character":35},"in_reply_to":"7aa08908_a1f4d2f0","updated":"2016-06-17 20:02:28.000000000","message":"I agree, it is cleaner here. I\u0027ll add that in the next patchset.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d9182a5b6950ff71864414c7a3a7d15e9f9c4f9c","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _create_ovs_bridge_cmd(bridge):"},{"line_number":65,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_d22584c2","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":50},"updated":"2016-06-17 10:52:06.000000000","message":"when os vif creates the port it needs to add the interfaces neutron port uuid to the external ids field\n\nif the bridge already exists this should not be dont so we need to first check it the bridge exists and then create it if it does not with the external id set.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"28f266e1675b6eeef591b06b61cfa2913634b66e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _create_ovs_bridge_cmd(bridge):"},{"line_number":65,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_66368004","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":50},"in_reply_to":"7aa08908_3545c442","updated":"2016-06-17 16:04:26.000000000","message":"libvirt will only do that when not using hybrid plug or vhost-user\n\nin the case of hybrid plug and vhost-user we need to do that in os-vif.\n\nthe reasoning for setting the uuid on the bridge is so that when os-vif deletes the port the ovs agent can use the ports neutron port id to find the trunk bridge to delete.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"717d906026bc855e6aa72c017cf4694ff0f12dbf","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def _create_ovs_bridge_cmd(bridge):"},{"line_number":65,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_3545c442","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":50},"in_reply_to":"7aa08908_d22584c2","updated":"2016-06-17 14:56:06.000000000","message":"The external_id set doesn\u0027t need to be set on the bridge, because libvirt will put the same external_id set on the vif port, and that\u0027s where the OVS agent will grab those external_ids from.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    datapath_type \u003d (constants.OVS_DATAPATH_NETDEV if"},{"line_number":52,"context_line":"                     interface_type \u003d\u003d constants.OVS_VHOSTUSER_INTERFACE_TYPE"},{"line_number":53,"context_line":"                     else constants.OVS_DATAPATH_SYSTEM)"},{"line_number":54,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge, datapath_type)"},{"line_number":55,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":56,"context_line":"            \u0027add-port\u0027, bridge, dev,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_e7e83919","line":53,"range":{"start_line":51,"start_character":4,"end_line":53,"end_character":56},"updated":"2016-06-21 20:47:24.000000000","message":"nit:  This use of ternary if is a little out of control.  When it takes three lines and the keywords (e.g. \"if\", \"else\") are all over the place, it really disrupts readability.\n\nI\u0027d prefer the regular \"if\" approach which seems to add some symmetry:\n\n  if interface_type \u003d\u003d constants.OVS_VHOSTUSER_INTERFACE_TYPE:\n      datapath_type \u003d constants.OVS_DATAPATH_NETDEV\n  else:\n      datapath_type \u003d constants.OVS_DATAPATH_SYSTEM","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    datapath_type \u003d (constants.OVS_DATAPATH_NETDEV if"},{"line_number":52,"context_line":"                     interface_type \u003d\u003d constants.OVS_VHOSTUSER_INTERFACE_TYPE"},{"line_number":53,"context_line":"                     else constants.OVS_DATAPATH_SYSTEM)"},{"line_number":54,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge, datapath_type)"},{"line_number":55,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":56,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":57,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_1337e7fe","line":54,"range":{"start_line":51,"start_character":2,"end_line":54,"end_character":55},"updated":"2016-06-18 11:19:27.000000000","message":"i really would prefer to keep the bridge creation separate from port createtion and not as a side effect.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"05368b2d1244a1b1a282bfa87418ecc184e6c459","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    datapath_type \u003d (constants.OVS_DATAPATH_NETDEV if"},{"line_number":52,"context_line":"                     interface_type \u003d\u003d constants.OVS_VHOSTUSER_INTERFACE_TYPE"},{"line_number":53,"context_line":"                     else constants.OVS_DATAPATH_SYSTEM)"},{"line_number":54,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge, datapath_type)"},{"line_number":55,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":56,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":57,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_24a4f855","line":54,"range":{"start_line":51,"start_character":2,"end_line":54,"end_character":55},"in_reply_to":"3aaa91ec_27ca41a2","updated":"2016-06-21 21:46:12.000000000","message":"Ok, I\u0027ll separate the bridge creation from the port creation and pass the datapath_type explicitly to ensure_ovs_bridge.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"def _create_ovs_vif_cmd(bridge, dev, iface_id, mac,"},{"line_number":50,"context_line":"                        instance_id, interface_type\u003dNone):"},{"line_number":51,"context_line":"    datapath_type \u003d (constants.OVS_DATAPATH_NETDEV if"},{"line_number":52,"context_line":"                     interface_type \u003d\u003d constants.OVS_VHOSTUSER_INTERFACE_TYPE"},{"line_number":53,"context_line":"                     else constants.OVS_DATAPATH_SYSTEM)"},{"line_number":54,"context_line":"    cmd \u003d _create_ovs_bridge_cmd(bridge, datapath_type)"},{"line_number":55,"context_line":"    cmd +\u003d [\u0027--\u0027, \u0027--if-exists\u0027, \u0027del-port\u0027, dev, \u0027--\u0027,"},{"line_number":56,"context_line":"            \u0027add-port\u0027, bridge, dev,"},{"line_number":57,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Interface\u0027, dev,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_27ca41a2","line":54,"range":{"start_line":51,"start_character":2,"end_line":54,"end_character":55},"in_reply_to":"7aa08908_1337e7fe","updated":"2016-06-21 20:47:24.000000000","message":"++ I think L51 - L53 is a sign that you\u0027re probably right, @Sean.  We shouldn\u0027t need to conditionally set the datapath_type when the code path in ovs.py already knows what datapath_type is.  I tend to not like code that tries to over abstract or generalize something and then the abstraction has to do extra work to figure what to do from context.\n\nAlso, coupling bridge creation with port creation doesn\u0027t seem right to me.  I agree with where @Sean has suggested putting the call to ensure_ovs_bridge in ovs.py too.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_78a7c64f","line":68,"range":{"start_line":68,"start_character":40,"end_line":68,"end_character":70},"updated":"2016-06-21 20:47:24.000000000","message":"Why does this have a default (i.e. what sets \"system\" apart from \"netdev\" such that it should be assumed)?  If the answer is because that is what L132 would pass, then I\u0027d say don\u0027t have a default.  I\u0027d rather see this type passed in on L132 explicitly.  Default values for arguments should usually be avoided.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b0f8a7dbef652e4f34954c8be57d61f8e530e32f","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_e40950df","line":68,"range":{"start_line":68,"start_character":40,"end_line":68,"end_character":70},"in_reply_to":"3aaa91ec_78a7c64f","updated":"2016-06-21 21:20:00.000000000","message":"system is the ovs kernel datapath.\nit is the default datapath type in ovs\nbut i had also assumed that it would be passed from where \nensure_ovs_bridge is called in the ovs plugin.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"05368b2d1244a1b1a282bfa87418ecc184e6c459","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_47a5c602","line":68,"range":{"start_line":68,"start_character":40,"end_line":68,"end_character":70},"in_reply_to":"3aaa91ec_e40950df","updated":"2016-06-21 21:46:12.000000000","message":"It\u0027s also the default datatype that the OVS agent sets when it creates bridges: https://github.com/openstack/neutron/blob/master/neutron/agent/common/ovs_lib.py#L179\n\nBut if we\u0027re passing the datapath_type explicitly then it doesn\u0027t need a default anyways.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return cmd"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_6e16404a","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":78},"updated":"2016-06-18 11:19:27.000000000","message":"we need to also accept the port id and append it if not node","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"05368b2d1244a1b1a282bfa87418ecc184e6c459","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return cmd"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_c79ff65d","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":78},"in_reply_to":"3aaa91ec_8495ec41","updated":"2016-06-21 21:46:12.000000000","message":"The way the OVS agent implementation [1] is playing out currently, there is a trunk L2 agent extension hook that is called on *every* port that gets added to any bridge on the host. Once the port is determined to be a trunk port somehow (its port object contains \u0027trunk-details\u0027?), at that point it can recall the trunk bridge name that was generated from that port id and set any external_ids on that bridge that it needs.\n\nBut there is also the open question that maybe the symmetry of having os-vif delete the bridge if it created it is a good thing. In that case os-vif should set the necessary external_ids.\n\n[1] https://review.openstack.org/#/c/330792/2/neutron/agent/l2/extensions/trunk.py","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b0f8a7dbef652e4f34954c8be57d61f8e530e32f","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return cmd"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_8495ec41","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":78},"in_reply_to":"3aaa91ec_d8c6ba15","updated":"2016-06-21 21:20:00.000000000","message":"im ok with the ovs agent doing this but the only trade off is that the agent will have to monitor all bridge for the addition of a port with a neutron port id and set it in the external ids field of the bridge when its added to a  trunk bridge.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return cmd"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _create_ovs_bridge_cmd(bridge,"},{"line_number":68,"context_line":"                           datapath_type\u003dconstants.OVS_DATAPATH_SYSTEM):"},{"line_number":69,"context_line":"    return [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":70,"context_line":"            \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % datapath_type]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_d8c6ba15","line":70,"range":{"start_line":67,"start_character":0,"end_line":70,"end_character":78},"in_reply_to":"7aa08908_6e16404a","updated":"2016-06-21 20:47:24.000000000","message":"I think I lean toward leaving this up to the OVS agent.  The OVS agent knows when this should be added and knows the port_id for the port.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_d3171f52","line":131,"range":{"start_line":131,"start_character":4,"end_line":131,"end_character":30},"updated":"2016-06-18 11:19:27.000000000","message":"we should take the datapath and neutron portid as an argument here","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"05368b2d1244a1b1a282bfa87418ecc184e6c459","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_6779e22f","line":131,"range":{"start_line":131,"start_character":4,"end_line":131,"end_character":30},"in_reply_to":"3aaa91ec_1eb02bf4","updated":"2016-06-21 21:46:12.000000000","message":"I\u0027ll update it to take datapath_type but will defer the port_id argument until we\u0027ve decided that os-vif should be responsible for setting that on the bridge.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_1eb02bf4","line":131,"range":{"start_line":131,"start_character":4,"end_line":131,"end_character":30},"in_reply_to":"7aa08908_d3171f52","updated":"2016-06-21 20:47:24.000000000","message":"It should take datapath_type but see L70 about port_id.  It seems more natural for this particular call not to have anything about a port_id in it.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_2e10b84d","line":132,"range":{"start_line":132,"start_character":4,"end_line":132,"end_character":46},"updated":"2016-06-18 11:19:27.000000000","message":"we need to test if the bridge exists here first","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b0f8a7dbef652e4f34954c8be57d61f8e530e32f","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_c476d43d","line":132,"range":{"start_line":132,"start_character":4,"end_line":132,"end_character":46},"in_reply_to":"3aaa91ec_7eca0f51","updated":"2016-06-21 21:20:00.000000000","message":"if the ovs agent set the external id on the bridge then yes this is fine as is.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"@privsep.vif_plug.entrypoint"},{"line_number":131,"context_line":"def ensure_ovs_bridge(bridge):"},{"line_number":132,"context_line":"    _ovs_vsctl(_create_ovs_bridge_cmd(bridge))"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"@privsep.vif_plug.entrypoint"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_7eca0f51","line":132,"range":{"start_line":132,"start_character":4,"end_line":132,"end_character":46},"in_reply_to":"7aa08908_2e10b84d","updated":"2016-06-21 20:47:24.000000000","message":"I think this is okay.","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"}],"vif_plug_ovs/ovs.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d9182a5b6950ff71864414c7a3a7d15e9f9c4f9c","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_ad3e99b5","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"updated":"2016-06-17 10:52:06.000000000","message":"dan correct me if im wrong but for the VIFOpenVSwitch case\nlibvirt handels creating the bridge and attaching the interface correct? as such im not sure if we need to do anything here.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3362ceef083aeb8db4f0d4b23c7be69b0f3574e2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_819556e5","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"in_reply_to":"7aa08908_12b1be8f","updated":"2016-06-17 16:19:20.000000000","message":"i think there is a larger question here if should we be using the libvirt native ovs support at all.\n\ni actully think it would be better to stop using the libvirt support and delegate it entirely to os-vif but that would require a change in nova.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"ab352bd1ec9342224919200c1ebacdf2029214fe","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a9d85d2_d0f9594f","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"in_reply_to":"7aa08908_13b24796","updated":"2016-06-20 16:16:21.000000000","message":"Ok, that inheritance hierarchy makes sense, it\u0027s just confusing because the VIFOpenVSwitch doesn\u0027t do everything VIFBridge does WRT plugging/unplugging. But I guess the plugging/unplugging belongs to the plugin not the VIF type. Is there a reason for that? Is it so each plugin can plug/unplug the VIF types differently?\n\nDo you think this bug should be handled in a separate patch, and this patch would be applied on top of that one?","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"15eeccf667de6edcef8f46958e40db0508baab86","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_c5512010","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"in_reply_to":"7aa08908_819556e5","updated":"2016-06-17 20:02:28.000000000","message":"Regardless of the larger question, the code is broken as-is, because it doesn\u0027t do the right thing for VIFOpenVSwitch vifs that don\u0027t require a linux bridge for security groups. Even if this patch wasn\u0027t in the picture, it still need to be fixed, right? The \"isinstance VIFOpenVSwitch\" leg should be first, and it should be a no op. Either that, or VIFBridge needs to inherit from VIFOpenVSwitch (not the other way around).","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"717d906026bc855e6aa72c017cf4694ff0f12dbf","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_12b1be8f","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"in_reply_to":"7aa08908_ad3e99b5","updated":"2016-06-17 14:56:06.000000000","message":"If libvirt creates the bridge already, then why would we need this patch to ensure it gets created?\n\nEven if libvirt does create the bridge, I still believe there is a bug here without having the \"isinstance VIFOpenVSwitch\" as the first leg of the conditional, because it will execute the \"isinstance VIFBridge\" case for both vif types. This means that even when not using the OVSHybridIptables firewall_driver, this code will end up creating the linux bridge and veth pair no matter what.\n\nThe same thing goes for the \"unplug\" method, which I didn\u0027t update in this patch. It still doesn\u0027t make sense to me why VIFOpenVSwitch inherits from VIFBridge. It seems like it should be the other way around.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d14a55934b3bb84890644b10cf4d68ed79996734","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            raise exception.WrongPortProfile("},{"line_number":124,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        # without this, a VIFOpenVSwitch will execute self._plug_bridge()"},{"line_number":127,"context_line":"        # because isinstance(VIFOpenVSwitch, VIFBridge) returns True"},{"line_number":128,"context_line":"        # (VIFOpenVSwitch is a subclass of VIFBridge)."},{"line_number":129,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":130,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":131,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":132,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge)"},{"line_number":133,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":134,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":135,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_13b24796","line":132,"range":{"start_line":126,"start_character":8,"end_line":132,"end_character":59},"in_reply_to":"7aa08908_c5512010","updated":"2016-06-18 10:58:00.000000000","message":"VIFBridge corresponds to the bridge type interface in libvirt not to a linux bridge.\nin libvirt the linux bridge and ovs bridge are subtypes of the bridge interface type.\n\nyou are correct though there is a bug here. we should either use type not isinstance to cater for the inheritence or explcitly check for VIFOpenVSwitch first with a noop","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            ])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _plug_vhostuser(self, vif, instance_info):"},{"line_number":84,"context_line":"        linux_net.create_ovs_vif_port("},{"line_number":85,"context_line":"            vif.network.bridge,"},{"line_number":86,"context_line":"            OvsPlugin.gen_port_name(\"vhu\", vif.id),"},{"line_number":87,"context_line":"            vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_ee20709c","line":84,"updated":"2016-06-18 11:19:27.000000000","message":"we should call  linux_net.ensure_ovs_bridge here with datapath netdev","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"00faad321294c1dc15b35c5f306b2cee39b11853","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            ])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _plug_vhostuser(self, vif, instance_info):"},{"line_number":84,"context_line":"        linux_net.create_ovs_vif_port("},{"line_number":85,"context_line":"            vif.network.bridge,"},{"line_number":86,"context_line":"            OvsPlugin.gen_port_name(\"vhu\", vif.id),"},{"line_number":87,"context_line":"            vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_4744a673","line":84,"in_reply_to":"3aaa91ec_d8035a75","updated":"2016-06-21 22:12:49.000000000","message":"Done","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            ])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def _plug_vhostuser(self, vif, instance_info):"},{"line_number":84,"context_line":"        linux_net.create_ovs_vif_port("},{"line_number":85,"context_line":"            vif.network.bridge,"},{"line_number":86,"context_line":"            OvsPlugin.gen_port_name(\"vhu\", vif.id),"},{"line_number":87,"context_line":"            vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_d8035a75","line":84,"in_reply_to":"7aa08908_ee20709c","updated":"2016-06-21 20:47:24.000000000","message":"+1","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a4cbd7822df9db5e598a3f47701c3e1081b56be5","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            linux_net.create_veth_pair(v1_name, v2_name,"},{"line_number":108,"context_line":"                                       self.config.network_device_mtu)"},{"line_number":109,"context_line":"            linux_net.add_bridge_port(vif.bridge_name, v1_name)"},{"line_number":110,"context_line":"            linux_net.create_ovs_vif_port("},{"line_number":111,"context_line":"                vif.network.bridge,"},{"line_number":112,"context_line":"                v2_name,"},{"line_number":113,"context_line":"                vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_8e30ccea","line":110,"updated":"2016-06-18 11:19:27.000000000","message":"we should call  linux_net.ensure_ovs_bridge here with datapath system","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"00faad321294c1dc15b35c5f306b2cee39b11853","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            linux_net.create_veth_pair(v1_name, v2_name,"},{"line_number":108,"context_line":"                                       self.config.network_device_mtu)"},{"line_number":109,"context_line":"            linux_net.add_bridge_port(vif.bridge_name, v1_name)"},{"line_number":110,"context_line":"            linux_net.create_ovs_vif_port("},{"line_number":111,"context_line":"                vif.network.bridge,"},{"line_number":112,"context_line":"                v2_name,"},{"line_number":113,"context_line":"                vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_675ba255","line":110,"in_reply_to":"3aaa91ec_58d12afb","updated":"2016-06-21 22:12:49.000000000","message":"Done","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"efdd9acda3a2c62a2ed8390e1766273c2b84027e","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            linux_net.create_veth_pair(v1_name, v2_name,"},{"line_number":108,"context_line":"                                       self.config.network_device_mtu)"},{"line_number":109,"context_line":"            linux_net.add_bridge_port(vif.bridge_name, v1_name)"},{"line_number":110,"context_line":"            linux_net.create_ovs_vif_port("},{"line_number":111,"context_line":"                vif.network.bridge,"},{"line_number":112,"context_line":"                v2_name,"},{"line_number":113,"context_line":"                vif.port_profile.interface_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_58d12afb","line":110,"in_reply_to":"7aa08908_8e30ccea","updated":"2016-06-21 20:47:24.000000000","message":"+1","commit_id":"1beb3d97d8809dd33193600e88d69e223d9efb9c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7fad95e2ffefeeeaaca16fcd1555fd4f579fa87d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        # unplug() method."},{"line_number":134,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":135,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":136,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":137,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge,"},{"line_number":138,"context_line":"                                        constants.OVS_DATAPATH_SYSTEM)"},{"line_number":139,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":140,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":141,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_a50f30e0","line":138,"range":{"start_line":136,"start_character":2,"end_line":138,"end_character":70},"updated":"2016-06-22 08:03:08.000000000","message":"im still not sure if this will work due to the timeing.\n\nthe plug method is called after the vm is started in a paused state. so libvirt will have already tried to add the tap to the bridge before we create it here.\n\nto support this usecase if libvirt will not create th bridge itself i think we will have to disable libvirt native ovs support and delegate it entirely to os-vif.\n\nin the long run that might be better anyway as its is at least consistent and os-vif really should not be assuming libvirt.","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6287070c5a294474205d939e844816d7f0b20fdf","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        # unplug() method."},{"line_number":134,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":135,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":136,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":137,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge,"},{"line_number":138,"context_line":"                                        constants.OVS_DATAPATH_SYSTEM)"},{"line_number":139,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":140,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":141,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_5fcb94a5","line":138,"range":{"start_line":136,"start_character":2,"end_line":138,"end_character":70},"in_reply_to":"3aaa91ec_6b221a03","updated":"2016-06-22 17:59:15.000000000","message":"have you tested this without hybrid plug?\nyou can do this by disableing security groups on the neutron port.\n\nyou are right the vm will be in a pasused state when this code runs.\n\nwhen you us non hybrid plug method the following code is executed to generate the interface definition\n\nhttps://github.com/openstack/nova/blob/f283bc44492d04d47179392fa9e05982644f45f4/nova/virt/libvirt/designer.py#L64-L74\ndef set_vif_host_backend_ovs_config(conf, brname, interfaceid, tapname\u003dNone):\n    \"\"\"Populate a LibvirtConfigGuestInterface instance\n    with host backend details for an OpenVSwitch bridge.\n    \"\"\"\n\n    conf.net_type \u003d \"bridge\"\n    conf.source_dev \u003d brname\n    conf.vporttype \u003d \"openvswitch\"\n    conf.add_vport_param(\"interfaceid\", interfaceid)\n    if tapname:\nconf.target_dev \u003d tapname\n\n\nthis defines an ovs port profile in the libvirt xml that tells libvirt to add the tap to the ovs bridge.\n\nwhen you use hybrid plug the port profile is not set.\n\nhttps://github.com/openstack/nova/blob/f283bc44492d04d47179392fa9e05982644f45f4/nova/virt/libvirt/designer.py#L40-L47\ndef set_vif_host_backend_bridge_config(conf, brname, tapname\u003dNone):\n    \"\"\"Populate a LibvirtConfigGuestInterface instance\n    with host backend details for a software bridge.\n    \"\"\"\n    conf.net_type \u003d \"bridge\"\n    conf.source_dev \u003d brname\n    if tapname:\nconf.target_dev \u003d tapname\n\nin the hybrid plug case nova currently call add-port on ovs\nin the non hybrid plug case libvirt does but im not sure if that happens before the vm enters the paused state or after it is resumed.\n\n\n@Daniel Berrange your libvirt knowlage would be usefully here.\n\nif libvirt adds the interface to the ovs bridge when the instance is resumed then this will work fine as written.","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"f432547f0cf27bc622ab951d2481c8795c87c0b3","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        # unplug() method."},{"line_number":134,"context_line":"        # Is this a bug that should be handled separately? Why is"},{"line_number":135,"context_line":"        # VIFOpenVSwitch a subclass of VIFBridge?"},{"line_number":136,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":137,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge,"},{"line_number":138,"context_line":"                                        constants.OVS_DATAPATH_SYSTEM)"},{"line_number":139,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":140,"context_line":"            self._plug_bridge(vif, instance_info)"},{"line_number":141,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_6b221a03","line":138,"range":{"start_line":136,"start_character":2,"end_line":138,"end_character":70},"in_reply_to":"3aaa91ec_a50f30e0","updated":"2016-06-22 17:31:05.000000000","message":"I think libvirt has some kind of \"retry mechanism\" that will continue to check for the bridge existence until it is available to add the vif port. If it didn\u0027t have this mechanism already, then the hybrid_ovs strategy wouldn\u0027t be functional either. At the time of plugging, the qbr linux bridge hasn\u0027t been created yet, even though it\u0027s specified in the instance\u0027s libvirt xml config file as the bridge to add the vif to.\n\nSo because of that I don\u0027t believe there is a timing issue here. I\u0027ve also tested out the earlier strategy of having Nova create the trunk bridge *and* the first patch port pair in devstack, and the vif had no issue getting added to the trunk bridge.","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"53bc8e5ef98f23b5ccc87cff916d117052cad056","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":172,"context_line":"            pass  # nothing needs to be done in this case"},{"line_number":173,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":174,"context_line":"            self._unplug_bridge(vif, instance_info)"},{"line_number":175,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_9831cbef","line":172,"updated":"2016-06-21 23:02:43.000000000","message":"why is this a no-op?","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"a9f3150740227cc90d1c9d67eccebb7861f957cc","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":172,"context_line":"            pass  # nothing needs to be done in this case"},{"line_number":173,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":174,"context_line":"            self._unplug_bridge(vif, instance_info)"},{"line_number":175,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_856fa391","line":172,"in_reply_to":"3aaa91ec_9831cbef","updated":"2016-06-21 23:53:15.000000000","message":"If the agent handles the bridge deletion, then nothing needs to be done here. If we want the symmetry of os-vif also deleting the bridge if it\u0027s created it, then that would be done here. That would require os-vif adding/getting metadata to/from the bridge in order to know when to delete the bridge (trunk bridge) and when to keep it (br-int).","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f1cff653fbc78ac570b27267087518596558673","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                       self.config.network_device_mtu)"},{"line_number":111,"context_line":"            linux_net.add_bridge_port(vif.bridge_name, v1_name)"},{"line_number":112,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge,"},{"line_number":113,"context_line":"                                        constants.OVS_DATAPATH_SYSTEM)"},{"line_number":114,"context_line":"            linux_net.create_ovs_vif_port("},{"line_number":115,"context_line":"                vif.network.bridge,"},{"line_number":116,"context_line":"                v2_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_3ad5f6b8","line":113,"updated":"2016-06-22 18:28:19.000000000","message":"Hmm, nice catch. Not sure how we missed this. The above is ensuring that the qbrXXXXX bridge device that gets iptables rules applied to it is created on the host system. In the legacy OVS hybrid world, this qbrXXXXXX bridge device was necessary since OVS cannot apply security group rules directly to the tap device attached to an OVS port.","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"246b5b739b5b3590558b343bf41fe92d03966ce7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                                       self.config.network_device_mtu)"},{"line_number":111,"context_line":"            linux_net.add_bridge_port(vif.bridge_name, v1_name)"},{"line_number":112,"context_line":"            linux_net.ensure_ovs_bridge(vif.network.bridge,"},{"line_number":113,"context_line":"                                        constants.OVS_DATAPATH_SYSTEM)"},{"line_number":114,"context_line":"            linux_net.create_ovs_vif_port("},{"line_number":115,"context_line":"                vif.network.bridge,"},{"line_number":116,"context_line":"                v2_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_1090d942","line":113,"in_reply_to":"3aaa91ec_3ad5f6b8","updated":"2016-06-22 19:09:59.000000000","message":"Right, but this isn\u0027t totally a gotcha because in most cases this will be \u0027br-int\u0027 which is typically always created by the OVS agent. We are implementing the vlan-aware-vms Neutron spec, and one of the things that will be changing for trunk ports is that Neutron will be passing a new bridge name in the vif_details, i.e. \"tbr-\u003cport id prefix\u003e\". Unlike with \u0027br-int\u0027, that bridge won\u0027t already exist, hence the need for os-vif to create it. The OVS agent will then detect the new vif port and create the necessary connections from tbr-### to br-int.\n\nIf you\u0027re more interested in the vlan-aware-vms stuff, you should take a look at [1]. Skip down to the \"Implementation Trunk Bridge (Option C)\" section.\n\n[1] https://review.openstack.org/#/c/318317/6/doc/source/devref/openvswitch_agent.rst","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f1cff653fbc78ac570b27267087518596558673","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":166,"context_line":"            pass  # nothing needs to be done in this case"},{"line_number":167,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":168,"context_line":"            self._unplug_bridge(vif, instance_info)"},{"line_number":169,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_9adceae5","line":166,"updated":"2016-06-22 18:28:19.000000000","message":"Out of curiosity, nothing needs to be done here because the OVS bridge device may be used for \u003e1 instance\u0027s firewall rules? Or because of some other reason? Might be good to expand your comment with the answer :)","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"246b5b739b5b3590558b343bf41fe92d03966ce7","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                profile\u003dvif.port_profile.__class__.__name__)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        if isinstance(vif, objects.vif.VIFOpenVSwitch):"},{"line_number":166,"context_line":"            pass  # nothing needs to be done in this case"},{"line_number":167,"context_line":"        elif isinstance(vif, objects.vif.VIFBridge):"},{"line_number":168,"context_line":"            self._unplug_bridge(vif, instance_info)"},{"line_number":169,"context_line":"        elif isinstance(vif, objects.vif.VIFVHostUser):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_506ee101","line":166,"in_reply_to":"3aaa91ec_9adceae5","updated":"2016-06-22 19:09:59.000000000","message":"In most cases this will be \u0027br-int\u0027 which can handle firewall rules for every port when using the native OVS firewall driver. When this is really a special bridge for a trunk port, the OVS agent will take care of deleting the bridge. That responsibility has yet to be decided upon, but in the current state of this patch it\u0027s the OVS agent\u0027s responsibility. We could also optionally delete the bridge here if we want the symmetry of os-vif creating/deleting trunk bridges.","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"}],"vif_plug_ovs/tests/test_linux_net.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7fad95e2ffefeeeaaca16fcd1555fd4f579fa87d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.assertEqual(expected, cmd)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":145,"context_line":"    def test_ensure_ovs_bridge(self, mock_vsctl):"},{"line_number":146,"context_line":"        bridge \u003d \u0027fake-bridge\u0027"},{"line_number":147,"context_line":"        dp_type \u003d \u0027fake-type\u0027"},{"line_number":148,"context_line":"        linux_net.ensure_ovs_bridge(bridge, dp_type)"},{"line_number":149,"context_line":"        args \u003d [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":150,"context_line":"                \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % dp_type]"},{"line_number":151,"context_line":"        mock_vsctl.assert_called_once_with(args)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":154,"context_line":"    @mock.patch.object(linux_net, \u0027_create_ovs_vif_cmd\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_e5a3f89c","line":151,"range":{"start_line":145,"start_character":3,"end_line":151,"end_character":48},"updated":"2016-06-22 08:03:08.000000000","message":"nit:\ncan you split this in two like \n\ntest_ovs_vif_port_with_type_vhostuser and \n test_ovs_vif_port_cmd\n\nbasically test_ensure_ovs_bridge should not fail if the sting sent to ovs-vsctl is changed in the future.\n\ntest_ensure_ovs_bridge should test that when \nensure_ovs_bridge is called _create_ovs_bridge_cmd is called with the appropreate arguments and vsctl is called(dont need to check args).\n\nthe second test test_create_ovs_bridge_cmd\nshould validate that correct sting is generated.","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"f432547f0cf27bc622ab951d2481c8795c87c0b3","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self.assertEqual(expected, cmd)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":145,"context_line":"    def test_ensure_ovs_bridge(self, mock_vsctl):"},{"line_number":146,"context_line":"        bridge \u003d \u0027fake-bridge\u0027"},{"line_number":147,"context_line":"        dp_type \u003d \u0027fake-type\u0027"},{"line_number":148,"context_line":"        linux_net.ensure_ovs_bridge(bridge, dp_type)"},{"line_number":149,"context_line":"        args \u003d [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":150,"context_line":"                \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge, \u0027datapath_type\u003d%s\u0027 % dp_type]"},{"line_number":151,"context_line":"        mock_vsctl.assert_called_once_with(args)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":154,"context_line":"    @mock.patch.object(linux_net, \u0027_create_ovs_vif_cmd\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_ce823c94","line":151,"range":{"start_line":145,"start_character":3,"end_line":151,"end_character":48},"in_reply_to":"3aaa91ec_e5a3f89c","updated":"2016-06-22 17:31:05.000000000","message":"Done","commit_id":"4c15d5f21b4b743b11815edb5ed1ec6a91a4ed8d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"570f563e8f0b4c0d3a6a34c521bceeb87f15b496","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                                            \u0027fake-type\u0027)"},{"line_number":142,"context_line":"        self.assertEqual(expected, cmd)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @mock.patch.object(linux_net, \u0027_create_ovs_bridge_cmd\u0027)"},{"line_number":145,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":146,"context_line":"    def test_ensure_ovs_bridge(self, mock_vsctl, mock_create_ovs_bridge):"},{"line_number":147,"context_line":"        bridge \u003d \u0027fake-bridge\u0027"},{"line_number":148,"context_line":"        dp_type \u003d \u0027fake-type\u0027"},{"line_number":149,"context_line":"        linux_net.ensure_ovs_bridge(bridge, dp_type)"},{"line_number":150,"context_line":"        mock_create_ovs_bridge.assert_called_once_with(bridge, dp_type)"},{"line_number":151,"context_line":"        self.assertTrue(mock_vsctl.called)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_create_ovs_bridge_cmd(self):"},{"line_number":154,"context_line":"        bridge \u003d \u0027fake-bridge\u0027"},{"line_number":155,"context_line":"        dp_type \u003d \u0027fake-type\u0027"},{"line_number":156,"context_line":"        expected \u003d [\u0027--\u0027, \u0027--may-exist\u0027, \u0027add-br\u0027, bridge,"},{"line_number":157,"context_line":"                    \u0027--\u0027, \u0027set\u0027, \u0027Bridge\u0027, bridge,"},{"line_number":158,"context_line":"                    \u0027datapath_type\u003d%s\u0027 % dp_type]"},{"line_number":159,"context_line":"        actual \u003d linux_net._create_ovs_bridge_cmd(bridge, dp_type)"},{"line_number":160,"context_line":"        self.assertEqual(expected, actual)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch.object(linux_net, \u0027_ovs_vsctl\u0027)"},{"line_number":163,"context_line":"    @mock.patch.object(linux_net, \u0027_create_ovs_vif_cmd\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_4e756530","line":160,"range":{"start_line":144,"start_character":3,"end_line":160,"end_character":42},"updated":"2016-06-23 18:49:15.000000000","message":"thanks for splinting these.\nthese tests look good","commit_id":"3d62d8e23c99bdf4fcfaab15c6dd2e341d5c9bfa"}],"vif_plug_ovs/tests/test_plugin.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d9182a5b6950ff71864414c7a3a7d15e9f9c4f9c","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            name\u003d\u0027demo\u0027,"},{"line_number":92,"context_line":"            uuid\u003d\u0027f0000000-0000-0000-0000-000000000001\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_plug_missing_port_profile(self):"},{"line_number":95,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":96,"context_line":"        del vif.port_profile"},{"line_number":97,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":98,"context_line":"        self.assertRaises(exception.MissingPortProfile,"},{"line_number":99,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_plug_wrong_port_profile(self):"},{"line_number":102,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":103,"context_line":"        vif.port_profile \u003d objects.vif.VIFPortProfile8021Qbh()"},{"line_number":104,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":105,"context_line":"        self.assertRaises(exception.WrongPortProfile,"},{"line_number":106,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def test_plug_ovs(self):"},{"line_number":109,"context_line":"        with mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027) as ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_2d874962","line":106,"range":{"start_line":94,"start_character":3,"end_line":106,"end_character":58},"updated":"2016-06-17 10:52:06.000000000","message":"these are unrelated changes","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"717d906026bc855e6aa72c017cf4694ff0f12dbf","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            name\u003d\u0027demo\u0027,"},{"line_number":92,"context_line":"            uuid\u003d\u0027f0000000-0000-0000-0000-000000000001\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_plug_missing_port_profile(self):"},{"line_number":95,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":96,"context_line":"        del vif.port_profile"},{"line_number":97,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":98,"context_line":"        self.assertRaises(exception.MissingPortProfile,"},{"line_number":99,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_plug_wrong_port_profile(self):"},{"line_number":102,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":103,"context_line":"        vif.port_profile \u003d objects.vif.VIFPortProfile8021Qbh()"},{"line_number":104,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":105,"context_line":"        self.assertRaises(exception.WrongPortProfile,"},{"line_number":106,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def test_plug_ovs(self):"},{"line_number":109,"context_line":"        with mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027) as ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_d5ef201b","line":106,"range":{"start_line":94,"start_character":3,"end_line":106,"end_character":58},"in_reply_to":"7aa08908_2d874962","updated":"2016-06-17 14:56:06.000000000","message":"Should I get rid of them even though they don\u0027t have any coverage yet?","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"15eeccf667de6edcef8f46958e40db0508baab86","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            name\u003d\u0027demo\u0027,"},{"line_number":92,"context_line":"            uuid\u003d\u0027f0000000-0000-0000-0000-000000000001\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_plug_missing_port_profile(self):"},{"line_number":95,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":96,"context_line":"        del vif.port_profile"},{"line_number":97,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":98,"context_line":"        self.assertRaises(exception.MissingPortProfile,"},{"line_number":99,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_plug_wrong_port_profile(self):"},{"line_number":102,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":103,"context_line":"        vif.port_profile \u003d objects.vif.VIFPortProfile8021Qbh()"},{"line_number":104,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":105,"context_line":"        self.assertRaises(exception.WrongPortProfile,"},{"line_number":106,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def test_plug_ovs(self):"},{"line_number":109,"context_line":"        with mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027) as ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_2578e47d","line":106,"range":{"start_line":94,"start_character":3,"end_line":106,"end_character":58},"in_reply_to":"7aa08908_c1563e5d","updated":"2016-06-17 20:02:28.000000000","message":"Alright, I\u0027ll remove them from this patch, and we can add coverage later.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3362ceef083aeb8db4f0d4b23c7be69b0f3574e2","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            name\u003d\u0027demo\u0027,"},{"line_number":92,"context_line":"            uuid\u003d\u0027f0000000-0000-0000-0000-000000000001\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_plug_missing_port_profile(self):"},{"line_number":95,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":96,"context_line":"        del vif.port_profile"},{"line_number":97,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":98,"context_line":"        self.assertRaises(exception.MissingPortProfile,"},{"line_number":99,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_plug_wrong_port_profile(self):"},{"line_number":102,"context_line":"        vif \u003d copy.deepcopy(self.vif_ovs_bridge)"},{"line_number":103,"context_line":"        vif.port_profile \u003d objects.vif.VIFPortProfile8021Qbh()"},{"line_number":104,"context_line":"        plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":105,"context_line":"        self.assertRaises(exception.WrongPortProfile,"},{"line_number":106,"context_line":"                          plugin.plug, vif, self.instance)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def test_plug_ovs(self):"},{"line_number":109,"context_line":"        with mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027) as ("}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_c1563e5d","line":106,"range":{"start_line":94,"start_character":3,"end_line":106,"end_character":58},"in_reply_to":"7aa08908_d5ef201b","updated":"2016-06-17 16:19:20.000000000","message":"it would better to put them into a different patch.\n\nthere are quite a few tests that should be ported form \nnova. but i expect we will improve this going forward.","commit_id":"5bfa77c33543bc28e0cd930bd098e2b7b044b26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f1cff653fbc78ac570b27267087518596558673","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.profile_ovs \u003d objects.vif.VIFPortProfileOpenVSwitch("},{"line_number":62,"context_line":"            interface_id\u003d\u0027e65867e0-9340-4a7f-a256-09af6eb7a3aa\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.vif_ovs_bridge \u003d objects.vif.VIFBridge("},{"line_number":65,"context_line":"            id\u003d\u0027b679325f-ca89-4ee0-a8be-6db1409b69ea\u0027,"},{"line_number":66,"context_line":"            address\u003d\u0027ca:fe:de:ad:be:ef\u0027,"},{"line_number":67,"context_line":"            network\u003dself.network_ovs,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_7ad77ebf","line":64,"updated":"2016-06-22 18:28:19.000000000","message":"Perhaps we can call this vif_ovs_hybrid to make it clearer that it\u0027s referring to the legacy OVS hybrid setup?","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4fe6ea80e0e720b6bd163b2a12f85fbfeabc9c2c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.profile_ovs \u003d objects.vif.VIFPortProfileOpenVSwitch("},{"line_number":62,"context_line":"            interface_id\u003d\u0027e65867e0-9340-4a7f-a256-09af6eb7a3aa\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.vif_ovs_bridge \u003d objects.vif.VIFBridge("},{"line_number":65,"context_line":"            id\u003d\u0027b679325f-ca89-4ee0-a8be-6db1409b69ea\u0027,"},{"line_number":66,"context_line":"            address\u003d\u0027ca:fe:de:ad:be:ef\u0027,"},{"line_number":67,"context_line":"            network\u003dself.network_ovs,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_da6e4f2e","line":64,"in_reply_to":"3aaa91ec_75acaf35","updated":"2016-06-23 10:55:11.000000000","message":"that is because VIFBridge has nothing to do with hybrid plug.\n\nit maps to the bridge interface type in libvirt.\n\novs is a subtype of that in libvirt hence the VIFOpenVSwitch is a subtype of VIFBridge in the nova and now os-vif class structure.","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"246b5b739b5b3590558b343bf41fe92d03966ce7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        self.profile_ovs \u003d objects.vif.VIFPortProfileOpenVSwitch("},{"line_number":62,"context_line":"            interface_id\u003d\u0027e65867e0-9340-4a7f-a256-09af6eb7a3aa\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.vif_ovs_bridge \u003d objects.vif.VIFBridge("},{"line_number":65,"context_line":"            id\u003d\u0027b679325f-ca89-4ee0-a8be-6db1409b69ea\u0027,"},{"line_number":66,"context_line":"            address\u003d\u0027ca:fe:de:ad:be:ef\u0027,"},{"line_number":67,"context_line":"            network\u003dself.network_ovs,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_75acaf35","line":64,"in_reply_to":"3aaa91ec_7ad77ebf","updated":"2016-06-22 19:09:59.000000000","message":"I think that would make sense, yes. The confusing bit to me is that VIFOpenVSwitch inherits from VIFBridge, yet VIFOpenVSwitch doesn\u0027t require the hybrid_ovs bits from VIFBridge.","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f1cff653fbc78ac570b27267087518596558673","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            address\u003d\u0027ca:fe:de:ad:be:ef\u0027,"},{"line_number":75,"context_line":"            network\u003dself.network_ovs,"},{"line_number":76,"context_line":"            dev_name\u003d\u0027tap-xxx-yyy-zzz\u0027,"},{"line_number":77,"context_line":"            bridge_name\u003d\"br-xxx-yyy\","},{"line_number":78,"context_line":"            port_profile\u003dself.profile_ovs)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.vif_vhostuser \u003d objects.vif.VIFVHostUser("}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_dae672b3","line":77,"updated":"2016-06-22 18:28:19.000000000","message":"So, in the VIFOpenVSwitch model, the above isn\u0027t ever used, right?","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"246b5b739b5b3590558b343bf41fe92d03966ce7","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            address\u003d\u0027ca:fe:de:ad:be:ef\u0027,"},{"line_number":75,"context_line":"            network\u003dself.network_ovs,"},{"line_number":76,"context_line":"            dev_name\u003d\u0027tap-xxx-yyy-zzz\u0027,"},{"line_number":77,"context_line":"            bridge_name\u003d\"br-xxx-yyy\","},{"line_number":78,"context_line":"            port_profile\u003dself.profile_ovs)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        self.vif_vhostuser \u003d objects.vif.VIFVHostUser("}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_15644b20","line":77,"in_reply_to":"3aaa91ec_dae672b3","updated":"2016-06-22 19:09:59.000000000","message":"Right, bridge_name is ignored yet is inherited from VIFBridge.","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0f1cff653fbc78ac570b27267087518596558673","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":106,"context_line":"            plugin.unplug(self.vif_ovs, self.instance)"},{"line_number":107,"context_line":"            delete_bridge.assert_not_called()"},{"line_number":108,"context_line":"            delete_ovs_vif_port.assert_not_called()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_plug_ovs_bridge(self):"},{"line_number":111,"context_line":"        calls \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_bae1e69c","line":108,"updated":"2016-06-22 18:28:19.000000000","message":"assert_not_called() is not a method of Py2.7\u0027s mock.Mock() class, therefore the above isn\u0027t actually asserting anything under python2.7 (it\u0027s just another magic-mocked method...).\n\nPlease change the above occurrences to use the following pattern, which works on both Py3K and python2.7:\n\n self.assertFalse(delete_ovs_vif_port.called)","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"246b5b739b5b3590558b343bf41fe92d03966ce7","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            plugin \u003d ovs.OvsPlugin.load(\"ovs\")"},{"line_number":106,"context_line":"            plugin.unplug(self.vif_ovs, self.instance)"},{"line_number":107,"context_line":"            delete_bridge.assert_not_called()"},{"line_number":108,"context_line":"            delete_ovs_vif_port.assert_not_called()"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_plug_ovs_bridge(self):"},{"line_number":111,"context_line":"        calls \u003d {"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_5021c19e","line":108,"in_reply_to":"3aaa91ec_bae1e69c","updated":"2016-06-22 19:09:59.000000000","message":"woops, I found a lot of instances of this in the Neutron unit tests and assumed it was a real thing. I guess not :)","commit_id":"a0b2bcc607b91df9a18fded147a8d63a75fff431"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b235719d43d2ad5ab57f1f16b09d15070472c0a2","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                                            constants.OVS_DATAPATH_NETDEV)]"},{"line_number":175,"context_line":"        }"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        with nested("},{"line_number":178,"context_line":"                mock.patch.object(linux_net, \u0027create_ovs_vif_port\u0027),"},{"line_number":179,"context_line":"                mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027)"},{"line_number":180,"context_line":"        ) as (create_ovs_vif_port, ensure_ovs_bridge):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_259a79b9","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":20},"updated":"2016-06-24 20:04:51.000000000","message":"Just noticing this.  We removed all uses of nested from neutron.  It isn\u0027t needed at all [1].\n\nBut, I see its used all over in this test module, so I won\u0027t vote negatively for this.\n\n [1] https://bugs.launchpad.net/nova/+bug/1428424","commit_id":"3d62d8e23c99bdf4fcfaab15c6dd2e341d5c9bfa"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f54ac0731b6217b36a52dd4d9ac7f9722d89d837","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                                            constants.OVS_DATAPATH_NETDEV)]"},{"line_number":175,"context_line":"        }"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        with nested("},{"line_number":178,"context_line":"                mock.patch.object(linux_net, \u0027create_ovs_vif_port\u0027),"},{"line_number":179,"context_line":"                mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027)"},{"line_number":180,"context_line":"        ) as (create_ovs_vif_port, ensure_ovs_bridge):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_a07c62ec","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":20},"in_reply_to":"3aaa91ec_259a79b9","updated":"2016-06-27 13:09:23.000000000","message":"hi yes i remember that.\n\ni actually want to rework all the unit test to both remove with nested and to convert form the   mock.patch.object style to the @mock style of unit tests. we have both currently.\n\nremoving the nested statements is on my todo list but i would prefer to keep consistent within the file and then to a complete replacement of the test with the update form instead of mixing mocking styles in the same file.","commit_id":"3d62d8e23c99bdf4fcfaab15c6dd2e341d5c9bfa"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2ca6e1c32edebd2b656d2810e47ca7caca87e87d","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                                            constants.OVS_DATAPATH_NETDEV)]"},{"line_number":175,"context_line":"        }"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        with nested("},{"line_number":178,"context_line":"                mock.patch.object(linux_net, \u0027create_ovs_vif_port\u0027),"},{"line_number":179,"context_line":"                mock.patch.object(linux_net, \u0027ensure_ovs_bridge\u0027)"},{"line_number":180,"context_line":"        ) as (create_ovs_vif_port, ensure_ovs_bridge):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3aaa91ec_abe069fb","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":20},"in_reply_to":"3aaa91ec_a07c62ec","updated":"2016-06-28 21:09:23.000000000","message":"+1","commit_id":"3d62d8e23c99bdf4fcfaab15c6dd2e341d5c9bfa"}]}
