)]}'
{"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a1b63379500554a8503d262628345ed79a18cff","unresolved":false,"context_lines":[{"line_number":81,"context_line":"from nova.scheduler import utils as scheduler_utils"},{"line_number":82,"context_line":"from nova import servicegroup"},{"line_number":83,"context_line":"from nova import utils"},{"line_number":84,"context_line":"from nova.virt import block_device as driver_block_device"},{"line_number":85,"context_line":"from nova.virt import hardware"},{"line_number":86,"context_line":"from nova.volume import cinder"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_2ec3c2ef","line":85,"range":{"start_line":84,"start_character":0,"end_line":85,"end_character":30},"updated":"2017-04-06 16:06:37.000000000","message":"Eww, these are sort of layer violations, since nova.compute.api runs in the nova-api service and the nova.virt stuff has traditionally only run in the nova-compute service. But I guess we already screwed that up when we imported nova.virt.hardware.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"48fedc63bd79ab759ebbeda5ff4fecddb0790a63","unresolved":false,"context_lines":[{"line_number":81,"context_line":"from nova.scheduler import utils as scheduler_utils"},{"line_number":82,"context_line":"from nova import servicegroup"},{"line_number":83,"context_line":"from nova import utils"},{"line_number":84,"context_line":"from nova.virt import block_device as driver_block_device"},{"line_number":85,"context_line":"from nova.virt import hardware"},{"line_number":86,"context_line":"from nova.volume import cinder"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_cbb3cf97","line":85,"range":{"start_line":84,"start_character":0,"end_line":85,"end_character":30},"in_reply_to":"bff0334d_2ec3c2ef","updated":"2017-04-10 11:11:34.000000000","message":"Yeah I didn\u0027t even think of that as nova.virt.hardware was already here. I\u0027ll rework this to centralise things in nova.volume.cinder as John originally suggested.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"150a6768835b7766370feaaecf33cfe0f49d1e95","unresolved":false,"context_lines":[{"line_number":2155,"context_line":"                    driver_bdm.volume_detach(context, instance,"},{"line_number":2156,"context_line":"                                             self.volume_api,"},{"line_number":2157,"context_line":"                                             connector\u003dconnector)"},{"line_number":2158,"context_line":"                    if bdm.delete_on_termination:"},{"line_number":2159,"context_line":"                        self.volume_api.delete(context, bdm.volume_id)"},{"line_number":2160,"context_line":"                except Exception as exc:"},{"line_number":2161,"context_line":"                    err_str \u003d _LW(\"Ignoring volume cleanup failure due to %s\")"},{"line_number":2162,"context_line":"                    LOG.warning(err_str, exc, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_3004234a","line":2159,"range":{"start_line":2158,"start_character":20,"end_line":2159,"end_character":70},"updated":"2017-04-03 13:09:09.000000000","message":"I think we should probably do this on every detach call. Longer term, the detach call will only do this operation, as the terminate_connection would delete the attachment already.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":2155,"context_line":"                    driver_bdm.volume_detach(context, instance,"},{"line_number":2156,"context_line":"                                             self.volume_api,"},{"line_number":2157,"context_line":"                                             connector\u003dconnector)"},{"line_number":2158,"context_line":"                    if bdm.delete_on_termination:"},{"line_number":2159,"context_line":"                        self.volume_api.delete(context, bdm.volume_id)"},{"line_number":2160,"context_line":"                except Exception as exc:"},{"line_number":2161,"context_line":"                    err_str \u003d _LW(\"Ignoring volume cleanup failure due to %s\")"},{"line_number":2162,"context_line":"                    LOG.warning(err_str, exc, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_1f0ec83a","line":2159,"range":{"start_line":2158,"start_character":20,"end_line":2159,"end_character":70},"in_reply_to":"dfeb2761_3004234a","updated":"2017-04-03 15:08:16.000000000","message":"Yeah I did have that in driver_bdm.volume_detach originally but was concerned that I might be silently breaking some of the rollback flows. I\u0027ll throw this into another change on top to confirm that it\u0027s not breaking things before merging it back into this refactor.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"}],"nova/compute/manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"150a6768835b7766370feaaecf33cfe0f49d1e95","unresolved":false,"context_lines":[{"line_number":5058,"context_line":"                    context, volume_id, instance.uuid)"},{"line_number":5059,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":5060,"context_line":"            driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":5061,"context_line":"            driver_bdm.driver_detach(context, instance, connector,"},{"line_number":5062,"context_line":"                                     self.volume_api, self.driver)"},{"line_number":5063,"context_line":"            self.volume_api.terminate_connection(context, volume_id, connector)"},{"line_number":5064,"context_line":"        except exception.NotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_10ad9f30","side":"PARENT","line":5061,"updated":"2017-04-03 13:09:09.000000000","message":"In the attach side of things, didn\u0027t we pass in a do_driver_attach\u003dTrue/False or something like that. I wonder if this would make sense here? I am unsure.","commit_id":"be6d5fa4e630b428fad74f2a6540e920d810c477"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":5058,"context_line":"                    context, volume_id, instance.uuid)"},{"line_number":5059,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":5060,"context_line":"            driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":5061,"context_line":"            driver_bdm.driver_detach(context, instance, connector,"},{"line_number":5062,"context_line":"                                     self.volume_api, self.driver)"},{"line_number":5063,"context_line":"            self.volume_api.terminate_connection(context, volume_id, connector)"},{"line_number":5064,"context_line":"        except exception.NotFound:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_ffd564b8","side":"PARENT","line":5061,"in_reply_to":"dfeb2761_10ad9f30","updated":"2017-04-03 15:08:16.000000000","message":"Yeah mdbooth and others were against the use of these kwargs iirc and I\u0027d like to avoid introducing additional complexity in this change if possible.","commit_id":"be6d5fa4e630b428fad74f2a6540e920d810c477"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"69c7a363333b1705d6e71762e217ee1b767c9864","unresolved":false,"context_lines":[{"line_number":2261,"context_line":"                #             just tell cinder that we are done with it."},{"line_number":2262,"context_line":"                connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":2263,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":2264,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":2265,"context_line":"                                            connector\u003dconnector)"},{"line_number":2266,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2267,"context_line":"                LOG.debug(\u0027Ignoring DiskNotFound: %s\u0027, exc,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_caf9e080","line":2264,"range":{"start_line":2264,"start_character":34,"end_line":2264,"end_character":43},"updated":"2017-04-01 10:37:40.000000000","message":"s/terminate/detach/","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":2261,"context_line":"                #             just tell cinder that we are done with it."},{"line_number":2262,"context_line":"                connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":2263,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":2264,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":2265,"context_line":"                                            connector\u003dconnector)"},{"line_number":2266,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2267,"context_line":"                LOG.debug(\u0027Ignoring DiskNotFound: %s\u0027, exc,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_bf16bcf0","line":2264,"in_reply_to":"dfeb2761_caf9e080","updated":"2017-04-03 15:08:16.000000000","message":"Done","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"150a6768835b7766370feaaecf33cfe0f49d1e95","unresolved":false,"context_lines":[{"line_number":3940,"context_line":"        for bdm in bdms:"},{"line_number":3941,"context_line":"            if bdm.is_volume:"},{"line_number":3942,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":3943,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":3944,"context_line":"                                            connector\u003dconnector)"},{"line_number":3945,"context_line":""},{"line_number":3946,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_7083cbcd","line":3943,"range":{"start_line":3943,"start_character":63,"end_line":3943,"end_character":78},"updated":"2017-04-03 13:09:09.000000000","message":"I am unsure why this is passed in here. I know this matches attach, but I think we messed that up.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":3940,"context_line":"        for bdm in bdms:"},{"line_number":3941,"context_line":"            if bdm.is_volume:"},{"line_number":3942,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":3943,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":3944,"context_line":"                                            connector\u003dconnector)"},{"line_number":3945,"context_line":""},{"line_number":3946,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_3f9cec5b","line":3943,"range":{"start_line":3943,"start_character":63,"end_line":3943,"end_character":78},"in_reply_to":"dfeb2761_7083cbcd","updated":"2017-04-03 15:08:16.000000000","message":"I\u0027m not sure I understand your concern, DriverVolumeBlockDevice doesn\u0027t retain a reference to the volume_api so we always pass this in when we are going to use it.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"150a6768835b7766370feaaecf33cfe0f49d1e95","unresolved":false,"context_lines":[{"line_number":3941,"context_line":"            if bdm.is_volume:"},{"line_number":3942,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":3943,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":3944,"context_line":"                                            connector\u003dconnector)"},{"line_number":3945,"context_line":""},{"line_number":3946,"context_line":"    @staticmethod"},{"line_number":3947,"context_line":"    def _set_instance_info(instance, instance_type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_d01cd7c2","line":3944,"updated":"2017-04-03 13:09:09.000000000","message":"Thinking about this, I geuss we could get hold of the connector inside the bdm, for the cases where thats needed?\n\nThat way could we make terminate and delete attachment basically be the same call? I am curious.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":3941,"context_line":"            if bdm.is_volume:"},{"line_number":3942,"context_line":"                driver_bdm \u003d driver_block_device.convert_volume(bdm)"},{"line_number":3943,"context_line":"                driver_bdm.volume_terminate(context, instance, self.volume_api,"},{"line_number":3944,"context_line":"                                            connector\u003dconnector)"},{"line_number":3945,"context_line":""},{"line_number":3946,"context_line":"    @staticmethod"},{"line_number":3947,"context_line":"    def _set_instance_info(instance, instance_type):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_5f357045","line":3944,"in_reply_to":"dfeb2761_d01cd7c2","updated":"2017-04-03 15:08:16.000000000","message":"We already have it in the connection_info for cinderv2 calls to terminate_connection where the local connector is different, for example during evacuate. \n\nWe don\u0027t need this with cinderv3 as we don\u0027t need to provide the connector when removing attachments, only during the initial creation.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"150a6768835b7766370feaaecf33cfe0f49d1e95","unresolved":false,"context_lines":[{"line_number":5047,"context_line":"            old_volume_id, new_volume_id)"},{"line_number":5048,"context_line":""},{"line_number":5049,"context_line":"    @wrap_exception()"},{"line_number":5050,"context_line":"    def remove_volume_connection(self, context, volume_id, instance):"},{"line_number":5051,"context_line":"        \"\"\"Remove a volume connection using the volume api.\"\"\""},{"line_number":5052,"context_line":"        # NOTE(vish): We don\u0027t want to actually mark the volume"},{"line_number":5053,"context_line":"        #             detached, or delete the bdm, just remove the"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_50a2074d","line":5050,"updated":"2017-04-03 13:09:09.000000000","message":"I think this is only used in VM moves, probably only live-migration rollback I think, we should probably document that better?","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4eb6b79231dfc5839a6a7aa94da8172490ff211e","unresolved":false,"context_lines":[{"line_number":5047,"context_line":"            old_volume_id, new_volume_id)"},{"line_number":5048,"context_line":""},{"line_number":5049,"context_line":"    @wrap_exception()"},{"line_number":5050,"context_line":"    def remove_volume_connection(self, context, volume_id, instance):"},{"line_number":5051,"context_line":"        \"\"\"Remove a volume connection using the volume api.\"\"\""},{"line_number":5052,"context_line":"        # NOTE(vish): We don\u0027t want to actually mark the volume"},{"line_number":5053,"context_line":"        #             detached, or delete the bdm, just remove the"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_bf711c0f","line":5050,"in_reply_to":"dfeb2761_50a2074d","updated":"2017-04-03 15:08:16.000000000","message":"Yeah we wanted to get rid of it entirely tbh. I\u0027ll follow up with another change documenting that it only has a single caller and the fact we want to remove it.","commit_id":"2c19283f50eab01508d470417eb61e2f95bf99e9"}]}
