Skip to content

Commit

Permalink
Silence disk resizing debug
Browse files Browse the repository at this point in the history
log.Debugf is enough for debug output when it's useful to have,
log.Infof is not needed.
  • Loading branch information
cfergeau committed Nov 12, 2020
1 parent 77865c9 commit 0a24b15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/libvirt/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ func (d *Driver) checkIfResizeNeeded(newCapacity uint64) (bool, error) {
}
capacity, err := d.getVolCapacity()
if err != nil {
log.Infof("could not get volume capacity: %v", err)
log.Debugf("failed to get volume capacity")
return false, err
}
log.Infof("volume capacity is %d", capacity)

if capacity == newCapacity {
log.Debugf("disk image capacity is already %d bytes", capacity)
return false, nil
Expand Down Expand Up @@ -182,12 +182,11 @@ func (d *Driver) resizeDiskImage(newCapacity uint64) error {
}
defer vol.Free() // nolint:errcheck

log.Infof("resizing volume to %d", newCapacity)
log.Debugf("resizing volume to %d", newCapacity)
err = vol.Resize(newCapacity, 0)
if err == nil {
d.DiskCapacity = newCapacity
}
log.Infof("vol.Resize result: %v", err)

return err
}

0 comments on commit 0a24b15

Please sign in to comment.