Skip to content

Commit

Permalink
Fix volume size calculation if configured for the DHCP server
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Dec 1, 2021
1 parent b63f730 commit e3d87f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/infrastructure/ensurer/dhcp_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func createDHCPServer(ctx context.Context, client *ionossdk.APIClient, datacente
if 0 == volumeSize {
volumeSize = *image.Properties.Size
} else {
volumeSize = float32(math.Max(math.Ceil(float64(volumeSize) / 1048576), float64(*image.Properties.Size)))
volumeSize = float32(math.Max(math.Ceil(float64(volumeSize) / 1073741824), float64(*image.Properties.Size)))
}

volumeProperties := ionossdk.VolumeProperties{
Expand Down

0 comments on commit e3d87f3

Please sign in to comment.