Skip to content

Commit c9bc8dc

Browse files
authored
Change default value for completionTimeoutPerGiB to 150s (#3195)
* Change default value for completionTimeoutPerGiB to 150s To align with kubevirt/kubevirt#12848 Signed-off-by: Itamar Holder <[email protected]> * adapt tests to new CompletionTimeoutPerGiB value Signed-off-by: Itamar Holder <[email protected]> * Remove default CompletionTimeoutPerGiB from generated files Signed-off-by: Itamar Holder <[email protected]> * update base HCO objects Signed-off-by: Itamar Holder <[email protected]> * adapt documentation Signed-off-by: Itamar Holder <[email protected]> --------- Signed-off-by: Itamar Holder <[email protected]>
1 parent 7b4e937 commit c9bc8dc

File tree

11 files changed

+25
-25
lines changed

11 files changed

+25
-25
lines changed

api/v1beta1/hyperconverged_types.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type HyperConvergedSpec struct {
7272

7373
// Live migration limits and timeouts are applied so that migration processes do not
7474
// overwhelm the cluster.
75-
// +kubebuilder:default={"completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}
75+
// +kubebuilder:default={"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}
7676
// +optional
7777
LiveMigrationConfig LiveMigrationConfigurations `json:"liveMigrationConfig,omitempty"`
7878

@@ -337,8 +337,8 @@ type LiveMigrationConfigurations struct {
337337
// higher completionTimeoutPerGiB to let workload with spikes in its memory dirty
338338
// rate to converge.
339339
// The format is a number.
340-
// +kubebuilder:default=800
341-
// +default=800
340+
// +kubebuilder:default=150
341+
// +default=150
342342
// +optional
343343
CompletionTimeoutPerGiB *int64 `json:"completionTimeoutPerGiB,omitempty"`
344344

@@ -844,7 +844,7 @@ type HyperConverged struct {
844844
metav1.TypeMeta `json:",inline"`
845845
metav1.ObjectMeta `json:"metadata,omitempty"`
846846

847-
// +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false, "deployKubeSecondaryDNS": false, "disableMDevConfiguration": false, "persistentReservation": false, "autoResourceLimits": false, "enableApplicationAwareQuota": false, "primaryUserDefinedNetworkBinding": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": true}}
847+
// +kubebuilder:default={"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false, "deployKubeSecondaryDNS": false, "disableMDevConfiguration": false, "persistentReservation": false, "autoResourceLimits": false, "enableApplicationAwareQuota": false, "primaryUserDefinedNetworkBinding": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": true}}
848848
// +optional
849849
Spec HyperConvergedSpec `json:"spec,omitempty"`
850850
Status HyperConvergedStatus `json:"status,omitempty"`

api/v1beta1/zz_generated.defaults.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/zz_generated.openapi.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
liveMigrationConfig:
7070
allowAutoConverge: false
7171
allowPostCopy: false
72-
completionTimeoutPerGiB: 800
72+
completionTimeoutPerGiB: 150
7373
parallelMigrationsPerCluster: 5
7474
parallelOutboundMigrationsPerNode: 2
7575
progressTimeout: 150
@@ -2224,7 +2224,7 @@ spec:
22242224
default:
22252225
allowAutoConverge: false
22262226
allowPostCopy: false
2227-
completionTimeoutPerGiB: 800
2227+
completionTimeoutPerGiB: 150
22282228
parallelMigrationsPerCluster: 5
22292229
parallelOutboundMigrationsPerNode: 2
22302230
progressTimeout: 150
@@ -2256,7 +2256,7 @@ spec:
22562256
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
22572257
type: string
22582258
completionTimeoutPerGiB:
2259-
default: 800
2259+
default: 150
22602260
description: |-
22612261
If a migrating VM is big and busy, while the connection to the destination node
22622262
is slow, migration may never converge. The completion timeout is calculated

controllers/operands/kubevirt_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Version: 1.2.3`)
335335
mc := foundResource.Spec.Configuration.MigrationConfiguration
336336
Expect(mc).ToNot(BeNil())
337337
Expect(mc.BandwidthPerMigration).To(BeNil())
338-
Expect(*mc.CompletionTimeoutPerGiB).To(Equal(int64(800)))
338+
Expect(*mc.CompletionTimeoutPerGiB).To(Equal(int64(150)))
339339
Expect(*mc.ParallelMigrationsPerCluster).To(Equal(uint32(5)))
340340
Expect(*mc.ParallelOutboundMigrationsPerNode).To(Equal(uint32(2)))
341341
Expect(*mc.ProgressTimeout).To(Equal(int64(150)))
@@ -544,7 +544,7 @@ Version: 1.2.3`)
544544
mc := foundResource.Spec.Configuration.MigrationConfiguration
545545
Expect(mc).ToNot(BeNil())
546546
Expect(mc.BandwidthPerMigration).To(BeNil())
547-
Expect(*mc.CompletionTimeoutPerGiB).To(Equal(int64(800)))
547+
Expect(*mc.CompletionTimeoutPerGiB).To(Equal(int64(150)))
548548
Expect(*mc.ParallelMigrationsPerCluster).To(Equal(uint32(5)))
549549
Expect(*mc.ParallelOutboundMigrationsPerNode).To(Equal(uint32(2)))
550550
Expect(*mc.ProgressTimeout).To(Equal(int64(150)))

deploy/crds/hco00.crd.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
liveMigrationConfig:
7070
allowAutoConverge: false
7171
allowPostCopy: false
72-
completionTimeoutPerGiB: 800
72+
completionTimeoutPerGiB: 150
7373
parallelMigrationsPerCluster: 5
7474
parallelOutboundMigrationsPerNode: 2
7575
progressTimeout: 150
@@ -2224,7 +2224,7 @@ spec:
22242224
default:
22252225
allowAutoConverge: false
22262226
allowPostCopy: false
2227-
completionTimeoutPerGiB: 800
2227+
completionTimeoutPerGiB: 150
22282228
parallelMigrationsPerCluster: 5
22292229
parallelOutboundMigrationsPerNode: 2
22302230
progressTimeout: 150
@@ -2256,7 +2256,7 @@ spec:
22562256
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
22572257
type: string
22582258
completionTimeoutPerGiB:
2259-
default: 800
2259+
default: 150
22602260
description: |-
22612261
If a migrating VM is big and busy, while the connection to the destination node
22622262
is slow, migration may never converge. The completion timeout is calculated

deploy/hco.cr.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
liveMigrationConfig:
2929
allowAutoConverge: false
3030
allowPostCopy: false
31-
completionTimeoutPerGiB: 800
31+
completionTimeoutPerGiB: 150
3232
parallelMigrationsPerCluster: 5
3333
parallelOutboundMigrationsPerNode: 2
3434
progressTimeout: 150

deploy/index-image/community-kubevirt-hyperconverged/1.14.0/manifests/hco00.crd.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
liveMigrationConfig:
7070
allowAutoConverge: false
7171
allowPostCopy: false
72-
completionTimeoutPerGiB: 800
72+
completionTimeoutPerGiB: 150
7373
parallelMigrationsPerCluster: 5
7474
parallelOutboundMigrationsPerNode: 2
7575
progressTimeout: 150
@@ -2224,7 +2224,7 @@ spec:
22242224
default:
22252225
allowAutoConverge: false
22262226
allowPostCopy: false
2227-
completionTimeoutPerGiB: 800
2227+
completionTimeoutPerGiB: 150
22282228
parallelMigrationsPerCluster: 5
22292229
parallelOutboundMigrationsPerNode: 2
22302230
progressTimeout: 150
@@ -2256,7 +2256,7 @@ spec:
22562256
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
22572257
type: string
22582258
completionTimeoutPerGiB:
2259-
default: 800
2259+
default: 150
22602260
description: |-
22612261
If a migrating VM is big and busy, while the connection to the destination node
22622262
is slow, migration may never converge. The completion timeout is calculated

deploy/olm-catalog/community-kubevirt-hyperconverged/1.14.0/manifests/hco00.crd.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
liveMigrationConfig:
7070
allowAutoConverge: false
7171
allowPostCopy: false
72-
completionTimeoutPerGiB: 800
72+
completionTimeoutPerGiB: 150
7373
parallelMigrationsPerCluster: 5
7474
parallelOutboundMigrationsPerNode: 2
7575
progressTimeout: 150
@@ -2224,7 +2224,7 @@ spec:
22242224
default:
22252225
allowAutoConverge: false
22262226
allowPostCopy: false
2227-
completionTimeoutPerGiB: 800
2227+
completionTimeoutPerGiB: 150
22282228
parallelMigrationsPerCluster: 5
22292229
parallelOutboundMigrationsPerNode: 2
22302230
progressTimeout: 150
@@ -2256,7 +2256,7 @@ spec:
22562256
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
22572257
type: string
22582258
completionTimeoutPerGiB:
2259-
default: 800
2259+
default: 150
22602260
description: |-
22612261
If a migrating VM is big and busy, while the connection to the destination node
22622262
is slow, migration may never converge. The completion timeout is calculated

docs/api.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ HyperConverged is the Schema for the hyperconvergeds API
121121
| Field | Description | Scheme | Default | Required |
122122
| ----- | ----------- | ------ | -------- |-------- |
123123
| metadata | | [metav1.ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta) | | false |
124-
| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false, "deployKubeSecondaryDNS": false, "disableMDevConfiguration": false, "persistentReservation": false, "autoResourceLimits": false, "enableApplicationAwareQuota": false, "primaryUserDefinedNetworkBinding": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": true}} | false |
124+
| spec | | [HyperConvergedSpec](#hyperconvergedspec) | {"certConfig": {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}},"featureGates": {"downwardMetrics": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false, "deployKubeSecondaryDNS": false, "disableMDevConfiguration": false, "persistentReservation": false, "autoResourceLimits": false, "enableApplicationAwareQuota": false, "primaryUserDefinedNetworkBinding": false}, "liveMigrationConfig": {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false}, "resourceRequirements": {"vmiCPUAllocationRatio": 10}, "uninstallStrategy": "BlockUninstallIfWorkloadsExist", "virtualMachineOptions": {"disableFreePageReporting": false, "disableSerialConsoleLog": true}} | false |
125125
| status | | [HyperConvergedStatus](#hyperconvergedstatus) | | false |
126126

127127
[Back to TOC](#table-of-contents)
@@ -201,7 +201,7 @@ HyperConvergedSpec defines the desired state of HyperConverged
201201
| infra | infra HyperConvergedConfig influences the pod configuration (currently only placement) for all the infra components needed on the virtualization enabled cluster but not necessarily directly on each node running VMs/VMIs. | [HyperConvergedConfig](#hyperconvergedconfig) | | false |
202202
| workloads | workloads HyperConvergedConfig influences the pod configuration (currently only placement) of components which need to be running on a node where virtualization workloads should be able to run. Changes to Workloads HyperConvergedConfig can be applied only without existing workload. | [HyperConvergedConfig](#hyperconvergedconfig) | | false |
203203
| featureGates | featureGates is a map of feature gate flags. Setting a flag to `true` will enable the feature. Setting `false` or removing the feature gate, disables the feature. | [HyperConvergedFeatureGates](#hyperconvergedfeaturegates) | {"downwardMetrics": false, "enableCommonBootImageImport": true, "deployVmConsoleProxy": false, "deployKubeSecondaryDNS": false, "disableMDevConfiguration": false, "persistentReservation": false, "autoResourceLimits": false, "enableApplicationAwareQuota": false, "primaryUserDefinedNetworkBinding": false} | false |
204-
| liveMigrationConfig | Live migration limits and timeouts are applied so that migration processes do not overwhelm the cluster. | [LiveMigrationConfigurations](#livemigrationconfigurations) | {"completionTimeoutPerGiB": 800, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false} | false |
204+
| liveMigrationConfig | Live migration limits and timeouts are applied so that migration processes do not overwhelm the cluster. | [LiveMigrationConfigurations](#livemigrationconfigurations) | {"completionTimeoutPerGiB": 150, "parallelMigrationsPerCluster": 5, "parallelOutboundMigrationsPerNode": 2, "progressTimeout": 150, "allowAutoConverge": false, "allowPostCopy": false} | false |
205205
| permittedHostDevices | PermittedHostDevices holds information about devices allowed for passthrough | *[PermittedHostDevices](#permittedhostdevices) | | false |
206206
| mediatedDevicesConfiguration | MediatedDevicesConfiguration holds information about MDEV types to be defined on nodes, if available | *[MediatedDevicesConfiguration](#mediateddevicesconfiguration) | | false |
207207
| certConfig | certConfig holds the rotation policy for internal, self-signed certificates | [HyperConvergedCertConfig](#hyperconvergedcertconfig) | {"ca": {"duration": "48h0m0s", "renewBefore": "24h0m0s"}, "server": {"duration": "24h0m0s", "renewBefore": "12h0m0s"}} | false |
@@ -271,7 +271,7 @@ LiveMigrationConfigurations - Live migration limits and timeouts are applied so
271271
| parallelMigrationsPerCluster | Number of migrations running in parallel in the cluster. | *uint32 | 5 | false |
272272
| parallelOutboundMigrationsPerNode | Maximum number of outbound migrations per node. | *uint32 | 2 | false |
273273
| bandwidthPerMigration | Bandwidth limit of each migration, the value is quantity of bytes per second (e.g. 2048Mi = 2048MiB/sec) | *string | | false |
274-
| completionTimeoutPerGiB | If a migrating VM is big and busy, while the connection to the destination node is slow, migration may never converge. The completion timeout is calculated based on completionTimeoutPerGiB times the size of the guest (both RAM and migrated disks, if any). For example, with completionTimeoutPerGiB set to 800, a virtual machine instance with 6GiB memory will timeout if it has not completed migration in 1h20m. Use a lower completionTimeoutPerGiB to induce quicker failure, so that another destination or post-copy is attempted. Use a higher completionTimeoutPerGiB to let workload with spikes in its memory dirty rate to converge. The format is a number. | *int64 | 800 | false |
274+
| completionTimeoutPerGiB | If a migrating VM is big and busy, while the connection to the destination node is slow, migration may never converge. The completion timeout is calculated based on completionTimeoutPerGiB times the size of the guest (both RAM and migrated disks, if any). For example, with completionTimeoutPerGiB set to 800, a virtual machine instance with 6GiB memory will timeout if it has not completed migration in 1h20m. Use a lower completionTimeoutPerGiB to induce quicker failure, so that another destination or post-copy is attempted. Use a higher completionTimeoutPerGiB to let workload with spikes in its memory dirty rate to converge. The format is a number. | *int64 | 150 | false |
275275
| progressTimeout | The migration will be canceled if memory copy fails to make progress in this time, in seconds. | *int64 | 150 | false |
276276
| network | The migrations will be performed over a dedicated multus network to minimize disruption to tenant workloads due to network saturation when VM live migrations are triggered. | *string | | false |
277277
| allowAutoConverge | AllowAutoConverge allows the platform to compromise performance/availability of VMIs to guarantee successful VMI live migrations. Defaults to false | *bool | false | false |

tests/func-tests/defaults_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var _ = Describe("Check Default values", Label("defaults"), Serial, func() {
106106
defaultLiveMigrationConfig := v1beta1.LiveMigrationConfigurations{
107107
AllowAutoConverge: ptr.To(false),
108108
AllowPostCopy: ptr.To(false),
109-
CompletionTimeoutPerGiB: ptr.To(int64(800)),
109+
CompletionTimeoutPerGiB: ptr.To(int64(150)),
110110
ParallelMigrationsPerCluster: ptr.To(uint32(5)),
111111
ParallelOutboundMigrationsPerNode: ptr.To(uint32(2)),
112112
ProgressTimeout: ptr.To(int64(150)),

0 commit comments

Comments
 (0)