From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E9EAC433E1 for ; Thu, 27 Aug 2020 18:00:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 388E72087C for ; Thu, 27 Aug 2020 18:00:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="B2o89s1W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 388E72087C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBMCH-0002o4-FH for qemu-devel@archiver.kernel.org; Thu, 27 Aug 2020 14:00:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBMBN-0002Go-Eg for qemu-devel@nongnu.org; Thu, 27 Aug 2020 13:59:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:49869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kBMBL-00051x-6G for qemu-devel@nongnu.org; Thu, 27 Aug 2020 13:59:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598551165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q4FIaYoTen+x/RYqMuauTF4hzOdpF2AGqFHDF9fF4Qs=; b=B2o89s1WDbp4fWRU5+69RxEZDU35jPhmzpVjWE7gUpCGIS/cPt2N1i1+GLCRR/uU5MRoYW 3qBgJBKNvKUlYPxgAZ/5077414hjA6ncDjnIoHTGk2IJQBPf+exD7X7hgUXJPqvIxzP0KQ bmhLl4Cd7W4GyR4rzqZJJ29SdYvBZic= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-226-TnkudfBTMFyOELYjzNB1aQ-1; Thu, 27 Aug 2020 13:59:08 -0400 X-MC-Unique: TnkudfBTMFyOELYjzNB1aQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EFCA12FD08; Thu, 27 Aug 2020 17:59:06 +0000 (UTC) Received: from work-vm (ovpn-114-163.ams2.redhat.com [10.36.114.163]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 879565D9E8; Thu, 27 Aug 2020 17:59:02 +0000 (UTC) Date: Thu, 27 Aug 2020 18:58:59 +0100 From: "Dr. David Alan Gilbert" To: Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= Subject: Re: [PATCH v7 0/8] Introduce 'yank' oob qmp command to recover from hanging qemu Message-ID: <20200827175859.GF2837@work-vm> References: <20200818142631.3e1c1481@luklap> <20200827104246.63754338@luklap> <20200827104138.GN192458@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200827104138.GN192458@redhat.com> User-Agent: Mutt/1.14.6 (2020-07-11) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline Received-SPF: pass client-ip=63.128.21.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 02:54:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.959, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Lukas Straub , qemu-block , Juan Quintela , qemu-devel , Max Reitz , Paolo Bonzini , =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" * Daniel P. Berrangé (berrange@redhat.com) wrote: > On Thu, Aug 27, 2020 at 10:42:46AM +0200, Lukas Straub wrote: > > On Tue, 18 Aug 2020 14:26:31 +0200 > > Lukas Straub wrote: > > > > > On Tue, 4 Aug 2020 10:11:22 +0200 > > > Lukas Straub wrote: > > > > > > > Hello Everyone, > > > > In many cases, if qemu has a network connection (qmp, migration, chardev, etc.) > > > > to some other server and that server dies or hangs, qemu hangs too. > > > > These patches introduce the new 'yank' out-of-band qmp command to recover from > > > > these kinds of hangs. The different subsystems register callbacks which get > > > > executed with the yank command. For example the callback can shutdown() a > > > > socket. This is intended for the colo use-case, but it can be used for other > > > > things too of course. > > > > > > > > Regards, > > > > Lukas Straub > > > > > > > > v7: > > > > -yank_register_instance now returns error via Error **errp instead of aborting > > > > -dropped "chardev/char.c: Check for duplicate id before creating chardev" > > > > > > > > v6: > > > > -add Reviewed-by and Acked-by tags > > > > -rebase on master > > > > -lots of changes in nbd due to rebase > > > > -only take maintainership of util/yank.c and include/qemu/yank.h (Daniel P. Berrangé) > > > > -fix a crash discovered by the newly added chardev test > > > > -fix the test itself > > > > > > > > v5: > > > > -move yank.c to util/ > > > > -move yank.h to include/qemu/ > > > > -add license to yank.h > > > > -use const char* > > > > -nbd: use atomic_store_release and atomic_load_aqcuire > > > > -io-channel: ensure thread-safety and document it > > > > -add myself as maintainer for yank > > > > > > > > v4: > > > > -fix build errors... > > > > > > > > v3: > > > > -don't touch softmmu/vl.c, use __contructor__ attribute instead (Paolo Bonzini) > > > > -fix build errors > > > > -rewrite migration patch so it actually passes all tests > > > > > > > > v2: > > > > -don't touch io/ code anymore > > > > -always register yank functions > > > > -'yank' now takes a list of instances to yank > > > > -'query-yank' returns a list of yankable instances > > > > > > > > Lukas Straub (8): > > > > Introduce yank feature > > > > block/nbd.c: Add yank feature > > > > chardev/char-socket.c: Add yank feature > > > > migration: Add yank feature > > > > io/channel-tls.c: make qio_channel_tls_shutdown thread-safe > > > > io: Document thread-safety of qio_channel_shutdown > > > > MAINTAINERS: Add myself as maintainer for yank feature > > > > tests/test-char.c: Wait for the chardev to connect in > > > > char_socket_client_dupid_test > > > > > > > > MAINTAINERS | 6 ++ > > > > block/nbd.c | 129 +++++++++++++++--------- > > > > chardev/char-socket.c | 31 ++++++ > > > > include/io/channel.h | 2 + > > > > include/qemu/yank.h | 80 +++++++++++++++ > > > > io/channel-tls.c | 6 +- > > > > migration/channel.c | 12 +++ > > > > migration/migration.c | 25 ++++- > > > > migration/multifd.c | 10 ++ > > > > migration/qemu-file-channel.c | 6 ++ > > > > migration/savevm.c | 6 ++ > > > > qapi/misc.json | 45 +++++++++ > > > > tests/Makefile.include | 2 +- > > > > tests/test-char.c | 1 + > > > > util/Makefile.objs | 1 + > > > > util/yank.c | 184 ++++++++++++++++++++++++++++++++++ > > > > 16 files changed, 493 insertions(+), 53 deletions(-) > > > > create mode 100644 include/qemu/yank.h > > > > create mode 100644 util/yank.c > > > > > > > > -- > > > > 2.20.1 > > > > > > Ping... > > > > Ping 2... > > > > Also, can the different subsystems have a look at this and give their ok? > > We need ACKs from the NBD, migration and chardev maintainers, for the > respective patches, then I think this series is ready for a pull request. I'm happy from Migration: Acked-by: Dr. David Alan Gilbert > Once acks arrive, I'm happy to send a PULL unless someone else has a > desire todo it. Looks like Markus would like a QMP tweak; but other than that I'd also be happy to take it via migration; whichever is easiest. Dave > > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK