From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 748E71FF0E0 for ; Thu, 23 Jul 2026 10:52:10 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id AD3C321489; Thu, 23 Jul 2026 10:52:09 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH storage] zfspool: export: fix regression with printing progress output Date: Thu, 23 Jul 2026 10:50:37 +0200 Message-ID: <20260723085132.29326-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784796666472 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.221 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: NBFXKXSZGQQWHFJNO4BWLFER2YC3TCDJ X-Message-ID-Hash: NBFXKXSZGQQWHFJNO4BWLFER2YC3TCDJ X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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