)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"97db25444b8afa3a0cedecc513b89e0b26f6ad91","unresolved":true,"context_lines":[{"line_number":12,"context_line":"port (VM\u0027s NIC port) processing procedure:"},{"line_number":13,"context_line":"1. nova creates port"},{"line_number":14,"context_line":"2. the \u0027openvswitch\u0027 mechinism driver inserts provisioning block"},{"line_number":15,"context_line":"   for this port"},{"line_number":16,"context_line":"3. nova calls related interface to plug the device"},{"line_number":17,"context_line":"4. L2-agent sets the flows for the port and call update_device_list"},{"line_number":18,"context_line":"   to neutron-server"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"878172c5_cc17c7ac","line":15,"updated":"2021-06-22 07:49:28.000000000","message":"this isn\u0027t main reason of the provisioning blocks. Such block is also set by e.g. DHCP agent (or any other, third party driver can set it too) and it is to avoid switching port to be active before ALL of the drivers will finish their job with the port.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"97db25444b8afa3a0cedecc513b89e0b26f6ad91","unresolved":true,"context_lines":[{"line_number":33,"context_line":"   to neutron-server"},{"line_number":34,"context_line":"5. neutron-server sets port status to ACTIVE directly, then done!"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"This patch will set the ml2 ovs to skip the provisioning_block."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"[1] https://docs.openstack.org/neutron/latest/contributor/internals/provisioning_blocks.html"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1e5dc876_46549fdc","line":36,"updated":"2021-06-22 07:49:28.000000000","message":"I agree with that change, there is no point to set provisioning block for router, dhcp or metadata (ovn) ports. It\u0027s nice optimization but I agree with Oleg\u0027s comment from one of the previous PS - this should be done for all mechanism drivers. This mechanism is the same for them.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e630eceeb2e404aef5af6ebffc98c082bb8790eb","unresolved":true,"context_lines":[{"line_number":33,"context_line":"   to neutron-server"},{"line_number":34,"context_line":"5. neutron-server sets port status to ACTIVE directly, then done!"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"This patch will set the ml2 ovs to skip the provisioning_block."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"[1] https://docs.openstack.org/neutron/latest/contributor/internals/provisioning_blocks.html"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"f2e3d987_05a65c37","line":36,"in_reply_to":"1e5dc876_46549fdc","updated":"2021-06-22 10:31:37.000000000","message":"Sure, hope no bad things happen beyond the neutron scope.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"}],"neutron/plugins/ml2/common/constants.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"97db25444b8afa3a0cedecc513b89e0b26f6ad91","unresolved":true,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"390c0107_e071a751","line":16,"range":{"start_line":16,"start_character":42,"end_line":16,"end_character":58},"updated":"2021-06-22 07:49:28.000000000","message":"nit: why You don\u0027t add it now to common constants but added new file here?","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e630eceeb2e404aef5af6ebffc98c082bb8790eb","unresolved":true,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9bebbbda_a3484bb0","line":16,"range":{"start_line":16,"start_character":42,"end_line":16,"end_character":58},"in_reply_to":"390c0107_e071a751","updated":"2021-06-22 10:31:37.000000000","message":"Involved with neutron-lib will make the develop procedure expand too long, add the neutron-lib code, wait for neutron-lib merge, wait for neutron-lib new release, wait for new neutron-lib min version update for Neutron. Then neutron can do next step work...","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f15f8fbf95ece51193b068ce5d1f6b15229b744","unresolved":true,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"}],"source_content_type":"text/x-python","patch_set":4,"id":"67045dac_341752b1","line":16,"range":{"start_line":16,"start_character":42,"end_line":16,"end_character":58},"in_reply_to":"9bebbbda_a3484bb0","updated":"2021-06-30 10:52:09.000000000","message":"But we already have e.g. https://github.com/openstack/neutron/blob/master/neutron/plugins/common/constants.py and https://github.com/openstack/neutron/blob/master/neutron/common/_constants.py why not put it temporary there instead of new file?","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"97db25444b8afa3a0cedecc513b89e0b26f6ad91","unresolved":true,"context_lines":[{"line_number":23,"context_line":"    constants.DEVICE_OWNER_DHCP,"},{"line_number":24,"context_line":"    constants.DEVICE_OWNER_AGENT_GW,"},{"line_number":25,"context_line":"    constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":26,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ebcddbf_33b0938c","line":26,"updated":"2021-06-22 07:49:28.000000000","message":"All of those device owners starts with DEVICE_OWNER_NETWORK_PREFIX, can\u0027t You simply change Your check to test if device ownere starts with DEVICE_OWNER_NETWORK_PREFIX and skip it then? I think it would be completely valid.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e630eceeb2e404aef5af6ebffc98c082bb8790eb","unresolved":true,"context_lines":[{"line_number":23,"context_line":"    constants.DEVICE_OWNER_DHCP,"},{"line_number":24,"context_line":"    constants.DEVICE_OWNER_AGENT_GW,"},{"line_number":25,"context_line":"    constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":26,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"fc494d9e_36915a88","line":26,"in_reply_to":"3ebcddbf_33b0938c","updated":"2021-06-22 10:31:37.000000000","message":"Not sure if there are some port types starts with \"network:\" but want the PB. So I don\u0027t want to make radical changes when it\u0027s not fully tested.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"deb08644f32855035e749d504d1c7204beb3a987","unresolved":true,"context_lines":[{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"},{"line_number":20,"context_line":"    constants.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":5,"id":"a5f3c36f_08971b22","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":16},"updated":"2021-07-07 14:02:31.000000000","message":"+1\n\nI think this list is correct. At least we are not including any port that should be processed in \"_insert_provisioning_block\".","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"ef4947b77272dd9af73d6c3f568e21369eaadf55","unresolved":true,"context_lines":[{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"},{"line_number":20,"context_line":"    constants.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":5,"id":"630e8db8_d95e9844","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":17},"updated":"2021-07-09 03:19:04.000000000","message":"missing \n\nDEVICE_ID_RESERVED_DHCP_PORT","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e16bf7dd59198d676d5d7033a63a59588355b076","unresolved":true,"context_lines":[{"line_number":14,"context_line":"from neutron_lib import constants"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":17,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":18,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":19,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"},{"line_number":20,"context_line":"    constants.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":5,"id":"f3c2c6eb_e910830a","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":17},"in_reply_to":"630e8db8_d95e9844","updated":"2021-07-12 07:02:09.000000000","message":"\"DEVICE_ID_RESERVED_DHCP_PORT\" is a fake deivce ID for network:dhcp port. Here is the list of device_owners.","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"}],"neutron/plugins/ml2/drivers/mech_agent.py":[{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"ef4947b77272dd9af73d6c3f568e21369eaadf55","unresolved":true,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def create_port_precommit(self, context):"},{"line_number":61,"context_line":"        port \u003d context.current"},{"line_number":62,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":63,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":64,"context_line":"            return"},{"line_number":65,"context_line":"        self._insert_provisioning_block(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"f8b7a5b3_8250f7cc","line":62,"range":{"start_line":62,"start_character":17,"end_line":62,"end_character":29},"updated":"2021-07-09 03:19:04.000000000","message":"port.get(\u0027device_owner\u0027,\u0027\u0027) will be better","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e16bf7dd59198d676d5d7033a63a59588355b076","unresolved":true,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def create_port_precommit(self, context):"},{"line_number":61,"context_line":"        port \u003d context.current"},{"line_number":62,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":63,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":64,"context_line":"            return"},{"line_number":65,"context_line":"        self._insert_provisioning_block(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"acfb3452_498f1dbe","line":62,"range":{"start_line":62,"start_character":17,"end_line":62,"end_character":29},"in_reply_to":"f8b7a5b3_8250f7cc","updated":"2021-07-12 07:02:09.000000000","message":"Ports always have device_owner attribute, it is a fixed value. If it not have, there should be a bug from caller.","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f15f8fbf95ece51193b068ce5d1f6b15229b744","unresolved":true,"context_lines":[{"line_number":60,"context_line":"    def create_port_precommit(self, context):"},{"line_number":61,"context_line":"        port \u003d context.current"},{"line_number":62,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":63,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":64,"context_line":"            return"},{"line_number":65,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"db893569_c0038ed2","line":63,"range":{"start_line":63,"start_character":46,"end_line":63,"end_character":69},"updated":"2021-06-30 10:52:09.000000000","message":"and to be strict it is not set just for ports which You listed as port which don\u0027t needs it :)","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"0f15f8fbf95ece51193b068ce5d1f6b15229b744","unresolved":true,"context_lines":[{"line_number":60,"context_line":"    def create_port_precommit(self, context):"},{"line_number":61,"context_line":"        port \u003d context.current"},{"line_number":62,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":63,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":64,"context_line":"            return"},{"line_number":65,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"c3293302_68fb0d67","line":63,"range":{"start_line":63,"start_character":14,"end_line":63,"end_character":16},"updated":"2021-06-30 10:52:09.000000000","message":"nitty nit: I think it should be \"don\u0027t\" here","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"deb08644f32855035e749d504d1c7204beb3a987","unresolved":true,"context_lines":[{"line_number":67,"context_line":"    def update_port_precommit(self, context):"},{"line_number":68,"context_line":"        if context.host \u003d\u003d context.original_host:"},{"line_number":69,"context_line":"            return"},{"line_number":70,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _insert_provisioning_block(self, context):"},{"line_number":73,"context_line":"        # we insert a status barrier to prevent the port from transitioning"}],"source_content_type":"text/x-python","patch_set":5,"id":"383073f6_79456610","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":39},"updated":"2021-07-07 14:02:31.000000000","message":"What about during port update?","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d47f2bd315a82c3caa1594d5e80505ea8364acb9","unresolved":true,"context_lines":[{"line_number":67,"context_line":"    def update_port_precommit(self, context):"},{"line_number":68,"context_line":"        if context.host \u003d\u003d context.original_host:"},{"line_number":69,"context_line":"            return"},{"line_number":70,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _insert_provisioning_block(self, context):"},{"line_number":73,"context_line":"        # we insert a status barrier to prevent the port from transitioning"}],"source_content_type":"text/x-python","patch_set":5,"id":"1602895f_64601d15","line":70,"range":{"start_line":70,"start_character":13,"end_line":70,"end_character":39},"in_reply_to":"383073f6_79456610","updated":"2021-07-08 01:42:09.000000000","message":"Nice catch. I\u0027m not sure if there is some service port will create port without device owner and then update with it. In such case, the update action here should also skip the provisioning_block.","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"}],"neutron/plugins/ml2/drivers/openvswitch/mech_driver/mech_openvswitch.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1da9de2ca90b0b91df979a44c8d9f5989bd53016","unresolved":true,"context_lines":[{"line_number":36,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"# TODO(liuyulong): move to neutron-lib or common constants"},{"line_number":39,"context_line":"NO_PBLOCKS_TYPES \u003d ["},{"line_number":40,"context_line":"    constants.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":41,"context_line":"    constants.DEVICE_OWNER_HA_REPLICATED_INT,"},{"line_number":42,"context_line":"    constants.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":1,"id":"b5d49793_9279192b","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":20},"updated":"2021-06-02 07:31:45.000000000","message":"Maybe this can be set to types which need provisioning blocks, since there are still some other port types not in this list. For now, we miss the fg-device (DEVICE_OWNER_AGENT_GW) in fip-namespace, and the router interface for HA router (DEVICE_OWNER_ROUTER_HA_INTF) .","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5fee8e57ee2bde65f1020c36dc6822d78c4bfe41","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def create_port_precommit(self, context):"},{"line_number":130,"context_line":"        port \u003d context.current"},{"line_number":131,"context_line":"        if port[\u0027device_owner\u0027] in NO_PBLOCKS_TYPES:"},{"line_number":132,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_port(self, context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f941ab4_87ad8a41","line":133,"range":{"start_line":130,"start_character":8,"end_line":133,"end_character":18},"updated":"2021-06-02 07:35:21.000000000","message":"why not add this logic to _insert_provisioning_block() itself?","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"c734c0e75978a4873bb0a2c0ab98b6b62259d945","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def create_port_precommit(self, context):"},{"line_number":130,"context_line":"        port \u003d context.current"},{"line_number":131,"context_line":"        if port[\u0027device_owner\u0027] in NO_PBLOCKS_TYPES:"},{"line_number":132,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_port(self, context):"},{"line_number":137,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ebac513c_3a868a82","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":48},"updated":"2021-06-02 07:38:20.000000000","message":"this logic should be in AgentMechanismDriverBase, and there it should work for all mech drivers","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b510d4258226a798dc7d95e5667d812e3a1acdda","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def create_port_precommit(self, context):"},{"line_number":130,"context_line":"        port \u003d context.current"},{"line_number":131,"context_line":"        if port[\u0027device_owner\u0027] in NO_PBLOCKS_TYPES:"},{"line_number":132,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_port(self, context):"},{"line_number":137,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9c13bd33_641d8d99","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":48},"in_reply_to":"4176a9be_d07eb19a","updated":"2021-06-02 09:07:48.000000000","message":"DVR related code can work together with this, no matter the provisioning_block is inserted or not, it directly set port to ACTIVE.","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b0e8e75930d6e43b8ea6473d57d45cc6431ce97e","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def create_port_precommit(self, context):"},{"line_number":130,"context_line":"        port \u003d context.current"},{"line_number":131,"context_line":"        if port[\u0027device_owner\u0027] in NO_PBLOCKS_TYPES:"},{"line_number":132,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_port(self, context):"},{"line_number":137,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4176a9be_d07eb19a","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":48},"in_reply_to":"58ef8123_400270ee","updated":"2021-06-02 09:02:18.000000000","message":"This is mainly for ovs-agent for now. Because, I\u0027m not sure if all these serice port types are used by other drivers.","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"1a6cba3f2dddd35ae0896e887b15a1c6eb71931b","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def create_port_precommit(self, context):"},{"line_number":130,"context_line":"        port \u003d context.current"},{"line_number":131,"context_line":"        if port[\u0027device_owner\u0027] in NO_PBLOCKS_TYPES:"},{"line_number":132,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def bind_port(self, context):"},{"line_number":137,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"58ef8123_400270ee","line":134,"range":{"start_line":130,"start_character":8,"end_line":134,"end_character":48},"in_reply_to":"ebac513c_3a868a82","updated":"2021-06-02 07:54:00.000000000","message":"And another place where part of this logic is implemented (for DVR):\nhttps://opendev.org/openstack/neutron/src/branch/master/neutron/plugins/ml2/rpc.py#L312\n\nbut in ml2/rpc.py the provisioning_complete is skipped for DVR interface, not sure to tell the truth which direction can be better.","commit_id":"766288d591d162b7d0f61793437bfcb9301cc2e6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f74a7ee42c385e545b6e214e755db695ce5e3a91","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":123,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":124,"context_line":"            return"},{"line_number":125,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def bind_port(self, context):"},{"line_number":128,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"daf526f1_1acb9b93","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":48},"updated":"2021-06-03 08:35:26.000000000","message":"I still don\u0027t understand why not put logic #122-124 into _insert_provisioning_block() which should keep all needed checks. If we don\u0027t want to set provisioning blocks for said types of ports - it shouldn\u0027t matter which mech driver is it, it\u0027s more a scope of ml2 plugin.","commit_id":"b339ad5b2b0f56bbd54c9160cbcc74b0ee31a7d3"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"331d8c6d2542fc0020a63564e1b0fa7469088770","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":123,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":124,"context_line":"            return"},{"line_number":125,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def bind_port(self, context):"},{"line_number":128,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a0dd5df_fc23b69b","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":48},"in_reply_to":"a95dae60_fa5f222d","updated":"2021-06-10 07:12:39.000000000","message":"I still think this behavior should be consistent across ML2 mech drivers but I\u0027ll wait for other\u0027s opinion on this","commit_id":"b339ad5b2b0f56bbd54c9160cbcc74b0ee31a7d3"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"66b3954629714e690d87a31d3ea2a6b27bd6def0","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":123,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":124,"context_line":"            return"},{"line_number":125,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def bind_port(self, context):"},{"line_number":128,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"a95dae60_fa5f222d","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":48},"in_reply_to":"daf526f1_1acb9b93","updated":"2021-06-10 01:10:29.000000000","message":"Nothing special, just because in our production environment we only have ml2 ovs,  and we test this for ml2 ovs only. IMO, if others can test other drivers with the same change, I guess they can submit the patch to modify the specific driver as well. Until all drivers are changed, we should make such provisioning_block skipping to the necessary class one by one.","commit_id":"b339ad5b2b0f56bbd54c9160cbcc74b0ee31a7d3"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"97db25444b8afa3a0cedecc513b89e0b26f6ad91","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":123,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":124,"context_line":"            return"},{"line_number":125,"context_line":"        self._insert_provisioning_block(context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def bind_port(self, context):"},{"line_number":128,"context_line":"        vnic_type \u003d context.current.get(portbindings.VNIC_TYPE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"17f8d229_56b490ad","line":125,"updated":"2021-06-22 07:49:28.000000000","message":"I think it should be done in https://github.com/openstack/neutron/blob/1ad9ca56b07ffdc9f7e0bc6a62af61961b9128eb/neutron/plugins/ml2/drivers/mech_agent.py#L60 for all mech drivers. Or even in https://github.com/openstack/neutron/blob/1ad9ca56b07ffdc9f7e0bc6a62af61961b9128eb/neutron/db/provisioning_blocks.py#L44 to e.g. skip adding provisioning block by DHCP agent for such ports.","commit_id":"68c188db207945a5ab37ea69ca94660469723411"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"ef4947b77272dd9af73d6c3f568e21369eaadf55","unresolved":true,"context_lines":[{"line_number":1407,"context_line":"        if not cfg.CONF.enable_traditional_dhcp:"},{"line_number":1408,"context_line":"            return"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":1411,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":1412,"context_line":"            return"},{"line_number":1413,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"2c002a55_a4077661","line":1410,"range":{"start_line":1410,"start_character":17,"end_line":1410,"end_character":29},"updated":"2021-07-09 03:19:04.000000000","message":"same as above\n\nport.get(\u0027device_owner\u0027,\u0027\u0027)","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":33145,"name":"Kevin Li","email":"liwenhai3@huawei.com","username":"liwenhai"},"change_message_id":"ef4947b77272dd9af73d6c3f568e21369eaadf55","unresolved":true,"context_lines":[{"line_number":1408,"context_line":"            return"},{"line_number":1409,"context_line":""},{"line_number":1410,"context_line":"        if port[\u0027device_owner\u0027] in ml2_consts.NO_PBLOCKS_TYPES:"},{"line_number":1411,"context_line":"            # no set provisioning_block if it is neutron service port"},{"line_number":1412,"context_line":"            return"},{"line_number":1413,"context_line":""},{"line_number":1414,"context_line":"        subnet_ids \u003d [f[\u0027subnet_id\u0027] for f in port[\u0027fixed_ips\u0027]]"}],"source_content_type":"text/x-python","patch_set":5,"id":"fbad2043_4b814469","line":1411,"range":{"start_line":1411,"start_character":14,"end_line":1411,"end_character":69},"updated":"2021-07-09 03:19:04.000000000","message":"skip provisioning_block if it is a neutron service port","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"deb08644f32855035e749d504d1c7204beb3a987","unresolved":true,"context_lines":[{"line_number":1466,"context_line":"                                 resource_id\u003dresult[\u0027id\u0027],"},{"line_number":1467,"context_line":"                                 states\u003d(result,)))"},{"line_number":1468,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1469,"context_line":"            self._setup_dhcp_agent_provisioning_component(context, result)"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"        resource_extend.apply_funcs(\u0027ports\u0027, result, port_db)"},{"line_number":1472,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":5,"id":"a6a97386_607a6862","line":1469,"updated":"2021-07-07 14:02:31.000000000","message":"What about during port update?","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d47f2bd315a82c3caa1594d5e80505ea8364acb9","unresolved":true,"context_lines":[{"line_number":1466,"context_line":"                                 resource_id\u003dresult[\u0027id\u0027],"},{"line_number":1467,"context_line":"                                 states\u003d(result,)))"},{"line_number":1468,"context_line":"            self.mechanism_manager.create_port_precommit(mech_context)"},{"line_number":1469,"context_line":"            self._setup_dhcp_agent_provisioning_component(context, result)"},{"line_number":1470,"context_line":""},{"line_number":1471,"context_line":"        resource_extend.apply_funcs(\u0027ports\u0027, result, port_db)"},{"line_number":1472,"context_line":"        return result, mech_context"}],"source_content_type":"text/x-python","patch_set":5,"id":"02a22906_287b0d23","line":1469,"in_reply_to":"a6a97386_607a6862","updated":"2021-07-08 01:42:09.000000000","message":"Update also uses this function, and the device owner check is inside it.","commit_id":"d382c88bfa6c6eac8b9c6a0226e584098fad96d7"}]}
