)]}'
{"nova/virt/block_device.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"449f50cb2b3ad19795668761588f3b9d0c2b9798","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                         \u0027err\u0027: err}, instance\u003dinstance)"},{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume before timeout\u0027,"},{"line_number":310,"context_line":"                            instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_1ee9d0b5","line":309,"range":{"start_line":309,"start_character":67,"end_line":309,"end_character":74},"updated":"2018-02-21 15:42:58.000000000","message":"nit: this is really specific to how the libvirt driver is using this, but this is the code that all virt drivers go through for detaching a volume. But it also looks like the libvirt driver is the only one that raises this, so it\u0027s OK.","commit_id":"acfc6e6dc845b0984c64501dc4a6c9212d2b662a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"449f50cb2b3ad19795668761588f3b9d0c2b9798","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                         \u0027err\u0027: err}, instance\u003dinstance)"},{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume before timeout\u0027,"},{"line_number":310,"context_line":"                            instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_bed1bcfd","line":309,"range":{"start_line":309,"start_character":53,"end_line":309,"end_character":59},"updated":"2018-02-21 15:42:58.000000000","message":"nit: throw the volume_id in here for context.","commit_id":"acfc6e6dc845b0984c64501dc4a6c9212d2b662a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"df21bbfbd4a78396d78962947184cecc1f3cf1a1","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                         \u0027err\u0027: err}, instance\u003dinstance)"},{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume before timeout\u0027,"},{"line_number":310,"context_line":"                            instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa0c359_de53686a","line":309,"range":{"start_line":309,"start_character":67,"end_line":309,"end_character":74},"in_reply_to":"3fa0c359_1ee9d0b5","updated":"2018-02-21 15:47:13.000000000","message":"Fair, I\u0027ll just remove timeout from the message and I think it\u0027s still just as useful. This came from when it was in the libvirt driver, but out here I agree it should be generic.","commit_id":"acfc6e6dc845b0984c64501dc4a6c9212d2b662a"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"61e176d948245ccfc4fe1be2f0f55d6cd16fe0a3","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume %(vol)s\u0027,"},{"line_number":310,"context_line":"                            vol\u003dvolume_id, instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":313,"context_line":"                LOG.exception(\u0027Failed to detach volume \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_b9dd5671","line":310,"range":{"start_line":310,"start_character":28,"end_line":310,"end_character":41},"updated":"2018-02-21 16:04:39.000000000","message":"I don\u0027t think this will work, has to be a dict i.e. dict(vol\u003dvolume_id) or {\u0027vol\u0027: volume_id}","commit_id":"61bc85f265c55e66544069190cbe5121b67427f3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bf3359696b29e15a5fbe247df2334dc02651a094","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume %(vol)s\u0027,"},{"line_number":310,"context_line":"                            vol\u003dvolume_id, instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":313,"context_line":"                LOG.exception(\u0027Failed to detach volume \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_cf7414d2","line":310,"range":{"start_line":310,"start_character":28,"end_line":310,"end_character":41},"in_reply_to":"3fa0c359_8f8cccd7","updated":"2018-02-21 17:41:18.000000000","message":"Yea, sorry. This is how I _want_ these to work, but...","commit_id":"61bc85f265c55e66544069190cbe5121b67427f3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4d4e86dc338cd5d7107d78784ee1e88fe4a2d5ba","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        except exception.DeviceDetachFailed as err:"},{"line_number":308,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":309,"context_line":"                LOG.warning(\u0027Guest refused to detach volume %(vol)s\u0027,"},{"line_number":310,"context_line":"                            vol\u003dvolume_id, instance\u003dinstance)"},{"line_number":311,"context_line":"        except Exception:"},{"line_number":312,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":313,"context_line":"                LOG.exception(\u0027Failed to detach volume \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa0c359_8f8cccd7","line":310,"range":{"start_line":310,"start_character":28,"end_line":310,"end_character":41},"in_reply_to":"3fa0c359_b9dd5671","updated":"2018-02-21 17:39:34.000000000","message":"Oh right, yeah. Got me again.","commit_id":"61bc85f265c55e66544069190cbe5121b67427f3"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a6849b67291a4946d89c805481b500b79e215bf1","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                              \u0027%(volume_id)s from %(mp)s\u0027,"},{"line_number":315,"context_line":"                              {\u0027volume_id\u0027: volume_id, \u0027mp\u0027: mp},"},{"line_number":316,"context_line":"                              instance\u003dinstance)"},{"line_number":317,"context_line":"                volume_api.roll_detaching(context, volume_id)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @staticmethod"},{"line_number":320,"context_line":"    def _get_volume(context, volume_api, volume_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_6df87d7a","line":317,"range":{"start_line":317,"start_character":16,"end_line":317,"end_character":61},"updated":"2018-08-10 07:20:55.000000000","message":"We still need this when we catch DeviceDetachFailed.","commit_id":"b16c0f10539a6c6b547a70a41c75ef723fc618ce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dee128e40d0e2f7d974778c32e68712fc68ffd0e","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                              \u0027%(volume_id)s from %(mp)s\u0027,"},{"line_number":315,"context_line":"                              {\u0027volume_id\u0027: volume_id, \u0027mp\u0027: mp},"},{"line_number":316,"context_line":"                              instance\u003dinstance)"},{"line_number":317,"context_line":"                volume_api.roll_detaching(context, volume_id)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @staticmethod"},{"line_number":320,"context_line":"    def _get_volume(context, volume_api, volume_id):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_4bf80648","line":317,"range":{"start_line":317,"start_character":16,"end_line":317,"end_character":61},"in_reply_to":"3f79a3b5_6df87d7a","updated":"2018-08-10 12:08:23.000000000","message":"Yeah...assuming you\u0027ll post a patch?","commit_id":"b16c0f10539a6c6b547a70a41c75ef723fc618ce"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d6129a18105ab727c427dff881f7c41106fe58ae","unresolved":false,"context_lines":[{"line_number":1561,"context_line":"                                                             live\u003dlive)"},{"line_number":1562,"context_line":"            wait_for_detach()"},{"line_number":1563,"context_line":""},{"line_number":1564,"context_line":"        except exception.DeviceDetachFailed:"},{"line_number":1565,"context_line":"            LOG.warning(\"Guest refused to detach volume before timeout\","},{"line_number":1566,"context_line":"                        instance\u003dinstance)"},{"line_number":1567,"context_line":"            # NOTE(danms): The guest didn\u0027t do it\u0027s thing in time,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_56eaf1d7","line":1564,"range":{"start_line":1564,"start_character":25,"end_line":1564,"end_character":43},"updated":"2018-02-20 22:51:31.000000000","message":"Note to self: we only raise this for failure to detach from the live domain (ACPI request) so this will correctly only log and return for a guest refusing to detach from live domain.","commit_id":"d057aab69213cd130a3cfdcbae180792a874be73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d6dd286584572f261c478ca5c70ad9915f0f19a","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"                        instance\u003dinstance)"},{"line_number":1567,"context_line":"            # NOTE(danms): The guest didn\u0027t do it\u0027s thing in time,"},{"line_number":1568,"context_line":"            # which is likely either because it refused/failed to unmount,"},{"line_number":1569,"context_line":"            # or isn\u0027t responding to ACPI requests right now. In either case,"},{"line_number":1570,"context_line":"            # we don\u0027t want/need to fail by raising, nor do we want to"},{"line_number":1571,"context_line":"            # fall through and disconnect the volume, freeing it up for"},{"line_number":1572,"context_line":"            # attaching to something else."},{"line_number":1573,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_fbef561a","line":1570,"range":{"start_line":1569,"start_character":62,"end_line":1570,"end_character":52},"updated":"2018-02-21 14:53:07.000000000","message":"Why wouldn\u0027t we want to fail the detach volume request by raising? If I told nova to detach a volume and then I\u0027m polling Cinder for the volume status to go from in-use to available, and it doesn\u0027t, I\u0027m going to wonder what\u0027s going on. Before this change, I could look at the faults for the instance and see that detach failed because the compute manager will create a fault for the instance. The instance action event would also be marked as failed (which is really the only way for a user to check the results of an asynchronous operation via the compute API).\n\nAfter this change, there would be no fault and the detach volume instance event would be marked as successful even though it failed.\n\nI think catching the exception that is specific to the driver here and logging a warning about the specific issue, then re-raising it is OK. If you want to handle this higher up the stack, you can handle it in here:\n\nhttps://github.com/openstack/nova/blob/addbfae6769c1033c618019868314ef3100746d9/nova/virt/block_device.py#L309","commit_id":"d057aab69213cd130a3cfdcbae180792a874be73"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7d619edca73d3bed3ea540d7b054dc6938cd9e76","unresolved":false,"context_lines":[{"line_number":1566,"context_line":"                        instance\u003dinstance)"},{"line_number":1567,"context_line":"            # NOTE(danms): The guest didn\u0027t do it\u0027s thing in time,"},{"line_number":1568,"context_line":"            # which is likely either because it refused/failed to unmount,"},{"line_number":1569,"context_line":"            # or isn\u0027t responding to ACPI requests right now. In either case,"},{"line_number":1570,"context_line":"            # we don\u0027t want/need to fail by raising, nor do we want to"},{"line_number":1571,"context_line":"            # fall through and disconnect the volume, freeing it up for"},{"line_number":1572,"context_line":"            # attaching to something else."},{"line_number":1573,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_de95a888","line":1570,"range":{"start_line":1569,"start_character":62,"end_line":1570,"end_character":52},"in_reply_to":"3fa0c359_fbef561a","updated":"2018-02-21 15:26:34.000000000","message":"Ah, yeah, okay I missed that we\u0027d continue on and delete the BDM if we don\u0027t fail here. The rest of this code ignores certain exceptions and raises others, so I thought it was safe, and the instance wasn\u0027t getting put into error state. But, I see also that we\u0027d add an instance fault and record the failure in the action. I definitely wasn\u0027t looking for that when debugging this, but it makes sense I guess.","commit_id":"d057aab69213cd130a3cfdcbae180792a874be73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a6c4e86d5da3f8f8dc089ed44eb3a551f83026c4","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"            # we don\u0027t want/need to fail by raising, nor do we want to"},{"line_number":1571,"context_line":"            # fall through and disconnect the volume, freeing it up for"},{"line_number":1572,"context_line":"            # attaching to something else."},{"line_number":1573,"context_line":"            return"},{"line_number":1574,"context_line":"        except exception.InstanceNotFound:"},{"line_number":1575,"context_line":"            # NOTE(zhaoqin): If the instance does not exist, _lookup_by_name()"},{"line_number":1576,"context_line":"            #                will throw InstanceNotFound exception. Need to"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_3b905e43","line":1573,"range":{"start_line":1573,"start_character":12,"end_line":1573,"end_character":18},"updated":"2018-02-21 15:01:59.000000000","message":"To be clear, this is my -1; the bug is about an unhelpful traceback. The warning above gives some context on the failure to help support people, but I think we still need to raise an exception out of here because we failed to detach the disk config from the guest. If we want to also handle that somehow in the DriverVolumeBlockDevice.driver_detach code to not trace, we can do that also.","commit_id":"d057aab69213cd130a3cfdcbae180792a874be73"}]}
