diff --git a/CHANGELOG.md b/CHANGELOG.md index f1dafdf9..7f1e8009 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix issue that initrd fails at downloading runtime overlay with permission denied error, when warewulf secure option in warewulf.conf is enabled. #806 - Allow iPXE to continue booting without runtime overlay. #806 +- Format errors in logs as strings. #1563 ## v4.5.8, 2024-10-01 diff --git a/internal/app/wwctl/container/exec/main.go b/internal/app/wwctl/container/exec/main.go index a087338c..148fc66e 100644 --- a/internal/app/wwctl/container/exec/main.go +++ b/internal/app/wwctl/container/exec/main.go @@ -48,7 +48,7 @@ func runContainedCmd(cmd *cobra.Command, containerName string, args []string) (e } defer func() { if err := os.RemoveAll(runDir); err != nil { - wwlog.Error("error removing run directory: %w", err) + wwlog.Error("error removing run directory: %s", err) } }() diff --git a/internal/pkg/api/container/container.go b/internal/pkg/api/container/container.go index 92618180..07b1e827 100644 --- a/internal/pkg/api/container/container.go +++ b/internal/pkg/api/container/container.go @@ -398,7 +398,7 @@ func ContainerRename(crp *wwapiv1.ContainerRenameParameter) (err error) { err = container.DeleteImage(crp.ContainerName) if err != nil { - wwlog.Warn("Could not remove image files for %s: %w", crp.ContainerName, err) + wwlog.Warn("Could not remove image files for %s: %s", crp.ContainerName, err) } if crp.Build { diff --git a/internal/pkg/upgrade/node.go b/internal/pkg/upgrade/node.go index d02e1a5f..2c60ad02 100644 --- a/internal/pkg/upgrade/node.go +++ b/internal/pkg/upgrade/node.go @@ -528,7 +528,7 @@ func (this *NetDev) Upgrade(addDefaults bool) (upgraded *node.NetDev) { if this.IpCIDR != "" { cidrIP, cidrIPNet, err := net.ParseCIDR(this.IpCIDR) if err != nil { - wwlog.Error("%v is not a valid CIDR address: %w", this.IpCIDR, err) + wwlog.Error("%v is not a valid CIDR address: %s", this.IpCIDR, err) } else { if upgraded.Ipaddr == nil { upgraded.Ipaddr = cidrIP