public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 2/2] pve6to7: add 'full' parameter for expensive checks
Date: Mon,  5 Jul 2021 12:57:17 +0200	[thread overview]
Message-ID: <20210705105717.779369-5-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210705105717.779369-1-s.ivanov@proxmox.com>

and place the container cgroupv2 support checks behind it.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 PVE/CLI/pve6to7.pm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/PVE/CLI/pve6to7.pm b/PVE/CLI/pve6to7.pm
index b9aeb89c..5e97a3c5 100644
--- a/PVE/CLI/pve6to7.pm
+++ b/PVE/CLI/pve6to7.pm
@@ -1119,6 +1119,12 @@ __PACKAGE__->register_method ({
     parameters => {
 	additionalProperties => 0,
 	properties => {
+	    full => {
+		description => 'perform additional, expensive checks.',
+		type => 'boolean',
+		optional => 1,
+		default => 0,
+	    },
 	},
     },
     returns => { type => 'null' },
@@ -1131,6 +1137,12 @@ __PACKAGE__->register_method ({
 	check_storage_health();
 	check_misc();
 
+	if ($param->{full}) {
+	    check_containers_cgroup_compat();
+	} else {
+	    log_skip("Expensive checks not performed without 'full' parameter");
+	}
+
 	print_header("SUMMARY");
 
 	my $total = 0;
@@ -1153,7 +1165,4 @@ __PACKAGE__->register_method ({
 
 our $cmddef = [ __PACKAGE__, 'checklist', [], {}];
 
-# for now drop all unknown params and just check
-@ARGV = ();
-
 1;
-- 
2.30.2





  parent reply	other threads:[~2021-07-05 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 10:57 [pve-devel] [PATCH manger/container v2 0/2] detect containers not supporting pure cgroupv2 Stoiko Ivanov
2021-07-05 10:57 ` [pve-devel] [PATCH container v2 1/2] prestart-hook: detect cgroupv2 incompatible systemd version Stoiko Ivanov
2021-07-05 10:57 ` [pve-devel] [PATCH container v2 2/2] setup: shortcut cgroupv2 support for non-systemd distros Stoiko Ivanov
2021-07-05 10:57 ` [pve-devel] [PATCH manager v2 1/2] pve6to7: check for containers not supporting pure cgroupv2 Stoiko Ivanov
2021-07-05 10:57 ` Stoiko Ivanov [this message]
2021-07-05 16:59 ` [pve-devel] applied series: [PATCH manger/container v2 0/2] detect " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210705105717.779369-5-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal