)]}'
{"ironic/drivers/modules/network/flat.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e794c9fc111a6b9b9a92b4b3f8ec185abb949ecd","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            task, self.get_cleaning_network_uuid(task))"},{"line_number":120,"context_line":"        for port in task.ports:"},{"line_number":121,"context_line":"            if port.uuid in vifs:"},{"line_number":122,"context_line":"                # NOTE(hshiina): tenant_vif_port_id may be removed by"},{"line_number":123,"context_line":"                #                since vifs are detached without a lock."},{"line_number":124,"context_line":"                #                To avoid restoring tenant_vif_port_id,"},{"line_number":125,"context_line":"                #                refresh the port before updating."}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_efa1d0f8","line":122,"updated":"2018-02-21 17:09:52.000000000","message":"is this clear to folks, and/or maybe we should mention the bug.\n\nHow about something like\n\ntenant_vif_port_id may have been removed (since VIFs can be detached w/o a lock) after this port instance was generated, so we need to refresh it (otherwise, this may cause the old tenant_vif_port_id to be restored). See Bug 1750785.","commit_id":"662fb93b6e46024aeb8b8dd95c24854e706362ef"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"45ee03fc96d29e615411d745e6fa80053017b79b","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                #                since vifs are detached without a lock."},{"line_number":124,"context_line":"                #                To avoid restoring tenant_vif_port_id,"},{"line_number":125,"context_line":"                #                refresh the port before updating."},{"line_number":126,"context_line":"                port.refresh()"},{"line_number":127,"context_line":"                internal_info \u003d port.internal_info"},{"line_number":128,"context_line":"                internal_info[\u0027cleaning_vif_port_id\u0027] \u003d vifs[port.uuid]"},{"line_number":129,"context_line":"                port.internal_info \u003d internal_info"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_a5ea0fd5","line":126,"updated":"2018-02-21 13:51:01.000000000","message":"I guess this is an issue with using JSON fields rather than top level fields for these IDs - you have to read/modify/write the whole JSON blob. If tenant_vif_port_id was a top level field, it would not appear as changed, and would not be modified in save().","commit_id":"662fb93b6e46024aeb8b8dd95c24854e706362ef"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e794c9fc111a6b9b9a92b4b3f8ec185abb949ecd","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                #                since vifs are detached without a lock."},{"line_number":124,"context_line":"                #                To avoid restoring tenant_vif_port_id,"},{"line_number":125,"context_line":"                #                refresh the port before updating."},{"line_number":126,"context_line":"                port.refresh()"},{"line_number":127,"context_line":"                internal_info \u003d port.internal_info"},{"line_number":128,"context_line":"                internal_info[\u0027cleaning_vif_port_id\u0027] \u003d vifs[port.uuid]"},{"line_number":129,"context_line":"                port.internal_info \u003d internal_info"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_ef1eb05d","line":126,"in_reply_to":"3fa0c359_a5ea0fd5","updated":"2018-02-21 17:09:52.000000000","message":"I just think it is dangerous to modify things w/o a lock :-(\n\nCuz eg, even if we refresh, a vif could get detached after this refresh but before the .save below.","commit_id":"662fb93b6e46024aeb8b8dd95c24854e706362ef"}],"releasenotes/notes/bug-1750785-103e5ed87f3fc187.yaml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"45ee03fc96d29e615411d745e6fa80053017b79b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Fixes a race condition which may restore VIFs once detached by the Compute"},{"line_number":5,"context_line":"    Service when a node is connected to a cleaning network. See `bug 1750785"},{"line_number":6,"context_line":"    \u003chttps://bugs.launchpad.net/ironic/+bug/1750785\u003e`_ for more details."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa0c359_e5ced758","line":4,"updated":"2018-02-21 13:51:01.000000000","message":"nit, only if you respin:\n\nFixes a race condition during cleaning which may cause VIFs previously detached by the Compute service to become attached again.","commit_id":"662fb93b6e46024aeb8b8dd95c24854e706362ef"}]}
