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 7C17263D38 for ; Wed, 25 Nov 2020 15:08:40 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6FDC31B008 for ; Wed, 25 Nov 2020 15:08:10 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 04C911AFFE for ; Wed, 25 Nov 2020 15:08:10 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C6BAB43B61 for ; Wed, 25 Nov 2020 15:08:09 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pve-devel@lists.proxmox.com Date: Wed, 25 Nov 2020 15:07:50 +0100 Message-Id: <20201125140750.2851534-2-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201125140750.2851534-1-f.gruenbichler@proxmox.com> References: <20201125140750.2851534-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.024 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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. [lxc.pm] Subject: [pve-devel] [PATCH container 2/2] restore: add more informational messages 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, 25 Nov 2020 14:08:40 -0000 to provide context for warnings/output created by various sub-operations. Signed-off-by: Fabian Grünbichler --- src/PVE/API2/LXC.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm index a263104..824da40 100644 --- a/src/PVE/API2/LXC.pm +++ b/src/PVE/API2/LXC.pm @@ -354,6 +354,7 @@ __PACKAGE__->register_method({ die "can't overwrite running container\n" if PVE::LXC::check_running($vmid); if ($is_root && $archive ne '-') { my $orig_conf; + print "recovering backed-up configuration from '$archive'\n"; ($orig_conf, $orig_mp_param) = PVE::LXC::Create::recover_config($storage_cfg, $archive, $vmid); $was_template = delete $orig_conf->{template}; # When we're root call 'restore_configuration' with restricted=0, @@ -366,6 +367,7 @@ __PACKAGE__->register_method({ if ($storage_only_mode) { if ($restore) { if (!defined($orig_mp_param)) { + print "recovering backed-up configuration from '$archive'\n"; (undef, $orig_mp_param) = PVE::LXC::Create::recover_config($storage_cfg, $archive, $vmid); } $mp_param = $orig_mp_param; @@ -414,9 +416,12 @@ __PACKAGE__->register_method({ eval { my $rootdir = PVE::LXC::mount_all($vmid, $storage_cfg, $conf, 1); $bwlimit = PVE::Storage::get_bandwidth_limit('restore', [keys %used_storages], $bwlimit); + print "restoring '$archive' now..\n" + if $restore && $archive ne '-'; PVE::LXC::Create::restore_archive($storage_cfg, $archive, $rootdir, $conf, $ignore_unpack_errors, $bwlimit); if ($restore) { + print "merging backed-up and given configuration..\n"; PVE::LXC::Create::restore_configuration($vmid, $storage_cfg, $archive, $rootdir, $conf, !$is_root, $unique, $skip_fw_config_restore); my $lxc_setup = PVE::LXC::Setup->new($conf, $rootdir); $lxc_setup->template_fixup($conf); -- 2.20.1