public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH storage] zfspool: export: fix regression with printing progress output
@ 2026-07-23  8:50 Fiona Ebner
  2026-07-23 17:47 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-07-23  8:50 UTC (permalink / raw)
  To: pve-devel

The progress from zfs send is printed to stderr, but the lines are
passed from run_command() to errfunc() without a trailing newline in
and so they would not show up in the task log right away, even with
the following call to flush. Use chomp() for future-proofing (e.g. if
there were an $errmsg, run_command() would call errfunc() with a
newline) and attach an explicit newline for each line passed to the
errfunc() to fix the issue.

Fixes: e0eb405 ("zfspool: export: skip hardcoded warning about no-preserve-encryption flag")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/Storage/ZFSPoolPlugin.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index 8630744..4c5b6c5 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -868,7 +868,8 @@ sub volume_export {
         errfunc => sub {
             my $line = shift;
             if ($line !~ /^WARNING: no-preserve-encryption flag set, sending dataset/) {
-                print STDERR $line;
+                chomp($line);
+                print STDERR "$line\n";
                 *STDERR->flush();
             }
         },
-- 
2.47.3





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

end of thread, other threads:[~2026-07-23 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  8:50 [PATCH storage] zfspool: export: fix regression with printing progress output Fiona Ebner
2026-07-23 17:47 ` applied: " Thomas Lamprecht

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