)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3ca5ba2c7e05fe9ea92b822bfd5caba0ef543c","unresolved":true,"context_lines":[{"line_number":15,"context_line":"connection_info of the NFS (I2dd06c43c39ddb576fea9e5cbccffc096e77073a)"},{"line_number":16,"context_line":"and Ceph (Ibc62dd8a7291ab72c13801eba181db5b673885d1) volume drivers to"},{"line_number":17,"context_line":"identify when it is actually safe to use attachment_update with cinderv3"},{"line_number":18,"context_line":"based attachments to refresh the connection_info of a bdm in Nova."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"No changes are made for legacy cinderv2 attachments as these have always"},{"line_number":21,"context_line":"called initialize_connection and changing this now could easily cause"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"d1a75924_d9d14465","line":18,"updated":"2021-03-12 21:27:14.000000000","message":"Should these two changes be Depends-On? IIUC, this patch will not improve matters until the \u0027initialize_idempotent\u0027 attribute exists on the cinder side. That is, this change makes sense if and only if the above two changes merge.\n\nAnd in the worst case, if a blocker arises or the API changes on the cinder side before merge, we\u0027d be possibly looking at a revert and redo.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0fa3bb2e29ff7be52c41aed4f75ae06e6d7d9916","unresolved":false,"context_lines":[{"line_number":15,"context_line":"connection_info of the NFS (I2dd06c43c39ddb576fea9e5cbccffc096e77073a)"},{"line_number":16,"context_line":"and Ceph (Ibc62dd8a7291ab72c13801eba181db5b673885d1) volume drivers to"},{"line_number":17,"context_line":"identify when it is actually safe to use attachment_update with cinderv3"},{"line_number":18,"context_line":"based attachments to refresh the connection_info of a bdm in Nova."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"No changes are made for legacy cinderv2 attachments as these have always"},{"line_number":21,"context_line":"called initialize_connection and changing this now could easily cause"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fb567107_4ed5c5c9","line":18,"in_reply_to":"d1a75924_d9d14465","updated":"2021-03-15 13:21:59.000000000","message":"ACK, I think I was worried about including these for backports but I\u0027ll just drop them if that becomes an issue.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"}],"nova/tests/unit/virt/test_block_device.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6a81c6235faf8bc469d52d3a50b25e94c5462485","unresolved":false,"context_lines":[{"line_number":1626,"context_line":"            self.context, mock.sentinel.instance,"},{"line_number":1627,"context_line":"            volume_api, virt_driver)"},{"line_number":1628,"context_line":"        virt_driver.get_volume_connector.assert_called_once_with("},{"line_number":1629,"context_line":"           mock.sentinel.instance) "},{"line_number":1630,"context_line":"        volume_api.attachment_update.assert_called_once_with("},{"line_number":1631,"context_line":"            self.context, self.attachment_id, mock.sentinel.connector,"},{"line_number":1632,"context_line":"            test_bdm[\u0027mount_device\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_458947c8","line":1629,"updated":"2020-04-18 17:17:52.000000000","message":"pep8: W291 trailing whitespace","commit_id":"368f53ac770f02479030fba8a14d2cd6c7202412"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3fdce8e637a383c5fe3845715739773710dd2ba2","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        if self.attachment_id is None:"},{"line_number":897,"context_line":"            # Assert that initialize_connection is not called when"},{"line_number":898,"context_line":"            # initialize_idempotent is not set for cinderv2 volumes"},{"line_number":899,"context_line":"            self.volume_api.initialize_connection.assert_not_called()"},{"line_number":900,"context_line":"        else:"},{"line_number":901,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":902,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_06e231a0","line":899,"updated":"2020-08-27 14:06:54.000000000","message":"✓ (cinder v2 and not idempotent --\u003e nothing)","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3fdce8e637a383c5fe3845715739773710dd2ba2","unresolved":false,"context_lines":[{"line_number":900,"context_line":"        else:"},{"line_number":901,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":902,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."},{"line_number":903,"context_line":"            self.volume_api.attachment_get.assert_called_once_with("},{"line_number":904,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"},{"line_number":905,"context_line":""},{"line_number":906,"context_line":"    @mock.patch.object(objects.BlockDeviceMapping, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_c604b94c","line":903,"updated":"2020-08-27 14:06:54.000000000","message":"✓ (cinder v3 and not idempotent --\u003e attachment_get)","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3fdce8e637a383c5fe3845715739773710dd2ba2","unresolved":false,"context_lines":[{"line_number":936,"context_line":"        if self.attachment_id is None:"},{"line_number":937,"context_line":"            # Assert that initialize_connection is called when"},{"line_number":938,"context_line":"            # initialize_idempotent is set for cinderv2 volumes"},{"line_number":939,"context_line":"            self.volume_api.initialize_connection.assert_called_once_with("},{"line_number":940,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":941,"context_line":"        else:"},{"line_number":942,"context_line":"            # Asset that attachment_update and attachment_complete are called"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_e6f57d52","line":939,"updated":"2020-08-27 14:06:54.000000000","message":"✓ (cinder v2 and idempotent --\u003e initialize_connection)","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3fdce8e637a383c5fe3845715739773710dd2ba2","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            self.volume_api.attachment_update.assert_called_once_with("},{"line_number":945,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027], connector,"},{"line_number":946,"context_line":"                test_bdm[\u0027mount_device\u0027])"},{"line_number":947,"context_line":"            self.volume_api.attachment_complete.assert_called_once_with("},{"line_number":948,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":"        # Assert that the expected connection_info is saved into the bdm"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_4696e9f1","line":947,"updated":"2020-08-27 14:06:54.000000000","message":"✓ (cinder v3 and idempotent --\u003e attachment_update + attachment_complete)","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9d99d4b3c7e1eea6c3c725b2475d00050415d669","unresolved":true,"context_lines":[{"line_number":898,"context_line":""},{"line_number":899,"context_line":"        if self.attachment_id is None:"},{"line_number":900,"context_line":"            # Assert that initialize_connection is not called when"},{"line_number":901,"context_line":"            # initialize_idempotent is not set for cinderv2 volumes"},{"line_number":902,"context_line":"            self.volume_api.initialize_connection.assert_called_once_with("},{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"54980e99_0598174f","line":901,"updated":"2021-03-11 22:29:54.000000000","message":"Wat? This says \"assert that initialize_connection is not called\" and then it does initialize_connection.assert_called_once_with? Looks like this does the opposite of what the comment says.","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ff081e91fe40b5c2815870ca3c5feac5e80388df","unresolved":false,"context_lines":[{"line_number":898,"context_line":""},{"line_number":899,"context_line":"        if self.attachment_id is None:"},{"line_number":900,"context_line":"            # Assert that initialize_connection is not called when"},{"line_number":901,"context_line":"            # initialize_idempotent is not set for cinderv2 volumes"},{"line_number":902,"context_line":"            self.volume_api.initialize_connection.assert_called_once_with("},{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":9,"id":"56dd8427_61845707","line":901,"in_reply_to":"54980e99_0598174f","updated":"2021-03-12 11:05:17.000000000","message":"Done","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9d99d4b3c7e1eea6c3c725b2475d00050415d669","unresolved":true,"context_lines":[{"line_number":902,"context_line":"            self.volume_api.initialize_connection.assert_called_once_with("},{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"},{"line_number":905,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":906,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."},{"line_number":907,"context_line":"            self.volume_api.attachment_get.assert_called_once_with("},{"line_number":908,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"0fdefc53_807a621c","line":905,"range":{"start_line":905,"start_character":14,"end_line":905,"end_character":19},"updated":"2021-03-11 22:29:54.000000000","message":"Assert","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ff081e91fe40b5c2815870ca3c5feac5e80388df","unresolved":false,"context_lines":[{"line_number":902,"context_line":"            self.volume_api.initialize_connection.assert_called_once_with("},{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"},{"line_number":905,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":906,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."},{"line_number":907,"context_line":"            self.volume_api.attachment_get.assert_called_once_with("},{"line_number":908,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"03a9876a_d65f88e2","line":905,"range":{"start_line":905,"start_character":14,"end_line":905,"end_character":19},"in_reply_to":"0fdefc53_807a621c","updated":"2021-03-12 11:05:17.000000000","message":"Done","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9d99d4b3c7e1eea6c3c725b2475d00050415d669","unresolved":true,"context_lines":[{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"},{"line_number":905,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":906,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."},{"line_number":907,"context_line":"            self.volume_api.attachment_get.assert_called_once_with("},{"line_number":908,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"},{"line_number":909,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"4fe79033_dcdce94f","line":906,"updated":"2021-03-11 22:29:54.000000000","message":"Same here, the comment says \"assert that attachment_update is not called\" and then it does attachment_get.assert_called_once, but it doesn\u0027t assert anything about attachment_update? Shouldn\u0027t it be\n\n self.volume_api.attachment_update.assert_not_called()\n\n?","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ff081e91fe40b5c2815870ca3c5feac5e80388df","unresolved":false,"context_lines":[{"line_number":903,"context_line":"                self.context, test_bdm.volume_id, connector)"},{"line_number":904,"context_line":"        else:"},{"line_number":905,"context_line":"            # Asset that attachment_update is not called when"},{"line_number":906,"context_line":"            # initialize_idempotent is not set for cinderv3 volumes."},{"line_number":907,"context_line":"            self.volume_api.attachment_get.assert_called_once_with("},{"line_number":908,"context_line":"                self.context, test_bdm[\u0027attachment_id\u0027])"},{"line_number":909,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"427feda9_b6747c2f","line":906,"in_reply_to":"4fe79033_dcdce94f","updated":"2021-03-12 11:05:17.000000000","message":"Done","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3ca5ba2c7e05fe9ea92b822bfd5caba0ef543c","unresolved":true,"context_lines":[{"line_number":883,"context_line":"                \u0027multipath_id\u0027: \u0027fake_multipath_id\u0027"},{"line_number":884,"context_line":"            },"},{"line_number":885,"context_line":"            \u0027serial\u0027: \u0027fake-volume-id-2\u0027"},{"line_number":886,"context_line":"        }"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"        self.virt_driver.get_volume_connector.return_value \u003d connector"},{"line_number":889,"context_line":"        self.volume_api.initialize_connection.return_value \u003d returned_conn_info"}],"source_content_type":"text/x-python","patch_set":10,"id":"5b4b821d_669d7c95","line":886,"updated":"2021-03-12 21:27:14.000000000","message":"Note to self: the returned connection_info has \u0027initialize_idempotent\u0027: True *but* the test_bdm itself does not have \u0027initialize_idempotent\u0027 set in its connection_info, and that is how initialize_idempotent is not True in this test wrt to the assertions at the end.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0fa3bb2e29ff7be52c41aed4f75ae06e6d7d9916","unresolved":false,"context_lines":[{"line_number":883,"context_line":"                \u0027multipath_id\u0027: \u0027fake_multipath_id\u0027"},{"line_number":884,"context_line":"            },"},{"line_number":885,"context_line":"            \u0027serial\u0027: \u0027fake-volume-id-2\u0027"},{"line_number":886,"context_line":"        }"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":"        self.virt_driver.get_volume_connector.return_value \u003d connector"},{"line_number":889,"context_line":"        self.volume_api.initialize_connection.return_value \u003d returned_conn_info"}],"source_content_type":"text/x-python","patch_set":10,"id":"31ca66a9_6f290556","line":886,"in_reply_to":"5b4b821d_669d7c95","updated":"2021-03-15 13:21:59.000000000","message":"Ack","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3ca5ba2c7e05fe9ea92b822bfd5caba0ef543c","unresolved":true,"context_lines":[{"line_number":921,"context_line":"    def test_refresh_connection_info_initialize_idempotent(self, mock_save):"},{"line_number":922,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volsnapshot\u0027]("},{"line_number":923,"context_line":"            self.volsnapshot_bdm)"},{"line_number":924,"context_line":"        test_bdm[\u0027connection_info\u0027] \u003d {\u0027initialize_idempotent\u0027: True}"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"        instance \u003d {\u0027id\u0027: \u0027fake_id\u0027, \u0027uuid\u0027: uuids.uuid}"},{"line_number":927,"context_line":"        connector \u003d {\u0027ip\u0027: \u0027fake_ip\u0027, \u0027host\u0027: \u0027fake_host\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"86498bcc_c15e451f","line":924,"updated":"2021-03-12 21:27:14.000000000","message":"I know it doesn\u0027t technically matter for this test but this is wiping out all of the rest of the connection_info that had been set before.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0fa3bb2e29ff7be52c41aed4f75ae06e6d7d9916","unresolved":false,"context_lines":[{"line_number":921,"context_line":"    def test_refresh_connection_info_initialize_idempotent(self, mock_save):"},{"line_number":922,"context_line":"        test_bdm \u003d self.driver_classes[\u0027volsnapshot\u0027]("},{"line_number":923,"context_line":"            self.volsnapshot_bdm)"},{"line_number":924,"context_line":"        test_bdm[\u0027connection_info\u0027] \u003d {\u0027initialize_idempotent\u0027: True}"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"        instance \u003d {\u0027id\u0027: \u0027fake_id\u0027, \u0027uuid\u0027: uuids.uuid}"},{"line_number":927,"context_line":"        connector \u003d {\u0027ip\u0027: \u0027fake_ip\u0027, \u0027host\u0027: \u0027fake_host\u0027}"}],"source_content_type":"text/x-python","patch_set":10,"id":"2d0731e6_ca583c40","line":924,"in_reply_to":"86498bcc_c15e451f","updated":"2021-03-15 13:21:59.000000000","message":"Ack","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"}],"nova/virt/block_device.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"07512d64edb1007a1691a7d7ef745997718dfb2f","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # attachment_update are reported as idempotent by the c-vol backend."},{"line_number":701,"context_line":"        # TODO(lyarwood): Remove this once all v2 volumes are migrated to v3"},{"line_number":702,"context_line":"        # *and* c-api provides a v3 API to request refreshed connection_info."},{"line_number":703,"context_line":"        idempotent_refresh \u003d self[\u0027connection_info\u0027].get(\u0027idempotent\u0027, False)"},{"line_number":704,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        # The _volume_attach method stashes a \u0027multiattach\u0027 flag in the"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_3c772d3d","line":703,"range":{"start_line":703,"start_character":58,"end_line":703,"end_character":68},"updated":"2020-05-06 11:03:24.000000000","message":"initialize_idempotent","commit_id":"3fddf58f363b3adf96999422ce6077621455e0cf"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3be02c35475bd133159873e109a97bef59755657","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # attachment_update are reported as idempotent by the c-vol backend."},{"line_number":701,"context_line":"        # TODO(lyarwood): Remove this once all v2 volumes are migrated to v3"},{"line_number":702,"context_line":"        # *and* c-api provides a v3 API to request refreshed connection_info."},{"line_number":703,"context_line":"        idempotent_refresh \u003d self[\u0027connection_info\u0027].get(\u0027idempotent\u0027, False)"},{"line_number":704,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        # The _volume_attach method stashes a \u0027multiattach\u0027 flag in the"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_2de1b92b","line":703,"range":{"start_line":703,"start_character":58,"end_line":703,"end_character":68},"in_reply_to":"1f493fa4_3c772d3d","updated":"2020-05-06 13:59:40.000000000","message":"Done","commit_id":"3fddf58f363b3adf96999422ce6077621455e0cf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"07512d64edb1007a1691a7d7ef745997718dfb2f","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        # NOTE(lyarwood): If calls to attachment_update are not idempotent then"},{"line_number":738,"context_line":"        # just fetch the current connection_info for the volume without calling"},{"line_number":739,"context_line":"        # attachment_update."},{"line_number":740,"context_line":"        elif self[\u0027attachment_id\u0027] and not idempotent_refresh:"},{"line_number":741,"context_line":"            connection_info \u003d volume_api.attachment_get("},{"line_number":742,"context_line":"                context, self[\u0027attachment_id\u0027])[\u0027connection_info\u0027]"},{"line_number":743,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_5cdf990b","line":740,"range":{"start_line":740,"start_character":39,"end_line":740,"end_character":61},"updated":"2020-05-06 11:03:24.000000000","message":"since we reached this line, the connection_info exists (else would\u0027ve returned on L#697), meaning initialize_connection has atleast called once.\nLooking at the cinder change, it returns initialize_idempotent as True since the first call so when will this case occur?","commit_id":"3fddf58f363b3adf96999422ce6077621455e0cf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"776293509a8ea66ecd48c2cc78c60dcee2c00a12","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        # NOTE(lyarwood): If calls to attachment_update are not idempotent then"},{"line_number":738,"context_line":"        # just fetch the current connection_info for the volume without calling"},{"line_number":739,"context_line":"        # attachment_update."},{"line_number":740,"context_line":"        elif self[\u0027attachment_id\u0027] and not idempotent_refresh:"},{"line_number":741,"context_line":"            connection_info \u003d volume_api.attachment_get("},{"line_number":742,"context_line":"                context, self[\u0027attachment_id\u0027])[\u0027connection_info\u0027]"},{"line_number":743,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_d4ded0d8","line":740,"range":{"start_line":740,"start_character":39,"end_line":740,"end_character":61},"in_reply_to":"1f493fa4_4dfd2539","updated":"2020-05-07 04:50:36.000000000","message":"Oh yeah right. This code deals with all backend drivers.","commit_id":"3fddf58f363b3adf96999422ce6077621455e0cf"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3be02c35475bd133159873e109a97bef59755657","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        # NOTE(lyarwood): If calls to attachment_update are not idempotent then"},{"line_number":738,"context_line":"        # just fetch the current connection_info for the volume without calling"},{"line_number":739,"context_line":"        # attachment_update."},{"line_number":740,"context_line":"        elif self[\u0027attachment_id\u0027] and not idempotent_refresh:"},{"line_number":741,"context_line":"            connection_info \u003d volume_api.attachment_get("},{"line_number":742,"context_line":"                context, self[\u0027attachment_id\u0027])[\u0027connection_info\u0027]"},{"line_number":743,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_4dfd2539","line":740,"range":{"start_line":740,"start_character":39,"end_line":740,"end_character":61},"in_reply_to":"1f493fa4_5cdf990b","updated":"2020-05-06 13:59:40.000000000","message":"There are a few but the obvious ones are when the attachment predates the key being returned by the c-vol backend *or* when the c-vol backend just doesn\u0027t return the key. You will note the only c-vol changes I\u0027ve posted so far are for the NFS and Ceph backends.","commit_id":"3fddf58f363b3adf96999422ce6077621455e0cf"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"3fdce8e637a383c5fe3845715739773710dd2ba2","unresolved":false,"context_lines":[{"line_number":709,"context_line":"            initialize_idempotent \u003d conn_info_data.get("},{"line_number":710,"context_line":"                \u0027initialize_idempotent\u0027, False)"},{"line_number":711,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":712,"context_line":"        if not self[\u0027attachment_id\u0027]:"},{"line_number":713,"context_line":"            if initialize_idempotent:"},{"line_number":714,"context_line":"                # NOTE(lyarwood): Only call initialize_connection to refresh"},{"line_number":715,"context_line":"                # the connection_info for cinderv2 volumes when the driver has"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_a668a520","line":712,"updated":"2020-08-27 14:06:54.000000000","message":"Could we add small helpers instead of this (for the un-initiated) unintuitive sentinel? Something like:\n\n  @property\n  def cinder_v2(self):\n    return not self[\u0027attachment_id\u0027]\n\n  @property\n  def cinder_v3(self):\n    return self[\u0027attachment_id\u0027]\n\nAnd then we can use them in a more flattened (and hopefully easier to follow) logic:\n\n  if cinver_v3 and initialize_idempotent:\n    \u003cattachment_update\u003e\n  elif cinder_v3 and not initialize_idempotent:\n    \u003cattachment_get\u003e\n  elif cinder_v2 and initialize_idempotent:\n    \u003cinitialize_connection\u003e\n  else:\n  (or elif cinder_v2 and not initialize_idempotent if we want to follow the pattern?)\n    \u003cbail\u003e\n\nWith ^^ we might be able to lose some/all of the comments, and hopefully make the code less visually spread-out and easier to follow.","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b8c57bc433536153de61fd87d9b574a33609ae96","unresolved":false,"context_lines":[{"line_number":709,"context_line":"            initialize_idempotent \u003d conn_info_data.get("},{"line_number":710,"context_line":"                \u0027initialize_idempotent\u0027, False)"},{"line_number":711,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":712,"context_line":"        if not self[\u0027attachment_id\u0027]:"},{"line_number":713,"context_line":"            if initialize_idempotent:"},{"line_number":714,"context_line":"                # NOTE(lyarwood): Only call initialize_connection to refresh"},{"line_number":715,"context_line":"                # the connection_info for cinderv2 volumes when the driver has"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a6e0076_35b38a1a","line":712,"in_reply_to":"9f560f44_a668a520","updated":"2020-12-07 22:06:53.000000000","message":"So this is widely used in the codebase at the moment, I can follow up with something like this to clean things up but I don\u0027t want to fold that into this bugfix.","commit_id":"f3154bb82b772ab2041e5b5b4db0dcc8eaf855fd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9d99d4b3c7e1eea6c3c725b2475d00050415d669","unresolved":true,"context_lines":[{"line_number":706,"context_line":"        initialize_idempotent \u003d self[\u0027connection_info\u0027].get("},{"line_number":707,"context_line":"            \u0027initialize_idempotent\u0027, False)"},{"line_number":708,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":709,"context_line":"        if not self[\u0027attachment_id\u0027]:"},{"line_number":710,"context_line":"            LOG.debug(\"Refreshing connection_info by calling \""},{"line_number":711,"context_line":"                      \"initialize_connection\", instance\u003dinstance)"},{"line_number":712,"context_line":"            connection_info \u003d volume_api.initialize_connection("}],"source_content_type":"text/x-python","patch_set":9,"id":"f569254f_3b510810","line":709,"updated":"2021-03-11 22:29:54.000000000","message":"Shouldn\u0027t this also be guarded by initialize_idempotent? The docstring says that it\u0027s only OK to refresh the connection_info if the c-vol backend reports that it is idempotent. Else we should return without refreshing.\n\nIIUC either this needs to be changed or the docstring needs to be changed.","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"84aabba14ed2dd7782121f773f6f779838265b5f","unresolved":true,"context_lines":[{"line_number":706,"context_line":"        initialize_idempotent \u003d self[\u0027connection_info\u0027].get("},{"line_number":707,"context_line":"            \u0027initialize_idempotent\u0027, False)"},{"line_number":708,"context_line":"        connector \u003d virt_driver.get_volume_connector(instance)"},{"line_number":709,"context_line":"        if not self[\u0027attachment_id\u0027]:"},{"line_number":710,"context_line":"            LOG.debug(\"Refreshing connection_info by calling \""},{"line_number":711,"context_line":"                      \"initialize_connection\", instance\u003dinstance)"},{"line_number":712,"context_line":"            connection_info \u003d volume_api.initialize_connection("}],"source_content_type":"text/x-python","patch_set":9,"id":"5b7607fa_b00a6378","line":709,"in_reply_to":"f569254f_3b510810","updated":"2021-03-12 10:15:31.000000000","message":"Apologies I did mean to push this as WIP after half reverting the cinderv2 changes but not updating the tests. As I\u0027ve got your attention now I\u0027ll respin this later today.","commit_id":"eeebe68497af8805f4ffb9a44c0f63b0eb84c192"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3ca5ba2c7e05fe9ea92b822bfd5caba0ef543c","unresolved":true,"context_lines":[{"line_number":707,"context_line":"        LOG.debug(\"Volume %s currently has connection_info of %s\","},{"line_number":708,"context_line":"                  self.volume_id, self[\u0027connection_info\u0027], instance\u003dinstance)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        # NOTE(lyarwood): Identify if calls to initialize_connection or"},{"line_number":711,"context_line":"        # attachment_update are reported as idempotent by the c-vol backend."},{"line_number":712,"context_line":"        # TODO(lyarwood): Remove this once all v2 volumes are migrated to v3"},{"line_number":713,"context_line":"        # *and* c-api provides a v3 API to request refreshed connection_info."}],"source_content_type":"text/x-python","patch_set":10,"id":"94d3e4a5_36a64cfb","line":710,"range":{"start_line":710,"start_character":47,"end_line":710,"end_character":71},"updated":"2021-03-12 21:27:14.000000000","message":"nix?\n\n(later) Ah, maybe not because of your NOTE on L718. The intention is to check idempotent for both someday.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0fa3bb2e29ff7be52c41aed4f75ae06e6d7d9916","unresolved":true,"context_lines":[{"line_number":707,"context_line":"        LOG.debug(\"Volume %s currently has connection_info of %s\","},{"line_number":708,"context_line":"                  self.volume_id, self[\u0027connection_info\u0027], instance\u003dinstance)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        # NOTE(lyarwood): Identify if calls to initialize_connection or"},{"line_number":711,"context_line":"        # attachment_update are reported as idempotent by the c-vol backend."},{"line_number":712,"context_line":"        # TODO(lyarwood): Remove this once all v2 volumes are migrated to v3"},{"line_number":713,"context_line":"        # *and* c-api provides a v3 API to request refreshed connection_info."}],"source_content_type":"text/x-python","patch_set":10,"id":"f94f0b56_80e465ff","line":710,"range":{"start_line":710,"start_character":47,"end_line":710,"end_character":71},"in_reply_to":"94d3e4a5_36a64cfb","updated":"2021-03-15 13:21:59.000000000","message":"Yup if there\u0027s a desire to change the behaviour with cinderv2 then we could, but for now I\u0027m just targeting the current broken behaviour with cinderv3.","commit_id":"824dfbefc6e949e62a4f959e476c83e12a41418a"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"cbfbb8fa8c69737c2008faabb60c21ab2273989e","unresolved":true,"context_lines":[{"line_number":691,"context_line":"        For cinderv3 the attachment_update API is used when the existing"},{"line_number":692,"context_line":"        connection_info contains the initialize_idempotent key indicating"},{"line_number":693,"context_line":"        that repeat calls to attachment_update (that inturn calls"},{"line_number":694,"context_line":"        initialize_idempotent in most drivers) is safe. When this key is not"},{"line_number":695,"context_line":"        present the attachment_show API is instead used to refetch the current"},{"line_number":696,"context_line":"        connection_info."},{"line_number":697,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5971c0cd_5c3f6c80","line":694,"range":{"start_line":694,"start_character":8,"end_line":694,"end_character":29},"updated":"2021-04-30 08:20:29.000000000","message":"initialize_connection","commit_id":"ce55f6676f7672e9acdb6f91003db62031ebd58f"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"cbfbb8fa8c69737c2008faabb60c21ab2273989e","unresolved":true,"context_lines":[{"line_number":692,"context_line":"        connection_info contains the initialize_idempotent key indicating"},{"line_number":693,"context_line":"        that repeat calls to attachment_update (that inturn calls"},{"line_number":694,"context_line":"        initialize_idempotent in most drivers) is safe. When this key is not"},{"line_number":695,"context_line":"        present the attachment_show API is instead used to refetch the current"},{"line_number":696,"context_line":"        connection_info."},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        :param context: nova auth RequestContext"}],"source_content_type":"text/x-python","patch_set":13,"id":"cbc73d16_d5dc5eb2","line":695,"range":{"start_line":695,"start_character":8,"end_line":695,"end_character":15},"updated":"2021-04-30 08:20:29.000000000","message":"present or False","commit_id":"ce55f6676f7672e9acdb6f91003db62031ebd58f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3a7a26a016a412acb0f4b6461416ca4437b81c7d","unresolved":true,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":"        For cinderv3 the attachment_update API is used when the existing"},{"line_number":692,"context_line":"        connection_info contains the initialize_idempotent key indicating"},{"line_number":693,"context_line":"        that repeat calls to attachment_update (that inturn calls"},{"line_number":694,"context_line":"        initialize_connection in most drivers) is safe. When this key is not"},{"line_number":695,"context_line":"        present or False the attachment_show API is instead used to refetch"},{"line_number":696,"context_line":"        the current connection_info."}],"source_content_type":"text/x-python","patch_set":16,"id":"37b44c02_d556d54a","line":693,"range":{"start_line":693,"start_character":53,"end_line":693,"end_character":59},"updated":"2021-07-05 10:58:41.000000000","message":"nit: in turn","commit_id":"d472936443056ef7d7f137c7bff7440a795e94c1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3a7a26a016a412acb0f4b6461416ca4437b81c7d","unresolved":true,"context_lines":[{"line_number":692,"context_line":"        connection_info contains the initialize_idempotent key indicating"},{"line_number":693,"context_line":"        that repeat calls to attachment_update (that inturn calls"},{"line_number":694,"context_line":"        initialize_connection in most drivers) is safe. When this key is not"},{"line_number":695,"context_line":"        present or False the attachment_show API is instead used to refetch"},{"line_number":696,"context_line":"        the current connection_info."},{"line_number":697,"context_line":""},{"line_number":698,"context_line":"        :param context: nova auth RequestContext"}],"source_content_type":"text/x-python","patch_set":16,"id":"758ccc1a_c4099e08","line":695,"range":{"start_line":695,"start_character":68,"end_line":695,"end_character":75},"updated":"2021-07-05 10:58:41.000000000","message":"nit: re-fetch?","commit_id":"d472936443056ef7d7f137c7bff7440a795e94c1"}]}
