Skip to content

Commit

Permalink
Merge pull request warewulf#1563 from anderbubble/error-format
Browse files Browse the repository at this point in the history
Format errors in logs as strings
  • Loading branch information
mslacken authored Nov 25, 2024
2 parents 470fb32 + 5834b82 commit 6f93d68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion internal/app/wwctl/container/exec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/api/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/upgrade/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6f93d68

Please sign in to comment.