mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix(host): set migrate bandwidth nolimit (#17974)
This commit is contained in:
@@ -17,6 +17,7 @@ package guestman
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
@@ -1203,8 +1204,9 @@ func (s *SGuestLiveMigrateTask) setMaxBandwidth(res string) {
|
||||
return
|
||||
}
|
||||
|
||||
var maxBandwidth int64 = 0
|
||||
if s.params.MaxBandwidthMB != nil {
|
||||
// default set bandwidth no limit
|
||||
var maxBandwidth int64 = math.MaxInt64
|
||||
if s.params.MaxBandwidthMB != nil && *s.params.MaxBandwidthMB > 0 {
|
||||
maxBandwidth = *s.params.MaxBandwidthMB * 1024 * 1024
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user