From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 1/2] template_create: remove volume activation
Date: Fri, 26 Nov 2021 11:19:37 +0100 [thread overview]
Message-ID: <20211126101938.3992163-2-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20211126101938.3992163-1-a.lauterer@proxmox.com>
This caused problems, especially with RBD volumes as they would get
mapped under the current vm-xxx-disk-y name and never unmapped. After
the rename to base-xxx-disk-y the old, now orphaned, mapping still
exists which can then cause problems when removing that MP or the whole
container as RBD won't let the image be removed. Only a manual `rbd
unmap` of the orphaned mapping or a reboot of the node would help.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
I am not sure why we activated the volumes anyway at this step as we do
not do that for VMs over in qemu-server. If we want to make sure they
are present we should probably rather use
PVE::Storage::activate_storage or activate_storage_list.
src/PVE/LXC.pm | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index b07d986..ce10c55 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1241,8 +1241,6 @@ sub template_create {
my $volid = $mountpoint->{volume};
- PVE::Storage::activate_volumes($storecfg, [$volid]);
-
my $template_volid = PVE::Storage::vdisk_create_base($storecfg, $volid);
$mountpoint->{volume} = $template_volid;
$conf->{$ms} = PVE::LXC::Config->print_ct_mountpoint($mountpoint, $ms eq "rootfs");
--
2.30.2
next prev parent reply other threads:[~2021-11-26 10:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 10:19 [pve-devel] [PATCH container 0/2] Improve volume deactivation Aaron Lauterer
2021-11-26 10:19 ` Aaron Lauterer [this message]
2021-11-26 10:19 ` [pve-devel] [PATCH container 2/2] apply_pending_mountpoint: deactivate volumes if not running Aaron Lauterer
2021-12-01 10:12 ` [pve-devel] [PATCH container 0/2] Improve volume deactivation Fabian Ebner
2021-12-01 16:27 ` Aaron Lauterer
2021-12-02 7:40 ` Fabian Ebner
2021-12-02 7:49 ` Aaron Lauterer
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=20211126101938.3992163-2-a.lauterer@proxmox.com \
--to=a.lauterer@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