From 170f055c207af6b871d84ef6782eb0d56a623614 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Wed, 25 Dec 2024 00:34:38 -0700 Subject: [PATCH] Log cpio errors more prominently Previously, cpio output would only be shown as a debug message. Now it is shown as an error message if cpio returns an error. Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 1 + internal/pkg/util/util.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ed0d22..605bee51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Process nodes.conf path dynamically from config. #1595, #1596, #1569 - Split overlays into distribution and site overlays. #831 - Added note to booting userdoc for removing machine-id. #1609 +- Log cpio errors more prominently. #1615 ### Removed diff --git a/internal/pkg/util/util.go b/internal/pkg/util/util.go index ff01674d..bf57fed4 100644 --- a/internal/pkg/util/util.go +++ b/internal/pkg/util/util.go @@ -374,8 +374,10 @@ func CpioCreate( }() out, err := proc.CombinedOutput() - if len(out) > 0 { - wwlog.Debug(string(out)) + if err != nil { + wwlog.Error("cpio failed: %s", out) + } else if len(out) > 0 { + wwlog.Debug("cpio: %s", out) } return FirstError(err, <-err_in)