)]}'
{"nova/db/api.py":[{"author":{"_account_id":25113,"name":"Fan Zhang","email":"zh.f@outlook.com","username":"fanzhang"},"change_message_id":"c60e88c58ba5153fb0dc92bf32e35b0315ea3d3d","unresolved":false,"context_lines":[{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get all block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                      instance_uuid)"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_0e935801","line":1244,"range":{"start_line":1244,"start_character":16,"end_line":1244,"end_character":53},"updated":"2018-11-01 06:37:48.000000000","message":"block_device_mapping_get_root_by_instance","commit_id":"fea28d77a740c7d0472814dab63feb27d30dfc82"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"406f6460b3484af9f3d963869e41e68ab75a4a70","unresolved":false,"context_lines":[{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get all block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                      instance_uuid)"},{"line_number":1246,"context_line":""},{"line_number":1247,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_6e6f6cfb","line":1244,"range":{"start_line":1244,"start_character":16,"end_line":1244,"end_character":53},"in_reply_to":"3f79a3b5_0e935801","updated":"2018-11-01 06:40:26.000000000","message":"Done","commit_id":"fea28d77a740c7d0472814dab63feb27d30dfc82"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"6fc8b949244e376ccd8940174b0ffeee51193046","unresolved":false,"context_lines":[{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get all block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_get_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                          instance_uuid)"},{"line_number":1246,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_7c3b9199","line":1243,"range":{"start_line":1243,"start_character":0,"end_line":1243,"end_character":64},"updated":"2018-12-03 08:29:50.000000000","message":"This should be updated like:\n\nGet the root block device mapping for a given instance.","commit_id":"953aaea65091ead541def6cf56f56a23d899d7c9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"458b0c08e974048ddd879dd0c09af2cb87c27f49","unresolved":false,"context_lines":[{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get all block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_get_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                          instance_uuid)"},{"line_number":1246,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_fcd6c1c1","line":1243,"range":{"start_line":1243,"start_character":0,"end_line":1243,"end_character":64},"in_reply_to":"3f79a3b5_7c3b9199","updated":"2018-12-03 08:32:13.000000000","message":"Done","commit_id":"953aaea65091ead541def6cf56f56a23d899d7c9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8226a19701cecfe7114278b9b0cca5cf0ffda2ef","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        context, volume_id, instance_uuid, columns_to_join)"},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get the root block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_get_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                          instance_uuid)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_7e334160","line":1242,"updated":"2018-12-18 16:54:42.000000000","message":"Do we really need the DB API changes? We already have BlockDeviceMappingList.root_bdm().","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"33b3c146aa31ff0c8ea9745c07052c9cac0f8e69","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"        context, volume_id, instance_uuid, columns_to_join)"},{"line_number":1240,"context_line":""},{"line_number":1241,"context_line":""},{"line_number":1242,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":1243,"context_line":"    \"\"\"Get the root block device mapping belonging to an instance.\"\"\""},{"line_number":1244,"context_line":"    return IMPL.block_device_mapping_get_root_by_instance(context,"},{"line_number":1245,"context_line":"                                                          instance_uuid)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_014e716e","line":1242,"in_reply_to":"3f79a3b5_7e334160","updated":"2019-02-12 11:32:21.000000000","message":"Hmm, yes, I guess we can get rid of this, BlockDeviceMappingList.root_bdm() seems enough.","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"6fc8b949244e376ccd8940174b0ffeee51193046","unresolved":false,"context_lines":[{"line_number":3832,"context_line":""},{"line_number":3833,"context_line":""},{"line_number":3834,"context_line":"@require_context"},{"line_number":3835,"context_line":"@pick_context_manager_reader_allow_async"},{"line_number":3836,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":3837,"context_line":"    return _block_device_mapping_get_query(context).\\"},{"line_number":3838,"context_line":"                 filter_by(instance_uuid\u003dinstance_uuid).\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_fce561d0","line":3835,"range":{"start_line":3835,"start_character":0,"end_line":3835,"end_character":40},"updated":"2018-12-03 08:29:50.000000000","message":"I\u0027m not sure the rule about when we should use \"@pick_context_manager_reader_allow_async\" or \"@pick_context_manager_reader\", but I saw [1], it seems it would be used when we already have an async operation, and in here, we can see called from [2], it seems not a async process.\n\nSo, I think we could use @pick_context_manager_reader is OK. And I still think it\u0027s better to get some idea from other.\n\n[1] https://review.openstack.org/#/c/249235/6/oslo_db/sqlalchemy/enginefacade.py\n[2] https://review.openstack.org/#/c/614672/10/nova/objects/block_device.py@340","commit_id":"953aaea65091ead541def6cf56f56a23d899d7c9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"458b0c08e974048ddd879dd0c09af2cb87c27f49","unresolved":false,"context_lines":[{"line_number":3832,"context_line":""},{"line_number":3833,"context_line":""},{"line_number":3834,"context_line":"@require_context"},{"line_number":3835,"context_line":"@pick_context_manager_reader_allow_async"},{"line_number":3836,"context_line":"def block_device_mapping_get_root_by_instance(context, instance_uuid):"},{"line_number":3837,"context_line":"    return _block_device_mapping_get_query(context).\\"},{"line_number":3838,"context_line":"                 filter_by(instance_uuid\u003dinstance_uuid).\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_3ccd192d","line":3835,"range":{"start_line":3835,"start_character":0,"end_line":3835,"end_character":40},"in_reply_to":"3f79a3b5_fce561d0","updated":"2018-12-03 08:32:13.000000000","message":"Done","commit_id":"953aaea65091ead541def6cf56f56a23d899d7c9"}],"nova/objects/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8226a19701cecfe7114278b9b0cca5cf0ffda2ef","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                                     self.instance_uuid)"},{"line_number":378,"context_line":"        self.obj_reset_changes(fields\u003d[\u0027instance\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def cleanup_fields_for_root_bdm(self):"},{"line_number":381,"context_line":"        self.volume_id \u003d None"},{"line_number":382,"context_line":"        self.attachment_id \u003d None"},{"line_number":383,"context_line":"        self.volume_size \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_7e1ca1c2","line":380,"range":{"start_line":380,"start_character":8,"end_line":380,"end_character":15},"updated":"2018-12-18 16:54:42.000000000","message":"\"cleanup\" is kind of an odd fit here, maybe \"reset\" is better? You should provide a docstring either way.\n\nI\u0027m altogether not sure I like business logic like this in the object itself anyway - if this is only called from one place, couldn\u0027t we just do this there?","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"33b3c146aa31ff0c8ea9745c07052c9cac0f8e69","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                                     self.instance_uuid)"},{"line_number":378,"context_line":"        self.obj_reset_changes(fields\u003d[\u0027instance\u0027])"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def cleanup_fields_for_root_bdm(self):"},{"line_number":381,"context_line":"        self.volume_id \u003d None"},{"line_number":382,"context_line":"        self.attachment_id \u003d None"},{"line_number":383,"context_line":"        self.volume_size \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_c1c869a9","line":380,"range":{"start_line":380,"start_character":8,"end_line":380,"end_character":15},"in_reply_to":"3f79a3b5_7e1ca1c2","updated":"2019-02-12 11:32:21.000000000","message":"I think I get the idea here:\nhttps://github.com/openstack/nova/blob/b2a995f19867bb2eedcb615d7f7431bdbef73c8e/nova/objects/request_spec.py#L657\nIt will be called in few functions in both compute/api.py and compute/manager.py: https://review.openstack.org/#/c/614750/\nso do you prefer it like this or do you prefer do it probably in compute/utils.py?","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8226a19701cecfe7114278b9b0cca5cf0ffda2ef","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        self.volume_size \u003d None"},{"line_number":384,"context_line":"        self.connection_info \u003d None"},{"line_number":385,"context_line":"        self.tag \u003d None"},{"line_number":386,"context_line":"        self.device_type \u003d None"},{"line_number":387,"context_line":"        self.disk_bus \u003d None"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_be06b972","line":387,"range":{"start_line":386,"start_character":8,"end_line":387,"end_character":28},"updated":"2018-12-18 16:54:42.000000000","message":"Hmm, these can be passed in during boot from volume with the block_device_mapping_v2 parameter but not during volume attach. They might not be valid for a new root bdm anyway, but it\u0027s not something I thought about resetting.\n\nLooking at other fields, volume_type is probably also something to reset. What about device_name and guest_format? I guess guest_format wouldn\u0027t be set for a root bdm since guest_format is only for swap and ephemeral BDMs. But device_name could be changed on a subsequent attach request (even though we ignore it).\n\nThe image_id and snapshot_id fields would also likely be irrelevant if you changed the root volume, so I don\u0027t know if we should reset those to None or not also.","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"33b3c146aa31ff0c8ea9745c07052c9cac0f8e69","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        self.volume_size \u003d None"},{"line_number":384,"context_line":"        self.connection_info \u003d None"},{"line_number":385,"context_line":"        self.tag \u003d None"},{"line_number":386,"context_line":"        self.device_type \u003d None"},{"line_number":387,"context_line":"        self.disk_bus \u003d None"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_61c3bd58","line":387,"range":{"start_line":386,"start_character":8,"end_line":387,"end_character":28},"in_reply_to":"3f79a3b5_be06b972","updated":"2019-02-12 11:32:21.000000000","message":"So, it seems device_type and disk_bus is related with the driver configuration on this compute node and does not have relation with volume, so in attach/detach case, this will not change so we don\u0027t have to reset them, right? \n\nIf we don\u0027t reset image_id and snapshot_id, it is probably OK if we then attach a new volume sueccesfully, as we can update according to the new volume, but if something goes wrong, we have to rollback with this method, maybe reset them could be more consistancy.","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"666ce81bf73189d7ddb08eaef390d237ee334376","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        self.volume_size \u003d None"},{"line_number":384,"context_line":"        self.connection_info \u003d None"},{"line_number":385,"context_line":"        self.tag \u003d None"},{"line_number":386,"context_line":"        self.device_type \u003d None"},{"line_number":387,"context_line":"        self.disk_bus \u003d None"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_816d8133","line":387,"range":{"start_line":386,"start_character":8,"end_line":387,"end_character":28},"in_reply_to":"9fdfeff1_61c3bd58","updated":"2019-02-12 11:48:04.000000000","message":"would the actual device_name have affect on whether it is the root volume?","commit_id":"82884c897cac0fc0cb21de8838e02ee806e223d6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a44f9f983d8c5949633fd0eecaee764a14804a1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    # Version 1.18: Added attachment_id"},{"line_number":71,"context_line":"    # Version 1.19: Added uuid"},{"line_number":72,"context_line":"    # Version 1.20: Added volume_type"},{"line_number":73,"context_line":"    # Version 1.21: Add reset_fields_for_root_bdm()"},{"line_number":74,"context_line":"    VERSION \u003d \u00271.21\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_cbe2c8d4","line":73,"range":{"start_line":73,"start_character":24,"end_line":73,"end_character":49},"updated":"2019-02-25 17:34:11.000000000","message":"This is not a remotable method so we don\u0027t need the version bump.","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5f139dfc3ed1c80552bd2a50b1bc71cfed60af0d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    # Version 1.18: Added attachment_id"},{"line_number":71,"context_line":"    # Version 1.19: Added uuid"},{"line_number":72,"context_line":"    # Version 1.20: Added volume_type"},{"line_number":73,"context_line":"    # Version 1.21: Add reset_fields_for_root_bdm()"},{"line_number":74,"context_line":"    VERSION \u003d \u00271.21\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_208a861a","line":73,"range":{"start_line":73,"start_character":24,"end_line":73,"end_character":49},"in_reply_to":"9fdfeff1_cbe2c8d4","updated":"2019-02-26 02:04:38.000000000","message":"Done","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a44f9f983d8c5949633fd0eecaee764a14804a1","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                                                     self.instance_uuid)"},{"line_number":369,"context_line":"        self.obj_reset_changes(fields\u003d[\u0027instance\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def reset_fields_for_root_bdm(self):"},{"line_number":372,"context_line":"        self.volume_id \u003d None"},{"line_number":373,"context_line":"        self.attachment_id \u003d None"},{"line_number":374,"context_line":"        self.volume_size \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_abcd045e","line":371,"range":{"start_line":371,"start_character":8,"end_line":371,"end_character":33},"updated":"2019-02-25 17:34:11.000000000","message":"A docstring on this would be good, i.e. in what cases would this be used?\n\nMaybe also rename this to \"reset_fields_for_detached_root_bdm\" so it\u0027s a bit more clear about usage.","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5f139dfc3ed1c80552bd2a50b1bc71cfed60af0d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                                                     self.instance_uuid)"},{"line_number":369,"context_line":"        self.obj_reset_changes(fields\u003d[\u0027instance\u0027])"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    def reset_fields_for_root_bdm(self):"},{"line_number":372,"context_line":"        self.volume_id \u003d None"},{"line_number":373,"context_line":"        self.attachment_id \u003d None"},{"line_number":374,"context_line":"        self.volume_size \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_408f8a29","line":371,"range":{"start_line":371,"start_character":8,"end_line":371,"end_character":33},"in_reply_to":"9fdfeff1_abcd045e","updated":"2019-02-26 02:04:38.000000000","message":"Done","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"44513d4d68931a49c57a9dc65c0142256221143d","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        self.connection_info \u003d None"},{"line_number":376,"context_line":"        self.tag \u003d None"},{"line_number":377,"context_line":"        self.volume_type \u003d None"},{"line_number":378,"context_line":"        self.device_name \u003d None"},{"line_number":379,"context_line":"        self.image_id \u003d None"},{"line_number":380,"context_line":"        self.snapshot_id \u003d None"},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_c1b38999","line":378,"updated":"2019-02-25 17:52:00.000000000","message":"See comments in https://review.openstack.org/#/c/614750/ about the device_name but I don\u0027t see a good reason why we\u0027d reset on detach and then have to generate a new device name on attach - the boot_index remains 0 and you can only have one bdm with a boot_index of 0:\n\nhttps://github.com/openstack/nova/blob/d5bde60e5680962394e263a662a2f331b6da93cd/nova/compute/api.py#L1413\n\nSo I would expect the device_name to not change. You also can\u0027t change the disk_bus or device_type on attach so that wouldn\u0027t affect the device name either. Plus, at least for the libvirt driver, the device_name is not used anyway - meaning what you get in the guest might be something different from what nova says.","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5f139dfc3ed1c80552bd2a50b1bc71cfed60af0d","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        self.connection_info \u003d None"},{"line_number":376,"context_line":"        self.tag \u003d None"},{"line_number":377,"context_line":"        self.volume_type \u003d None"},{"line_number":378,"context_line":"        self.device_name \u003d None"},{"line_number":379,"context_line":"        self.image_id \u003d None"},{"line_number":380,"context_line":"        self.snapshot_id \u003d None"},{"line_number":381,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_80701242","line":378,"in_reply_to":"9fdfeff1_c1b38999","updated":"2019-02-26 02:04:38.000000000","message":"Done","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a44f9f983d8c5949633fd0eecaee764a14804a1","unresolved":false,"context_lines":[{"line_number":371,"context_line":"    def reset_fields_for_root_bdm(self):"},{"line_number":372,"context_line":"        self.volume_id \u003d None"},{"line_number":373,"context_line":"        self.attachment_id \u003d None"},{"line_number":374,"context_line":"        self.volume_size \u003d None"},{"line_number":375,"context_line":"        self.connection_info \u003d None"},{"line_number":376,"context_line":"        self.tag \u003d None"},{"line_number":377,"context_line":"        self.volume_type \u003d None"},{"line_number":378,"context_line":"        self.device_name \u003d None"},{"line_number":379,"context_line":"        self.image_id \u003d None"},{"line_number":380,"context_line":"        self.snapshot_id \u003d None"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":18,"id":"9fdfeff1_be41c065","line":380,"range":{"start_line":374,"start_character":8,"end_line":380,"end_character":31},"updated":"2019-02-25 17:34:11.000000000","message":"The spec only says that volume_id and attachment_id will be nulled out on detach of the root volume:\n\nhttps://specs.openstack.org/openstack/nova-specs/specs/stein/approved/detach-boot-volume.html#proposed-change\n\nSo why are we nulling everything else out?\n\nAlso, we will still continue to show the root volume when listing volumes attached to the instance right? I mean with a GET /servers/{server_id}/os-volume_attachments call:\n\nhttps://developer.openstack.org/api-ref/compute/?expanded\u003dlist-volume-attachments-for-an-instance-detail#list-volume-attachments-for-an-instance\n\nBased on that we might want the device_name (and as of https://review.openstack.org/#/c/631948/ the tag). Otherwise what is the API going to be showing for the volume_id when the root volume is detached? Just None? Looking at https://review.openstack.org/#/c/623981/11/nova/api/openstack/compute/volumes.py I guess yeah we\u0027ll just show None for the volume_id and with the new microversion we\u0027ll also show the boot_index, so if you see a volume attachment with volume_id\u003dNone and boot_index\u003d0 it means the root volume is detached.","commit_id":"9311aceadf385e3c2655cf44aae720b9b7282eac"}]}
