)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle empty SR-IOV \u0027physical_device_mappings\u0027 config option"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027physical_device_mappings\u0027 config option is deprecated"},{"line_number":10,"context_line":"therefore the SRIOV agent should handle an empty mapping."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partial-bug: #1616442"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a629dbe_dcc9347a","line":9,"updated":"2016-11-08 16:00:19.000000000","message":"it should handle it irrelevant to deprecation, because this value is allowed.","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle empty SR-IOV \u0027physical_device_mappings\u0027 config option"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027physical_device_mappings\u0027 config option is deprecated"},{"line_number":10,"context_line":"therefore the SRIOV agent should handle an empty mapping."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partial-bug: #1616442"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a629dbe_744cbc70","line":9,"in_reply_to":"9a629dbe_dcc9347a","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":359,"context_line":"            embedded_switch.set_device_spoofcheck(pci_slot,"},{"line_number":360,"context_line":"                                                  enabled)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    # Note(edan): discover_devices method will be removed"},{"line_number":363,"context_line":"    # with \u0027physical_device_mappings\u0027"},{"line_number":364,"context_line":"    def discover_devices(self, device_mappings, exclude_devices):"},{"line_number":365,"context_line":"        \"\"\"Discover which Virtual functions to manage."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_7cebc8b0","line":362,"updated":"2016-11-08 16:00:19.000000000","message":"would it make more sense to include those notes in the patch deprecating the option?","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":359,"context_line":"            embedded_switch.set_device_spoofcheck(pci_slot,"},{"line_number":360,"context_line":"                                                  enabled)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    # Note(edan): discover_devices method will be removed"},{"line_number":363,"context_line":"    # with \u0027physical_device_mappings\u0027"},{"line_number":364,"context_line":"    def discover_devices(self, device_mappings, exclude_devices):"},{"line_number":365,"context_line":"        \"\"\"Discover which Virtual functions to manage."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_f19ffe00","line":362,"in_reply_to":"9a629dbe_7cebc8b0","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                self.create_emb_switch(phys_net, dev_name,"},{"line_number":376,"context_line":"                                       exclude_devices.get(dev_name, set()))"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    # Note(edan): physnet param will be removed with \u0027physical_device_mappings\u0027"},{"line_number":379,"context_line":"    # config option."},{"line_number":380,"context_line":"    def create_emb_switch(self, phys_net, dev_name, exclude_devices):"},{"line_number":381,"context_line":"        \"\"\"Create embedded switch."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_1c900c43","line":378,"range":{"start_line":378,"start_character":18,"end_line":378,"end_character":25},"updated":"2016-11-08 16:00:19.000000000","message":"no such param","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                self.create_emb_switch(phys_net, dev_name,"},{"line_number":376,"context_line":"                                       exclude_devices.get(dev_name, set()))"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    # Note(edan): physnet param will be removed with \u0027physical_device_mappings\u0027"},{"line_number":379,"context_line":"    # config option."},{"line_number":380,"context_line":"    def create_emb_switch(self, phys_net, dev_name, exclude_devices):"},{"line_number":381,"context_line":"        \"\"\"Create embedded switch."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_11a39250","line":378,"range":{"start_line":378,"start_character":18,"end_line":378,"end_character":25},"in_reply_to":"9a629dbe_1c900c43","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8b92d236222773321847033f61b7b53f4d1adc18","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    # Note(edan): phys_net param will be removed with"},{"line_number":379,"context_line":"    # \u0027physical_device_mappings\u0027 config option."},{"line_number":380,"context_line":"    def create_emb_switch(self, phys_net, dev_name, exclude_devices):"},{"line_number":381,"context_line":"        \"\"\"Create embedded switch."},{"line_number":382,"context_line":"        @param phys_net: physical network"},{"line_number":383,"context_line":"        @param dev_name: device name"},{"line_number":384,"context_line":"        @param exclude_devices: devices to ignore"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_8f2ee0a3","line":381,"updated":"2016-11-14 07:50:28.000000000","message":"nit add a new line","commit_id":"0aea0cba647dc26a43b8aa7a653417df7c5489b5"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"cb5737ae70c45c38eb768e44e7f1d5fecbbb2ded","unresolved":false,"context_lines":[{"line_number":378,"context_line":"    # Note(edan): phys_net param will be removed with"},{"line_number":379,"context_line":"    # \u0027physical_device_mappings\u0027 config option."},{"line_number":380,"context_line":"    def create_emb_switch(self, phys_net, dev_name, exclude_devices):"},{"line_number":381,"context_line":"        \"\"\"Create embedded switch."},{"line_number":382,"context_line":"        @param phys_net: physical network"},{"line_number":383,"context_line":"        @param dev_name: device name"},{"line_number":384,"context_line":"        @param exclude_devices: devices to ignore"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_6a917a52","line":381,"in_reply_to":"9a629dbe_8f2ee0a3","updated":"2016-11-14 08:01:19.000000000","message":"Done","commit_id":"0aea0cba647dc26a43b8aa7a653417df7c5489b5"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"a9e910b602e04be93cdfe3ced5ccd4d8edbf8c9d","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        @param pci_addr: VF PCI address"},{"line_number":99,"context_line":"        \"\"\""},{"line_number":100,"context_line":"        try:"},{"line_number":101,"context_line":"            interface \u003d os.listdir(cls.PF_INTERFACE_PATH % pci_addr)"},{"line_number":102,"context_line":"            if not interface:"},{"line_number":103,"context_line":"                raise OSError"},{"line_number":104,"context_line":"        except OSError:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a77a97e_1196ed92","line":101,"range":{"start_line":101,"start_character":12,"end_line":101,"end_character":21},"updated":"2016-11-17 13:05:44.000000000","message":"should be interfaces","commit_id":"d7123af50ae5c6d477869365b3ff82f748efb22e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":450,"context_line":"                else:"},{"line_number":451,"context_line":"                    LOG.warning(_LW(\"VF with PCI slot %(pci_slot)s is \""},{"line_number":452,"context_line":"                                    \"already assigned; skipping reset for \""},{"line_number":453,"context_line":"                                    \"\u0027%(rate_type)s\u0027  device configuration \""},{"line_number":454,"context_line":"                                    \"parameter\"),"},{"line_number":455,"context_line":"                                {\u0027pci_slot\u0027: pci_slot,"},{"line_number":456,"context_line":"                                 \u0027rate_type\u0027: rate_type})"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_5b08a491","line":453,"range":{"start_line":453,"start_character":52,"end_line":453,"end_character":53},"updated":"2016-11-25 11:57:47.000000000","message":"redundant space, that also resets existing translations for the message","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                dev_name \u003d esm.PciOsWrapper.get_pf_interface(pci_slot)"},{"line_number":200,"context_line":"                self.eswitch_mgr.create_emb_switch(\u0027\u0027, dev_name, set())"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    # Note(edan): setup_eswitch_mgr method will be removed"},{"line_number":203,"context_line":"    # with \u0027physical_device_mappings\u0027 config option"},{"line_number":204,"context_line":"    def setup_eswitch_mgr(self, device_mappings, exclude_devices\u003dNone):"},{"line_number":205,"context_line":"        exclude_devices \u003d exclude_devices or {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_9cd25cff","line":202,"updated":"2016-11-08 16:00:19.000000000","message":"ditto","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                dev_name \u003d esm.PciOsWrapper.get_pf_interface(pci_slot)"},{"line_number":200,"context_line":"                self.eswitch_mgr.create_emb_switch(\u0027\u0027, dev_name, set())"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    # Note(edan): setup_eswitch_mgr method will be removed"},{"line_number":203,"context_line":"    # with \u0027physical_device_mappings\u0027 config option"},{"line_number":204,"context_line":"    def setup_eswitch_mgr(self, device_mappings, exclude_devices\u003dNone):"},{"line_number":205,"context_line":"        exclude_devices \u003d exclude_devices or {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_918fa2cb","line":202,"in_reply_to":"9a629dbe_9cd25cff","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def scan_devices(self, registered_devices, updated_devices):"},{"line_number":210,"context_line":"        # When \u0027physical_device_mappings\u0027 is not used discover_devices method"},{"line_number":211,"context_line":"        # does not Create eswitch to devices."},{"line_number":212,"context_line":"        # create_eswitches is called here to create a eswitch to all new"},{"line_number":213,"context_line":"        # devices received from RPC update message"},{"line_number":214,"context_line":"        self._create_eswitches(updated_devices - registered_devices)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_3cba30c1","line":211,"range":{"start_line":211,"start_character":19,"end_line":211,"end_character":25},"updated":"2016-11-08 16:00:19.000000000","message":"lower case it","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def scan_devices(self, registered_devices, updated_devices):"},{"line_number":210,"context_line":"        # When \u0027physical_device_mappings\u0027 is not used discover_devices method"},{"line_number":211,"context_line":"        # does not Create eswitch to devices."},{"line_number":212,"context_line":"        # create_eswitches is called here to create a eswitch to all new"},{"line_number":213,"context_line":"        # devices received from RPC update message"},{"line_number":214,"context_line":"        self._create_eswitches(updated_devices - registered_devices)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_b14ae681","line":211,"range":{"start_line":211,"start_character":19,"end_line":211,"end_character":25},"in_reply_to":"9a629dbe_3cba30c1","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d7623cf286af031a7482b7763df366ebcae8f5ee","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def scan_devices(self, registered_devices, updated_devices):"},{"line_number":210,"context_line":"        # When \u0027physical_device_mappings\u0027 is not used discover_devices method"},{"line_number":211,"context_line":"        # does not Create eswitch to devices."},{"line_number":212,"context_line":"        # create_eswitches is called here to create a eswitch to all new"},{"line_number":213,"context_line":"        # devices received from RPC update message"},{"line_number":214,"context_line":"        self._create_eswitches(updated_devices - registered_devices)"},{"line_number":215,"context_line":"        curr_devices \u003d self.eswitch_mgr.get_assigned_devices_info()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_9ccb3c53","line":212,"range":{"start_line":212,"start_character":10,"end_line":212,"end_character":27},"updated":"2016-11-08 16:00:19.000000000","message":"no such method","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"914a309ee5e54df9d0051f4117d3b12f858760ed","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def scan_devices(self, registered_devices, updated_devices):"},{"line_number":210,"context_line":"        # When \u0027physical_device_mappings\u0027 is not used discover_devices method"},{"line_number":211,"context_line":"        # does not Create eswitch to devices."},{"line_number":212,"context_line":"        # create_eswitches is called here to create a eswitch to all new"},{"line_number":213,"context_line":"        # devices received from RPC update message"},{"line_number":214,"context_line":"        self._create_eswitches(updated_devices - registered_devices)"},{"line_number":215,"context_line":"        curr_devices \u003d self.eswitch_mgr.get_assigned_devices_info()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a629dbe_515a6a51","line":212,"range":{"start_line":212,"start_character":10,"end_line":212,"end_character":27},"in_reply_to":"9a629dbe_9ccb3c53","updated":"2016-11-08 17:26:30.000000000","message":"Done","commit_id":"01a9e30fc392f556926c34133667b0d2148cddf6"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"6a41ccd761ff10f05a3e1bfb88460cc584a38d77","unresolved":false,"context_lines":[{"line_number":209,"context_line":"    def scan_devices(self, registered_devices, updated_devices):"},{"line_number":210,"context_line":"        # When \u0027physical_device_mappings\u0027 is not used discover_devices method"},{"line_number":211,"context_line":"        # does not create eswitch to devices."},{"line_number":212,"context_line":"        # \u0027_create_eswitches\u0027 is called here to create a eswitch to all new"},{"line_number":213,"context_line":"        # devices received from RPC update message"},{"line_number":214,"context_line":"        self._create_eswitches(updated_devices - registered_devices)"},{"line_number":215,"context_line":"        curr_devices \u003d self.eswitch_mgr.get_assigned_devices_info()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_8624fdc6","line":212,"updated":"2016-11-14 13:21:11.000000000","message":"nit: s/to all/for all/","commit_id":"bc1f857c0869705cd3601273e635039b7421964f"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bd29d160d3fd1f0e336b0acaee47ca96788cb26f","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Create a switch manager if one does not exist."},{"line_number":196,"context_line":"        \"\"\""},{"line_number":197,"context_line":"        for mac, pci_slot in devices:"},{"line_number":198,"context_line":"            if not self.eswitch_mgr.device_exists(mac, pci_slot):"},{"line_number":199,"context_line":"                for dev_name in esm.PciOsWrapper.get_pf_interfaces(pci_slot):"},{"line_number":200,"context_line":"                    self.eswitch_mgr.create_emb_switch(\u0027\u0027, dev_name, set())"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_11983b6a","line":198,"updated":"2016-11-21 11:47:37.000000000","message":"Is this conditional satisfied by just one successful \u0027create_emb_switch\u0027 call? If so, what happens if an exception is encountered on a second or further iteration and it doesn\u0027t complete all create_emb_switch calls?","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3b5a0408375d0995b013a516093726221291044a","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Create a switch manager if one does not exist."},{"line_number":196,"context_line":"        \"\"\""},{"line_number":197,"context_line":"        for mac, pci_slot in devices:"},{"line_number":198,"context_line":"            if not self.eswitch_mgr.device_exists(mac, pci_slot):"},{"line_number":199,"context_line":"                for dev_name in esm.PciOsWrapper.get_pf_interfaces(pci_slot):"},{"line_number":200,"context_line":"                    self.eswitch_mgr.create_emb_switch(\u0027\u0027, dev_name, set())"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_82b5c47f","line":198,"updated":"2016-11-30 08:54:28.000000000","message":"ack","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"442b29f5a9bcfc09fc8c3e25d17a7f05cd1cada1","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Create a switch manager if one does not exist."},{"line_number":196,"context_line":"        \"\"\""},{"line_number":197,"context_line":"        for mac, pci_slot in devices:"},{"line_number":198,"context_line":"            if not self.eswitch_mgr.device_exists(mac, pci_slot):"},{"line_number":199,"context_line":"                for dev_name in esm.PciOsWrapper.get_pf_interfaces(pci_slot):"},{"line_number":200,"context_line":"                    self.eswitch_mgr.create_emb_switch(\u0027\u0027, dev_name, set())"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_0cb3c00b","line":198,"in_reply_to":"7a77a97e_11983b6a","updated":"2016-11-21 12:05:00.000000000","message":"so the create_emb_switch just create EmbSwitch object is not doing any ip link command or something that can really failed (other than memory allocation)\n\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py#L368-L372","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"}],"neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3b5a0408375d0995b013a516093726221291044a","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_62c0a8e1","line":142,"updated":"2016-11-30 08:54:28.000000000","message":"In the routed networks case we have multiple segments which will normally correspond to different physnets and the physnet is specific to a rack or pod. So each compute node will normally only have access to one of the physnets, and subsequently only one of the segments in the network.\n\nNow the problem will be that the sriov driver is going to start iterating over the segments for a network to see which one it can bind the port on[1]. With this logic you have, the sriov driver is going to lie and bind the port to the first segment it sees which the corresponding host might not even be able to reach.\n\nThis is particularily problematic because the IPAM system will now allocate an IP from the segment that the compute node can\u0027t reach and the instance won\u0027t have any connectivity.\n\n1. http://git.openstack.org/cgit/openstack/neutron/tree/neutron/plugins/ml2/drivers/mech_sriov/mech_driver/mech_driver.py#n100","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bd29d160d3fd1f0e336b0acaee47ca96788cb26f","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_f192df4a","line":142,"updated":"2016-11-21 11:47:37.000000000","message":"This is a pretty significant departure for how all of the other agents function and it will be problematic for the routed networks use case where it is expected that physnets will be restricted to particular racks in the datacenter.\n\nAfter this change, the mech driver is going to claim it can bind ports to physnets it can\u0027t really reach. I would rather have explicit configuration still required and if someone wants to have the driver claim any agent can bind to any arbitrary physnet, then have the operator specify that explicitly with a wildcard value like \u0027*\u0027.","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"35b954d51d65d0be0dd553c671a02953fafcebc2","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_91a34b4f","line":142,"in_reply_to":"5a74a57a_1825a0ad","updated":"2016-11-30 12:16:41.000000000","message":"That\u0027s of course assuming that Nova is in use...\n\nI think we agreed to keep the mappings option in place for non-Nova cases, and honour it if set. If not, then we\u0027ll assume all segments are accessible. Correct?","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"0e0cffa2c7654aec43ccf75185f284b76f5d9bd8","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_1825a0ad","line":142,"in_reply_to":"5a74a57a_62c0a8e1","updated":"2016-11-30 10:57:56.000000000","message":"@Kevin, SR-IOV is a bit different. Nova need to pass the pci_slot which is VF/PF so basically nova will select the physnet not neutron.","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"7ab1e977c36dc3cefac7eac1f298d49d2ffea85d","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a74a57a_cc8526ae","line":142,"in_reply_to":"5a74a57a_91a34b4f","updated":"2016-11-30 12:33:41.000000000","message":"yes we have agreement on this","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"442b29f5a9bcfc09fc8c3e25d17a7f05cd1cada1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_6cab54d7","line":142,"in_reply_to":"7a77a97e_f192df4a","updated":"2016-11-21 12:05:00.000000000","message":"Kevin, with SR-IOV  physnet is mapped to pci device (VF/PF ) are defined also in nova (pci_passthroght_whitlist). So nova is selecting/claiming the correct pci_device.\nSo I am not sure I understand your comment. can you explain why it will effect routed networks?","commit_id":"2f22d6f62965b0d5d308088dd2005d439cc784d8"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                LOG.debug(\"Checking segment: %(segment)s \""},{"line_number":146,"context_line":"                          \"for mappings: %(mappings)s \","},{"line_number":147,"context_line":"                          {\u0027segment\u0027: segment, \u0027mappings\u0027: mappings})"},{"line_number":148,"context_line":"                return segment[api.PHYSICAL_NETWORK] in mappings"},{"line_number":149,"context_line":"            return True"},{"line_number":150,"context_line":"        return False"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_4e2f00f6","side":"PARENT","line":148,"updated":"2016-11-25 11:57:47.000000000","message":"I think Kevin raised the point before, that needs clarification...\n\nThe change seems to suggest that you assume the default empty mapping means that all segments are accessible from any compute node, which is not necessarily true. How do you deal with those cases then?\n\nI understand that nova allows to map devices to particular physnets via whitelist option. But nova is not the only user of neutron API, and hence we should still have a way to enforce mapping on our side. [Was it even wise to deprecate the mappings option?]","commit_id":"d41bed0ee674e26f58e5ffe51198260ff765ccf6"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"791bafa3299d3902d645941cf5a80bbddeac1d75","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                LOG.debug(\"Checking segment: %(segment)s \""},{"line_number":146,"context_line":"                          \"for mappings: %(mappings)s \","},{"line_number":147,"context_line":"                          {\u0027segment\u0027: segment, \u0027mappings\u0027: mappings})"},{"line_number":148,"context_line":"                return segment[api.PHYSICAL_NETWORK] in mappings"},{"line_number":149,"context_line":"            return True"},{"line_number":150,"context_line":"        return False"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3a71b18c_5059bf8d","side":"PARENT","line":148,"updated":"2016-12-07 20:15:17.000000000","message":"I think you didn\u0027t understand the point I was making. You cannot bind a physnet you cannot reach in the mech driver or it will break IPAM in the routed networks case.\n\nIn routed networks, you have multiple segments on different physnets in a single network. If you continue with this approach, this driver will be dumb and will just bind the first segment in the network, even if the agent isn\u0027t connected to that particular physnet. IPAM will now see this segment binding and give the VM an IP address from a segment the agent can\u0027t actually reach.\n\nThe pci_slot does not tell us anything useful in this regard, other than which PCI slot to use in the agent. The *server* needs to know what physnets the agent is connected to so it can correctly select the segment the agent has connectivity to.","commit_id":"d41bed0ee674e26f58e5ffe51198260ff765ccf6"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"2167705c29abfab812887c2927c30b2619f282f9","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                LOG.debug(\"Checking segment: %(segment)s \""},{"line_number":146,"context_line":"                          \"for mappings: %(mappings)s \","},{"line_number":147,"context_line":"                          {\u0027segment\u0027: segment, \u0027mappings\u0027: mappings})"},{"line_number":148,"context_line":"                return segment[api.PHYSICAL_NETWORK] in mappings"},{"line_number":149,"context_line":"            return True"},{"line_number":150,"context_line":"        return False"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_22f8fe48","side":"PARENT","line":148,"in_reply_to":"5a74a57a_4e2f00f6","updated":"2016-11-26 04:21:16.000000000","message":"so my point was that if we have the pci_slot in the neutron port (which is mandatory for the SR-IOV agent to work) we have all the information we need. so some one already choose that for us. \n\nI didn\u0027t know about other users except nova. so my question is do we trust the user which supply the pci_slot (as we trust nova).\n\nthe all point of the commit is to reduce configuration complexity between nova and neutron.\n\nif you see other use cases for keeping the option we can revert https://review.openstack.org/#/c/395044/","commit_id":"d41bed0ee674e26f58e5ffe51198260ff765ccf6"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        LOG.debug(\"Bound using segment: %s\", segment)"},{"line_number":132,"context_line":"        return True"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def check_segment_for_agent(self, segment, agent\u003dNone):"},{"line_number":135,"context_line":"        \"\"\"Check if segment can be bound."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        :param segment: segment dictionary describing segment to bind"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_eea0cca1","line":134,"updated":"2016-11-25 11:57:47.000000000","message":"btw do we even know why this override was needed? from what I see in the base class, the base implementation should have worked fine for us (at least until now).","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"2167705c29abfab812887c2927c30b2619f282f9","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        LOG.debug(\"Bound using segment: %s\", segment)"},{"line_number":132,"context_line":"        return True"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def check_segment_for_agent(self, segment, agent\u003dNone):"},{"line_number":135,"context_line":"        \"\"\"Check if segment can be bound."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        :param segment: segment dictionary describing segment to bind"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_8258f28b","line":134,"in_reply_to":"5a74a57a_eea0cca1","updated":"2016-11-26 04:21:16.000000000","message":"yes legacy mistake. \nat first the SR-IOV mech driver implementing the api.MechanismDriver because of the agent_required option that we deprecated. when we removed it there was a commit that change it to implement the AgentMechanismDriverBase but I guest we missed that we can remove this method","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c9cb8057cfc22d65532cde2449d1b81c8a23c9eb","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_c2889cc9","line":142,"updated":"2016-11-30 08:54:22.000000000","message":"Please see my comments on PS9 about ignoring mappings breaking multi-segment usecases (particularily routed networks).","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_eee8cc12","line":142,"updated":"2016-11-25 11:57:47.000000000","message":"wait... if mappings are still used, shouldn\u0027t we retain the current behaviour? it seems like here, you just ignore the option.","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"2167705c29abfab812887c2927c30b2619f282f9","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        :returns: True if segment can be bound for agent"},{"line_number":140,"context_line":"        \"\"\""},{"line_number":141,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":142,"context_line":"        return network_type in self.get_allowed_network_types(agent)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def check_vlan_transparency(self, context):"},{"line_number":145,"context_line":"        \"\"\"SR-IOV driver vlan transparency support.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_4297baeb","line":142,"in_reply_to":"5a74a57a_eee8cc12","updated":"2016-11-26 04:21:16.000000000","message":"yes you are right","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"}],"neutron/tests/unit/extensions/test_segment.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                                              device_mappings\u003dmappings,"},{"line_number":706,"context_line":"                                              plugin\u003dself.plugin)"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"    # mapping config option is deprecated, therefore this test is irrelevant"},{"line_number":709,"context_line":"    def test_update_agent_only_change_agent_host_mapping(self):"},{"line_number":710,"context_line":"        pass"},{"line_number":711,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_9124ddaf","line":708,"updated":"2016-11-25 11:57:47.000000000","message":"I don\u0027t get why you may want to disable the test. The option is still there, and it should work as advertised.","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py":[{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"28f766ae49167383c5e33fb89a893edae1081b39","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    def test__create_eswitches_already_exist(self, *args):"},{"line_number":207,"context_line":"        dev1 \u003d (\u0027mac1\u0027, \u0027pci_slot1\u0027)"},{"line_number":208,"context_line":"        dev2 \u003d (\u0027mac2\u0027, \u0027pci_slot2\u0027)"},{"line_number":209,"context_line":"        self.agent.eswitch_mgr.create_emb_switch(\u0027\u0027, \u0027dev_name1\u0027, set())"},{"line_number":210,"context_line":"        self.agent.eswitch_mgr.create_emb_switch \u003d mock.Mock()"},{"line_number":211,"context_line":"        self.agent._create_eswitches([dev1, dev2])"},{"line_number":212,"context_line":"        self.agent.eswitch_mgr.create_emb_switch.assert_called_once_with("},{"line_number":213,"context_line":"                \u0027\u0027, \u0027dev_name2\u0027, set())"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_2a4635bf","line":210,"range":{"start_line":209,"start_character":1,"end_line":210,"end_character":62},"updated":"2016-11-16 20:11:17.000000000","message":"this doesn\u0027t make sense why call and then mock","commit_id":"c554720250afc9a6df969710288f97ba977a9914"},{"author":{"_account_id":21683,"name":"edan david","email":"edand@mellanox.com","username":"edand"},"change_message_id":"cb75d6ac2fe9e646987a589ed0a7c645d85f891e","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    def test__create_eswitches_already_exist(self, *args):"},{"line_number":207,"context_line":"        dev1 \u003d (\u0027mac1\u0027, \u0027pci_slot1\u0027)"},{"line_number":208,"context_line":"        dev2 \u003d (\u0027mac2\u0027, \u0027pci_slot2\u0027)"},{"line_number":209,"context_line":"        self.agent.eswitch_mgr.create_emb_switch(\u0027\u0027, \u0027dev_name1\u0027, set())"},{"line_number":210,"context_line":"        self.agent.eswitch_mgr.create_emb_switch \u003d mock.Mock()"},{"line_number":211,"context_line":"        self.agent._create_eswitches([dev1, dev2])"},{"line_number":212,"context_line":"        self.agent.eswitch_mgr.create_emb_switch.assert_called_once_with("},{"line_number":213,"context_line":"                \u0027\u0027, \u0027dev_name2\u0027, set())"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_a3797dca","line":210,"range":{"start_line":209,"start_character":1,"end_line":210,"end_character":62},"in_reply_to":"7a77a97e_2a4635bf","updated":"2016-11-17 07:21:16.000000000","message":"the intention was to create a eswitch and only then assert only one is created","commit_id":"c554720250afc9a6df969710288f97ba977a9914"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/mech_driver/test_mech_sriov_nic_switch.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"17d724c04300f6d4a3f4cc50372c7310c727b2fa","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    AGENT_TYPE \u003d constants.AGENT_TYPE_NIC_SWITCH"},{"line_number":58,"context_line":"    VLAN_SEGMENTS \u003d base.AgentMechanismVlanTestCase.VLAN_SEGMENTS"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    AGENTS \u003d [{\u0027alive\u0027: True}]"},{"line_number":61,"context_line":"    AGENTS_DEAD \u003d [{\u0027alive\u0027: False}]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_115fed0e","line":60,"updated":"2016-11-25 11:57:47.000000000","message":"I am not sure why you touch the test and those constants. Could you please explain?","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"2167705c29abfab812887c2927c30b2619f282f9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    AGENT_TYPE \u003d constants.AGENT_TYPE_NIC_SWITCH"},{"line_number":58,"context_line":"    VLAN_SEGMENTS \u003d base.AgentMechanismVlanTestCase.VLAN_SEGMENTS"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    AGENTS \u003d [{\u0027alive\u0027: True}]"},{"line_number":61,"context_line":"    AGENTS_DEAD \u003d [{\u0027alive\u0027: False}]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a74a57a_c28bcac1","line":60,"in_reply_to":"5a74a57a_115fed0e","updated":"2016-11-26 04:21:16.000000000","message":"yes we should still test it if it deprecated","commit_id":"d33526887e71810c8c1f10b0251782c8bee1ca8b"}]}
