Skip to content

Commit

Permalink
Merge pull request kubevirt#12848 from iholder101/migrations/reduce_t…
Browse files Browse the repository at this point in the history
…imeout

Reduce default CompletionTimeoutPerGiB from 800s to 150s
  • Loading branch information
kubevirt-bot authored Sep 25, 2024
2 parents b09f8ce + 59bd705 commit 69c4145
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -15006,7 +15006,7 @@
"$ref": "#/definitions/k8s.io.apimachinery.pkg.api.resource.Quantity"
},
"completionTimeoutPerGiB": {
"description": "CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. If a live-migration takes longer to migrate than this value multiplied by the size of the VMI, the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800",
"description": "CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take. If a live-migration takes longer to migrate than this value multiplied by the size of the VMI, the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150",
"type": "integer",
"format": "int64"
},
Expand Down
4 changes: 2 additions & 2 deletions manifests/generated/kv-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ spec:
description: |-
CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
format: int64
type: integer
disableTLS:
Expand Down Expand Up @@ -3865,7 +3865,7 @@ spec:
description: |-
CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
format: int64
type: integer
disableTLS:
Expand Down
2 changes: 1 addition & 1 deletion pkg/virt-config/virt-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
MigrationAllowAutoConverge bool = false
MigrationAllowPostCopy bool = false
MigrationProgressTimeout int64 = 150
MigrationCompletionTimeoutPerGiB int64 = 800
MigrationCompletionTimeoutPerGiB int64 = 150
DefaultAMD64MachineType = "q35"
DefaultPPC64LEMachineType = "pseries"
DefaultAARCH64MachineType = "virt"
Expand Down
8 changes: 4 additions & 4 deletions pkg/virt-handler/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1796,10 +1796,10 @@ var _ = Describe("VirtualMachineInstance", func() {
vmiFeeder.Add(vmi)
options := &cmdclient.MigrationOptions{
Bandwidth: resource.MustParse("0Mi"),
ProgressTimeout: 150,
CompletionTimeoutPerGiB: 800,
UnsafeMigration: false,
AllowPostCopy: false,
ProgressTimeout: virtconfig.MigrationProgressTimeout,
CompletionTimeoutPerGiB: virtconfig.MigrationCompletionTimeoutPerGiB,
UnsafeMigration: virtconfig.DefaultUnsafeMigrationOverride,
AllowPostCopy: virtconfig.MigrationAllowPostCopy,
}
client.EXPECT().MigrateVirtualMachine(vmi, options)
controller.Execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ var CRDsValidation map[string]string = map[string]string{
description: |-
CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
format: int64
type: integer
disableTLS:
Expand Down Expand Up @@ -13593,7 +13593,7 @@ var CRDsValidation map[string]string = map[string]string{
description: |-
CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
format: int64
type: integer
disableTLS:
Expand Down Expand Up @@ -14007,7 +14007,7 @@ var CRDsValidation map[string]string = map[string]string{
description: |-
CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
format: int64
type: integer
disableTLS:
Expand Down
2 changes: 1 addition & 1 deletion staging/src/kubevirt.io/api/core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ type MigrationConfiguration struct {
BandwidthPerMigration *resource.Quantity `json:"bandwidthPerMigration,omitempty"`
// CompletionTimeoutPerGiB is the maximum number of seconds per GiB a migration is allowed to take.
// If a live-migration takes longer to migrate than this value multiplied by the size of the VMI,
// the migration will be cancelled, unless AllowPostCopy is true. Defaults to 800
// the migration will be cancelled, unless AllowPostCopy is true. Defaults to 150
CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"`
// ProgressTimeout is the maximum number of seconds a live migration is allowed to make no progress.
// Hitting this timeout means a migration transferred 0 data for that many seconds. The migration is
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staging/src/kubevirt.io/client-go/api/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 69c4145

Please sign in to comment.