From nobody Wed May 8 23:13:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1626947179; cv=none; d=zohomail.com; s=zohoarc; b=l8ykos2I+5S+/q9BQVB5X6hzaKU4NSmVgqujAo1cjSLicAWULqMrD71y9vDL9TP7vBn7WSpBI8LWs5S/Bq53wRxAp4M5sTdDHRuIgAGG8stxIu5aGJjbR0MvmMojq6OxSlHDX4bO8jumKNRJCQp9z7AjwHAPexjtTf/CwXQ1obI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626947179; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=SqoqOu08FHKfFCfwW9sGS2kabGmAuIXWjqPEOh+fH2s=; b=Hwyno19tdEmjM4a46W+q6m7+LmH8kesdd7Z52tgc9AaDGwQyQxiSzocgBKA/10hqAIsuRCAYJpYe6VW0jbQ6uzL7NcywS6IqSr68dgUNgL0esA8Bk4cuJsTTSDFvagwRHD8NKw5IwqElo/Zx7h4VJI/A1lyDVKoaCoXSwSzTt/A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1626947179089644.5585575101102; Thu, 22 Jul 2021 02:46:19 -0700 (PDT) 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-92-d2QL1DacNwum2R5bFwEhIw-1; Thu, 22 Jul 2021 05:46:15 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE6BD105146D; Thu, 22 Jul 2021 09:46:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEC966A8E4; Thu, 22 Jul 2021 09:46:06 +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 DB4C24BB7C; Thu, 22 Jul 2021 09:46:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 16M9k445020517 for ; Thu, 22 Jul 2021 05:46:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 12C8E421F; Thu, 22 Jul 2021 09:46:04 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9330560583 for ; Thu, 22 Jul 2021 09:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626947178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SqoqOu08FHKfFCfwW9sGS2kabGmAuIXWjqPEOh+fH2s=; b=EUW/FUebEJLtlrUhuppxgv4W2Xhq96rEqQFhkdNAB2+a0ppiotCvcGN+7d9SqErCpvKHF4 R24d7tWaxMPuCU+ebUc9K8Nqzag6C7vJGrxE1nW0blRynkvkd1W6tEIclpUcZFJ9+5/vDo aljNbCfcTFQZRfWy9bFtCOuRn9JI7Vc= X-MC-Unique: d2QL1DacNwum2R5bFwEhIw-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH] storage: create logical volume with --yes option Date: Thu, 22 Jul 2021 11:45:52 +0200 Message-Id: <9b9119ec2ca201509f4958603b043832959bb133.1626947123.git.khanicov@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1626947180883100001 Content-Type: text/plain; charset="utf-8" If lvcreate found an existing signature when trying to create a new logical volume (E.g. left after some deleted volume), the action failed due to inability to answer interactive question to wiping it (lvcreate assumed 'no' was the answer). With added option --yes to the command line, the answer to any interactive question is assumed to be yes. Therefore, lvcreate wipes the signature and the new volume is created successfully. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1940413 Signed-off-by: Kristina Hanicova Reviewed-by: Michal Privoznik --- src/storage/storage_backend_logical.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_ba= ckend_logical.c index ed8e47d880..02ede74aeb 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -863,6 +863,8 @@ virStorageBackendLogicalLVCreate(virStorageVolDef *vol, else virCommandAddArg(cmd, def->source.name); =20 + virCommandAddArg(cmd, "--yes"); + return virCommandRun(cmd, NULL); } =20 --=20 2.31.1