From nobody Fri Apr 19 08:23:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559733980; cv=none; d=zoho.com; s=zohoarc; b=cao2HWrr6uhHp3S/ibjfLk8gPj5zvv+f5fbFBKUaz5jj9F+W6U3GfS/JjxKuig8X7NTrnJrbQfvWWaStAV3Q3Gs8P/WgUl02i+SmlAFpKuLBY/KshCUb9TvwWlnJ8N830mZKdxzdZbjiLXRbkJ3i05AM7tkFMOhExdu2L6DGvrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559733980; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=75QmKU1RwWM3TDbEUtWsFdgZo5D1Pd+r7Fg22qXv3Sg=; b=V43R2YeCTmTCKvDlrWHktMiLho2cR1kxVdxik8bTg3Ey6NKJOHfKNQeIKufyjdoS8847PBj79j3Db5JnU2avTsh4q+izBP1Y17ldOSNryRDyNBNmHVcRaVlscfYi6qQClBnnFzd7QgAYC4QPkcJEVFNgLH5IOFVl1HFQ2hOGQ6Q= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15597339807891009.6362665909201; Wed, 5 Jun 2019 04:26:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C634481F19; Wed, 5 Jun 2019 11:26:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9893A19749; Wed, 5 Jun 2019 11:26:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 570591806B18; Wed, 5 Jun 2019 11:26:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x55BNiVa029937 for ; Wed, 5 Jun 2019 07:23:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 87B7C19C6A; Wed, 5 Jun 2019 11:23:44 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11B1A19C65 for ; Wed, 5 Jun 2019 11:23:43 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 5 Jun 2019 13:23:38 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] virsh: undefine: Clarify help string for --snapshots-metadata X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 05 Jun 2019 11:26:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Reword the end of the help string to make it more obvious that the VM must be inactive. Signed-off-by: Peter Krempa Reviewed-by: Fabiano Fid=C3=AAncio --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 82140feb57..a6e4469160 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -3627,7 +3627,7 @@ static const vshCmdOptDef opts_undefine[] =3D { }, {.name =3D "snapshots-metadata", .type =3D VSH_OT_BOOL, - .help =3D N_("remove all domain snapshot metadata, if inactive") + .help =3D N_("remove all domain snapshot metadata (vm must be inactiv= e)") }, {.name =3D "nvram", .type =3D VSH_OT_BOOL, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 08:23:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559734054; cv=none; d=zoho.com; s=zohoarc; b=U5uSEE8/BMKWSeRZEZhXsvLNXzzNGvnLubHugwyNHgNGJ1Rx3/Ntb2mA181xlgL14pXk0uMbK7wZo3rF3DeszfGJLnaNKTf8ij01UVhbrDlYJ4L6T4ozL9utDqgmYhTQd5fR+UB5QR9OXoS3Y8u+zt/ptEZXrqODxFpDlFtf184= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559734054; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nOZ6PREu+MUN63NFVP8BROHSHAZXBoADWIgcshK7Tdc=; b=O2k9RWd1a+DIj9vDjXYBCRk7zOdPrp3f7IfMkd87b2fVDmOoDXgxPhvO1Lg35wTOvqpQUAyZm6NVXL7QdEsVngFPbGiyrTE7H7s2ud54PtOFrQRVBpPvC1Tsd8Td8f9/nbUx0zic7ixIRlenynEveiQK7QfbmoMnLGvHqdUWpUE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559734054079539.269178362672; Wed, 5 Jun 2019 04:27:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B3C530C31AE; Wed, 5 Jun 2019 11:27:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 343E8600CC; Wed, 5 Jun 2019 11:27:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E88AC1806B0F; Wed, 5 Jun 2019 11:27:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x55BNjHW029947 for ; Wed, 5 Jun 2019 07:23:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5606719C6A; Wed, 5 Jun 2019 11:23:45 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id D463319C65 for ; Wed, 5 Jun 2019 11:23:44 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 5 Jun 2019 13:23:39 +0200 Message-Id: <8ebb9d64ec8fde2164356bed83fa66a93aeb5ccd.1559733766.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] virsh: undefine: Rename --delete-snapshots to --delete-storage-volume-snapshots X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 05 Jun 2019 11:27:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The old flag name confused some users into thinking it's the correct way to undefine a VM with libvirt (not storage volume) snapshots. The correct flag in that case is way less obvious: --snapshots-metadata. Rename the flag (by adding an alias) to something which will promote looking up the actual purpose of the flag. Signed-off-by: Peter Krempa Reviewed-by: Fabiano Fid=C3=AAncio --- tools/virsh-domain.c | 4 ++++ tools/virsh.pod | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a6e4469160..828ae30789 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -3617,6 +3617,10 @@ static const vshCmdOptDef opts_undefine[] =3D { .help =3D N_("remove all associated storage volumes (use with caution= )") }, {.name =3D "delete-snapshots", + .type =3D VSH_OT_ALIAS, + .help =3D "delete-storage-volume-snapshots" + }, + {.name =3D "delete-storage-volume-snapshots", .type =3D VSH_OT_BOOL, .help =3D N_("delete snapshots associated with volume(s), requires " "--remove-all-storage (must be supported by storage driver= )") diff --git a/tools/virsh.pod b/tools/virsh.pod index 9f5bfd27a0..fd9ba00d1f 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2896,8 +2896,8 @@ is not available the processes will provide an exit c= ode of 1. =3Ditem B I [I<--managed-save>] [I<--snapshots-metadata>] [I<--nvram>] [I<--keep-nvram>] -[ {I<--storage> B | I<--remove-all-storage> [I<--delete-snapshots= >]} -I<--wipe-storage>] +[ {I<--storage> B | I<--remove-all-storage> +[I<--delete-storage-volume-snapshots>]} I<--wipe-storage>] Undefine a domain. If the domain is running, this converts it to a transient domain, without stopping it. If the domain is inactive, @@ -2932,7 +2932,8 @@ Example: --storage vda,/path/to/storage.img The I<--remove-all-storage> flag specifies that all of the domain's storage volumes should be deleted. -The I<--delete-snapshots> flag specifies that any snapshots associated with +The I<--delete-storage-volume-snapshots> (previously I<--delete-snapshots>) +flag specifies that any snapshots associated with the storage volume should be deleted as well. Requires the I<--remove-all-storage> flag to be provided. Not all storage drivers support this option, presently only rbd. --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 08:23:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559733945; cv=none; d=zoho.com; s=zohoarc; b=h6LEYfpOBoFp0pvz7FK34SkPnsWFwRie1EQkSfkEeAwOazuiDj1Cr6zJdOSLLmkdMPbd1U4QTdEGIe06s8j3VqWCCvXvPQUbSi6t/hyVZ0RcuB57VLlyT3xt2YHNR9/xC+Gcc1lnl5F769SKg8PIQaGPIgMXxmFsV0/IJE2DI/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559733945; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2B4u9u7Yf9m7FCucuFgw+O2XfOz8SrDLSoXTtkQutqs=; b=O0wENfAMOV3hOIHwW908YNzZBGLg+yBiqQAeD1AxDFYxbK/TL6erB+kv9JUeXpKngLIAuM5hMuzO2XLA4Q/0YpytxDe6DM0FB+whAlXeLtAEthb8DRv7UKZIaS9V1tYe1Po+hF0Jmmk2BDWzgWkq0iJlnRPplCLyUUVejCCH86k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559733945055736.2087452505148; Wed, 5 Jun 2019 04:25:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 705A7C1EB201; Wed, 5 Jun 2019 11:25:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CE8861984; Wed, 5 Jun 2019 11:25:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9D5C71806B0F; Wed, 5 Jun 2019 11:25:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x55BNkqt029952 for ; Wed, 5 Jun 2019 07:23:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2488119C6A; Wed, 5 Jun 2019 11:23:46 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2B3119C65 for ; Wed, 5 Jun 2019 11:23:45 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 5 Jun 2019 13:23:40 +0200 Message-Id: <88ff2760f26ae253764b2a0faae65c06cf9f1400.1559733766.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] virsh: undefine: Clarify that --delete-storage-volume-snapshots causes failures X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Jun 2019 11:25:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The flag causes undefine to fail if trying to remove a non-RBD disk. Add a warning about that. Signed-off-by: Peter Krempa Reviewed-by: Fabiano Fid=C3=AAncio --- tools/virsh.pod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index fd9ba00d1f..11e853deea 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2936,7 +2936,8 @@ The I<--delete-storage-volume-snapshots> (previously = I<--delete-snapshots>) flag specifies that any snapshots associated with the storage volume should be deleted as well. Requires the I<--remove-all-storage> flag to be provided. Not all storage drivers -support this option, presently only rbd. +support this option, presently only rbd. Using this when also removing vol= umes +handled by storage driver which does not support the flag will result in f= ailure. The flag I<--wipe-storage> specifies that the storage volumes should be wiped before removal. --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list