Skip to content

Commit

Permalink
Fix incorrect volume size fmt.Errorf string
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonation committed Oct 26, 2020
1 parent 37d4248 commit d22530e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/resource_libvirt_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func resourceLibvirtVolumeCreate(d *schema.ResourceData, meta interface{}) error
if _, ok := d.GetOk("size"); ok {
volumeDef.Capacity.Value = uint64(d.Get("size").(int))
if volumeDef.Capacity.Value % 512 != 0 {
return fmt.Errorf("Volume size %d is not a multiple of 512 bytes. This would lead to volume replacement and data loss at the next apply invocation.", volumeDef.Capacity.Value)
return fmt.Errorf("Custom volume size %d must be a multiple of 512 bytes", volumeDef.Capacity.Value)
}
}

Expand Down

0 comments on commit d22530e

Please sign in to comment.