)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bb351e39317e168d90e9351278647caae52302d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-10-05 15:16:02 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"libvirt: Wait for abort_job to complete when not resizing"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ibaca465300fffb7031843ce889b77f54d74069bd"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a95cdbc_5d56202a","line":8,"updated":"2016-10-05 14:20:45.000000000","message":"Track against bug 1630600 please.","commit_id":"98f954956b55c75b2f0fcbaaf1779177dc4dbc34"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3808e700f479c395aae1cc6c195b8f6ff211d71f","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                time.sleep(0.5)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            if resize_to:"},{"line_number":1199,"context_line":"                dev.resize(resize_to * units.Gi / units.Ki)"},{"line_number":1200,"context_line":"        finally:"},{"line_number":1201,"context_line":"            self._host.write_instance_config(xml)"},{"line_number":1202,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_bd6d6406","line":1199,"range":{"start_line":1199,"start_character":16,"end_line":1199,"end_character":59},"updated":"2016-10-05 14:19:50.000000000","message":"Do we need to wait for this to complete?","commit_id":"98f954956b55c75b2f0fcbaaf1779177dc4dbc34"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bb351e39317e168d90e9351278647caae52302d","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"                time.sleep(0.5)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            if resize_to:"},{"line_number":1199,"context_line":"                dev.resize(resize_to * units.Gi / units.Ki)"},{"line_number":1200,"context_line":"        finally:"},{"line_number":1201,"context_line":"            self._host.write_instance_config(xml)"},{"line_number":1202,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_3d307401","line":1199,"range":{"start_line":1199,"start_character":16,"end_line":1199,"end_character":59},"in_reply_to":"1a95cdbc_bd6d6406","updated":"2016-10-05 14:20:45.000000000","message":"Also, we should log a debug statement in case we get into the resize_to block and log the resize_to value.","commit_id":"98f954956b55c75b2f0fcbaaf1779177dc4dbc34"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6bb351e39317e168d90e9351278647caae52302d","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"            if resize_to:"},{"line_number":1199,"context_line":"                dev.resize(resize_to * units.Gi / units.Ki)"},{"line_number":1200,"context_line":"        finally:"},{"line_number":1201,"context_line":"            self._host.write_instance_config(xml)"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1204,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a95cdbc_fd252cc2","line":1201,"updated":"2016-10-05 14:20:45.000000000","message":"We could do it in this patch or a follow up, but we should wrap this in an excutils.save_and_reraise_exception.","commit_id":"98f954956b55c75b2f0fcbaaf1779177dc4dbc34"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"847aa553e635442480b76408756c3fdffebdd82c","unresolved":false,"context_lines":[{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1211,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"},{"line_number":1212,"context_line":"        LOG.debug("},{"line_number":1213,"context_line":"            \u0027swap_volume(old_connection_info\u003d%(old_conn)s, \u0027"},{"line_number":1214,"context_line":"                        \u0027new_connection_info\u003d%(new_conn)s, \u0027"},{"line_number":1215,"context_line":"                        \u0027instance\u003d%(instance_uuid)s, \u0027"},{"line_number":1216,"context_line":"                        \u0027mountpoint\u003d%(mountpoint)s, \u0027"},{"line_number":1217,"context_line":"                        \u0027resize_to\u003d%(resize_to)s)\u0027,"},{"line_number":1218,"context_line":"            {"},{"line_number":1219,"context_line":"                \u0027old_conn\u0027: strutils.mask_password(old_connection_info),"},{"line_number":1220,"context_line":"                \u0027new_conn\u0027: strutils.mask_password(new_connection_info),"},{"line_number":1221,"context_line":"                \u0027instance_uuid\u0027: instance.uuid,"},{"line_number":1222,"context_line":"                \u0027mountpoint\u0027: mountpoint,"},{"line_number":1223,"context_line":"                \u0027resize_to\u0027: resize_to,"},{"line_number":1224,"context_line":"            })"},{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"        guest \u003d self._host.get_guest(instance)"},{"line_number":1227,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_93546fca","line":1224,"range":{"start_line":1212,"start_character":8,"end_line":1224,"end_character":14},"updated":"2016-11-03 15:21:35.000000000","message":"Rather than adding additional debug logs here, I think the existing debug logs in manager should be updated to include the resize_to value. \n\nmdbooth also pointed out that the passwords should be masked in the manager debug logs, but I think that should be a different patch.","commit_id":"ffceae5c74af8109a4864e80715b443c1b2479f6"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"abc2006374814f61acd27ef5400ab3ad474e3f45","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"        except Exception:"},{"line_number":1174,"context_line":"            pass"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"        reraise \u003d False"},{"line_number":1177,"context_line":"        try:"},{"line_number":1178,"context_line":"            # NOTE (rmk): blockRebase cannot be executed on persistent"},{"line_number":1179,"context_line":"            #             domains, so we need to temporarily undefine it."},{"line_number":1180,"context_line":"            #             If any part of this block fails, the domain is"},{"line_number":1181,"context_line":"            #             re-defined regardless."},{"line_number":1182,"context_line":"            if guest.has_persistent_configuration():"},{"line_number":1183,"context_line":"                guest.delete_configuration()"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # Start copy with VIR_DOMAIN_REBASE_REUSE_EXT flag to"},{"line_number":1186,"context_line":"            # allow writing to existing external volume file"},{"line_number":1187,"context_line":"            dev.rebase(new_path, copy\u003dTrue, reuse_ext\u003dTrue)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"            while not dev.is_job_complete():"},{"line_number":1190,"context_line":"                time.sleep(0.5)"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"            dev.abort_job(pivot\u003dTrue)"},{"line_number":1193,"context_line":"            # NOTE(alex_xu): domain.blockJobAbort isn\u0027t sync call. This"},{"line_number":1194,"context_line":"            # is bug in libvirt. So we need waiting for the pivot is"},{"line_number":1195,"context_line":"            # finished. libvirt bug #1119173"},{"line_number":1196,"context_line":"            while not dev.is_job_complete():"},{"line_number":1197,"context_line":"                time.sleep(0.5)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"            if resize_to:"},{"line_number":1200,"context_line":"                dev.resize(resize_to * units.Gi / units.Ki)"},{"line_number":1201,"context_line":"        except Exception:"},{"line_number":1202,"context_line":"            reraise \u003d True"},{"line_number":1203,"context_line":"        finally:"},{"line_number":1204,"context_line":"            # NOTE(mdbooth): We don\u0027t know if we\u0027re in exception context or"},{"line_number":1205,"context_line":"            # not. reraise\u003dFalse will not fail if we\u0027re not in exception"},{"line_number":1206,"context_line":"            # context."},{"line_number":1207,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dreraise):"},{"line_number":1208,"context_line":"                self._host.write_instance_config(xml)"},{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1211,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a629dbe_5272a8ae","line":1208,"range":{"start_line":1176,"start_character":8,"end_line":1208,"end_character":53},"updated":"2016-11-14 09:56:28.000000000","message":"it looks like this could be rewritten:\ntry:\n    ...\nfinally:\n    self._host.write_instance_config(xml)\nno need to introduce new reraise flag","commit_id":"8547e3c48e5824af8ca3cee0e8ed1ea6424baa80"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"671f90385314075c7ca5e48ad416541b41693bd8","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"        except Exception:"},{"line_number":1174,"context_line":"            pass"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"        reraise \u003d False"},{"line_number":1177,"context_line":"        try:"},{"line_number":1178,"context_line":"            # NOTE (rmk): blockRebase cannot be executed on persistent"},{"line_number":1179,"context_line":"            #             domains, so we need to temporarily undefine it."},{"line_number":1180,"context_line":"            #             If any part of this block fails, the domain is"},{"line_number":1181,"context_line":"            #             re-defined regardless."},{"line_number":1182,"context_line":"            if guest.has_persistent_configuration():"},{"line_number":1183,"context_line":"                guest.delete_configuration()"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # Start copy with VIR_DOMAIN_REBASE_REUSE_EXT flag to"},{"line_number":1186,"context_line":"            # allow writing to existing external volume file"},{"line_number":1187,"context_line":"            dev.rebase(new_path, copy\u003dTrue, reuse_ext\u003dTrue)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"            while not dev.is_job_complete():"},{"line_number":1190,"context_line":"                time.sleep(0.5)"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"            dev.abort_job(pivot\u003dTrue)"},{"line_number":1193,"context_line":"            # NOTE(alex_xu): domain.blockJobAbort isn\u0027t sync call. This"},{"line_number":1194,"context_line":"            # is bug in libvirt. So we need waiting for the pivot is"},{"line_number":1195,"context_line":"            # finished. libvirt bug #1119173"},{"line_number":1196,"context_line":"            while not dev.is_job_complete():"},{"line_number":1197,"context_line":"                time.sleep(0.5)"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"            if resize_to:"},{"line_number":1200,"context_line":"                dev.resize(resize_to * units.Gi / units.Ki)"},{"line_number":1201,"context_line":"        except Exception:"},{"line_number":1202,"context_line":"            reraise \u003d True"},{"line_number":1203,"context_line":"        finally:"},{"line_number":1204,"context_line":"            # NOTE(mdbooth): We don\u0027t know if we\u0027re in exception context or"},{"line_number":1205,"context_line":"            # not. reraise\u003dFalse will not fail if we\u0027re not in exception"},{"line_number":1206,"context_line":"            # context."},{"line_number":1207,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dreraise):"},{"line_number":1208,"context_line":"                self._host.write_instance_config(xml)"},{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1211,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_23bfdfaa","line":1208,"range":{"start_line":1176,"start_character":8,"end_line":1208,"end_character":53},"in_reply_to":"9a629dbe_5272a8ae","updated":"2016-11-18 16:04:43.000000000","message":"See the previous code, that\u0027s the way it was written, the problem is self._host.write_instance_config(xml) will blow up. Maybe we don\u0027t need the reraise if we just use the save_and_reraise_exception decorator, but the point was we lost the original exception when self._host.write_instance_config(xml) failed. It\u0027s been awhile since I\u0027ve dug into this, the bug details should have more details.","commit_id":"8547e3c48e5824af8ca3cee0e8ed1ea6424baa80"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"76a3204a7dc621173584e47c3cd576e98eddb928","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"            # NOTE(mdbooth): We don\u0027t know if we\u0027re in exception context or"},{"line_number":1244,"context_line":"            # not. reraise\u003dFalse will not fail if we\u0027re not in exception"},{"line_number":1245,"context_line":"            # context."},{"line_number":1246,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dreraise):"},{"line_number":1247,"context_line":"                try:"},{"line_number":1248,"context_line":"                    self._host.write_instance_config(xml)"},{"line_number":1249,"context_line":"                except Exception as exc:"},{"line_number":1250,"context_line":"                    if not reraise:"},{"line_number":1251,"context_line":"                        raise exc"},{"line_number":1252,"context_line":""},{"line_number":1253,"context_line":"    def swap_volume(self, old_connection_info,"},{"line_number":1254,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a74a57a_33a636ae","line":1251,"range":{"start_line":1246,"start_character":0,"end_line":1251,"end_character":33},"updated":"2016-11-29 12:34:21.000000000","message":"Thinking about this a little more we should really log that we are dropping the new exception here in favour of the original. \n\nAlso a TODO would be nice to have a save_and_reraise_original_exception method in excutils do this for us.","commit_id":"758b590377aa6cc581c04f1ae77b665e34a521ce"}]}
