From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 638B571D61 for ; Wed, 30 Jun 2021 14:24:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5B26C1979E for ; Wed, 30 Jun 2021 14:24:12 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 8BC0119793 for ; Wed, 30 Jun 2021 14:24:10 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 61BB1430B0 for ; Wed, 30 Jun 2021 14:24:10 +0200 (CEST) Date: Wed, 30 Jun 2021 14:24:03 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20210630091618.28792-1-f.ebner@proxmox.com> In-Reply-To: <20210630091618.28792-1-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1625055691.7l7zgq143o.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.571 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com, pve6to7.pm] Subject: [pve-devel] applied: [PATCH v2 manager 1/2] pve6to7: content check: fix detecting pass X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:24:42 -0000 On June 30, 2021 11:16 am, Fabian Ebner wrote: > If there is a log_fail, because of misconfigured 'none' content type, the= final > log_pass should not be printed. >=20 > Signed-off-by: Fabian Ebner > --- >=20 > No changes from v1. >=20 > PVE/CLI/pve6to7.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/PVE/CLI/pve6to7.pm b/PVE/CLI/pve6to7.pm > index f56dd42c..3d5b780b 100644 > --- a/PVE/CLI/pve6to7.pm > +++ b/PVE/CLI/pve6to7.pm > @@ -707,6 +707,7 @@ sub check_storage_content { > log_info("Checking storage content type configuration.."); > =20 > my $found; > + my $pass =3D 1; > =20 > my $storage_cfg =3D PVE::Storage::config(); > =20 > @@ -718,6 +719,7 @@ sub check_storage_content { > my $valid_content =3D PVE::Storage::Plugin::valid_content_types($scfg->= {type}); > =20 > if (scalar(keys $scfg->{content}->%*) =3D=3D 0 && !$valid_content->{non= e}) { > + $pass =3D 0; > log_fail("storage '$storeid' does not support configured content ty= pe 'none'"); > delete $scfg->{content}->{none}; # scan for guest images below > } > @@ -738,6 +740,7 @@ sub check_storage_content { > =20 > if (scalar(@volumes) > 0) { > $found =3D 1; > + $pass =3D 0; > log_warn("storage '$storeid' - neither content type 'images' nor 'r= ootdir' configured" > .", but found guest volume(s):\n " . join("\n ", @volumes)); > } > @@ -746,7 +749,9 @@ sub check_storage_content { > if ($found) { > log_warn("PVE 7.0 enforces stricter content type checks. Guests referen= cing the above " . > "volumes will not work until the storage configuration is fixed."); > - } else { > + } > + > + if ($pass) { > log_pass("no problems found"); > } > } > --=20 > 2.20.1 >=20 >=20 >=20 > _______________________________________________ > pve-devel mailing list > pve-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel >=20 >=20 >=20