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 container] snapshot creation: only check volumes for fsfreeze
Date: Mon, 23 Nov 2020 11:12:29 +0100	[thread overview]
Message-ID: <20201123101229.18308-1-s.ivanov@proxmox.com> (raw)

fix #3161

When considering mountpoints for running 'fsfreeze' before snapshot creation,
commit 8463099d99273561c46398bf02206b4d9d431bc5 did not only consider
volumes created by our storage-stack, but also bindmounts and devmounts
(directly mounting a blockdevice).

This led to PVE::Storage::parse_volume_id failing on those mountpoints.

Since the fsfreeze call is best-effort and only run for specific
storageplugins, we can simply skip non-volume mountpoints, when gathering
the list of volumes to call fsfreeze on.

Tested with a container with a bindmount.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
Sorry for that - will test my container patches with a more complete container
config from now on :/

 src/PVE/LXC/Config.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 9834866..db453f8 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -139,6 +139,8 @@ sub __snapshot_freeze {
     $class->foreach_volume($conf, sub {
 	my ($ms, $mountpoint) = @_;
 
+	return if $mountpoint->{type} ne 'volume';
+
 	if (PVE::Storage::volume_snapshot_needs_fsfreeze($storagecfg, $mountpoint->{volume})) {
 	    push @$freeze_mps, $mountpoint->{mp};
 	}
-- 
2.20.1





             reply	other threads:[~2020-11-23 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 10:12 Stoiko Ivanov [this message]
2020-11-23 10:25 ` Dominic Jäger
2020-11-23 12:09 ` [pve-devel] applied: " 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=20201123101229.18308-1-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