public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs
@ 2025-08-29 11:43 Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command Maximiliano Sandoval
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-08-29 11:43 UTC (permalink / raw)
  To: pve-devel

At the moment taking a snapshot without RAM does not log whether there was a freeze/thaw.

This does not add an extra log line when making a Backup in snapshot mode.

qemu-server:

Maximiliano Sandoval (1):
  log when issues a guest-fsfreeze command

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


pve-container:

Maximiliano Sandoval (1):
  log when freezing/thawing filesystem

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


qemu-server:

Maximiliano Sandoval (1):
  replication: remove logging when freezing/thawing

 src/PVE/Replication.pm | 2 --
 1 file changed, 2 deletions(-)


Summary over all repositories:
  3 files changed, 4 insertions(+), 2 deletions(-)

-- 
Generated by murpp 0.9.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command
  2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
@ 2025-08-29 11:43 ` Maximiliano Sandoval
  2025-08-29 11:45   ` Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH container 1/1] log when freezing/thawing filesystem Maximiliano Sandoval
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-08-29 11:43 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuConfig.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index e0853d65..4ff6f347 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -307,9 +307,11 @@ sub __snapshot_freeze {
     my ($class, $vmid, $unfreeze) = @_;
 
     if ($unfreeze) {
+        print "issuing guest-agent 'fs-thaw' command\n";
         eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
         warn "guest-fsfreeze-thaw problems - $@" if $@;
     } else {
+        print "issuing guest-agent 'fs-freeze' command\n";
         eval { mon_cmd($vmid, "guest-fsfreeze-freeze"); };
         warn "guest-fsfreeze-freeze problems - $@" if $@;
     }
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH container 1/1] log when freezing/thawing filesystem
  2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command Maximiliano Sandoval
@ 2025-08-29 11:43 ` Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH guest-common 1/1] replication: remove logging when freezing/thawing Maximiliano Sandoval
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-08-29 11:43 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 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 e4d0365..79a87b8 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -204,10 +204,12 @@ sub __snapshot_freeze {
     };
 
     if ($unfreeze) {
+        print "thawing guest filesystem\n";
         eval { PVE::LXC::thaw($vmid); };
         warn $@ if $@;
         $freeze_mountpoints->(1);
     } else {
+        print "freezing guest filesystem\n";
         PVE::LXC::freeze($vmid);
         PVE::LXC::sync_container_namespace($vmid);
         $freeze_mountpoints->(0);
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] [PATCH guest-common 1/1] replication: remove logging when freezing/thawing
  2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command Maximiliano Sandoval
  2025-08-29 11:43 ` [pve-devel] [PATCH container 1/1] log when freezing/thawing filesystem Maximiliano Sandoval
@ 2025-08-29 11:43 ` Maximiliano Sandoval
  2025-09-01 13:03 ` [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Shannon Sterz
  2025-09-02 12:46 ` [pve-devel] superseded: " Maximiliano Sandoval
  4 siblings, 0 replies; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-08-29 11:43 UTC (permalink / raw)
  To: pve-devel

This is handled now by the class' __snapshot_freeze.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/Replication.pm | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index ba4c2c1..1b31ae2 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -376,7 +376,6 @@ sub replicate {
 
     # freeze filesystem for data consistency
     if ($freezefs) {
-        $logfunc->("freeze guest filesystem");
         $guest_class->__snapshot_freeze($vmid, 0);
     }
 
@@ -395,7 +394,6 @@ sub replicate {
 
     # thaw immediately
     if ($freezefs) {
-        $logfunc->("thaw guest filesystem");
         $guest_class->__snapshot_freeze($vmid, 1);
     }
 
-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command
  2025-08-29 11:43 ` [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command Maximiliano Sandoval
@ 2025-08-29 11:45   ` Maximiliano Sandoval
  0 siblings, 0 replies; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-08-29 11:45 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>  src/PVE/QemuConfig.pm | 2 ++
>  1 file changed, 2 insertions(+)

This was found by:

Reported-by: Friedrich Weber <f.weber@proxmox.com>

-- 
Maximiliano


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs
  2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
                   ` (2 preceding siblings ...)
  2025-08-29 11:43 ` [pve-devel] [PATCH guest-common 1/1] replication: remove logging when freezing/thawing Maximiliano Sandoval
@ 2025-09-01 13:03 ` Shannon Sterz
  2025-09-02 12:46 ` [pve-devel] superseded: " Maximiliano Sandoval
  4 siblings, 0 replies; 7+ messages in thread
From: Shannon Sterz @ 2025-09-01 13:03 UTC (permalink / raw)
  To: Proxmox VE development discussion; +Cc: pve-devel

On Fri Aug 29, 2025 at 1:43 PM CEST, Maximiliano Sandoval wrote:
> At the moment taking a snapshot without RAM does not log whether there was a freeze/thaw.
>
> This does not add an extra log line when making a Backup in snapshot mode.
>
> qemu-server:
>
> Maximiliano Sandoval (1):
>   log when issues a guest-fsfreeze command
>
>  src/PVE/QemuConfig.pm | 2 ++
>  1 file changed, 2 insertions(+)
>
>
> pve-container:
>
> Maximiliano Sandoval (1):
>   log when freezing/thawing filesystem
>
>  src/PVE/LXC/Config.pm | 2 ++
>  1 file changed, 2 insertions(+)
>
>
> qemu-server:
>
> Maximiliano Sandoval (1):
>   replication: remove logging when freezing/thawing
>
>  src/PVE/Replication.pm | 2 --
>  1 file changed, 2 deletions(-)
>
>
> Summary over all repositories:
>   3 files changed, 4 insertions(+), 2 deletions(-)

for the vm part this looks fine, the new log lines show up in the log
for a vm's snapshot without ram, but not with ram or backups:

issuing guest-agent 'fs-freeze' command
snapshotting 'drive-scsi0' (vms:vm-100-disk-0)
issuing guest-agent 'fs-thaw' command
TASK OK

for a container this now always says:

freezing guest filesystem
thawing guest filesystem
TASK OK

however, for backups it looks like this:

INFO: starting new backup job: vzdump 101 --remove 0 --mode snapshot --node pve-icon-cleanup --storage local --compress zstd --notification-mode notification-system --notes-template '{{guestname}}'
INFO: Starting Backup of VM 101 (lxc)
INFO: Backup started at 2025-09-01 14:54:33
INFO: status = running
INFO: CT Name: CT101
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
freezing guest filesystem
thawing guest filesystem
INFO: creating vzdump archive '/var/lib/vz/dump/vzdump-lxc-101-2025_09_01-14_54_33.tar.zst'
INFO: Total bytes written: 697968640 (666MiB, 215MiB/s)
INFO: archive file size: 201MB
INFO: adding notes to backup
INFO: cleanup temporary 'vzdump' snapshot
INFO: Finished Backup of VM 101 (00:00:03)
INFO: Backup finished at 2025-09-01 14:54:36
INFO: Backup job finished successfully
INFO: notified via target `mail-to-root`
TASK OK

imo it would be nicer to pass down the log function so that it can log
those two lines with the proper log level (`INFO`) here too. however, i
am not sure if that is particularly useful for containers in general. we
don't expose a setting for turning freezing/thawing here to users. the
mechanism is different in my understanding too, as we don't need to rely
on a guest agent for containers anyway. possibly the patch for
pve-container can just be dropped?

other than that:

Tested-by: Shannon Sterz <s.sterz@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] superseded: [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs
  2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
                   ` (3 preceding siblings ...)
  2025-09-01 13:03 ` [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Shannon Sterz
@ 2025-09-02 12:46 ` Maximiliano Sandoval
  4 siblings, 0 replies; 7+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:46 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> At the moment taking a snapshot without RAM does not log whether there was a freeze/thaw.
>
> This does not add an extra log line when making a Backup in snapshot mode.

Superseded by https://lore.proxmox.com/pve-devel/20250902124524.368080-3-m.sandoval@proxmox.com/T/#u.

-- 
Maximiliano


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-09-02 12:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-29 11:43 [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Maximiliano Sandoval
2025-08-29 11:43 ` [pve-devel] [PATCH qemu-server 1/1] log when issues a guest-fsfreeze command Maximiliano Sandoval
2025-08-29 11:45   ` Maximiliano Sandoval
2025-08-29 11:43 ` [pve-devel] [PATCH container 1/1] log when freezing/thawing filesystem Maximiliano Sandoval
2025-08-29 11:43 ` [pve-devel] [PATCH guest-common 1/1] replication: remove logging when freezing/thawing Maximiliano Sandoval
2025-09-01 13:03 ` [pve-devel] [PATCH container/guest-common/qemu-server 0/3] log when freezing or thawing the guest's fs Shannon Sterz
2025-09-02 12:46 ` [pve-devel] superseded: " Maximiliano Sandoval

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