From fd5fe85a33e1503deda1561415cf236c4db757e3 Mon Sep 17 00:00:00 2001 From: Vladik Romanovsky Date: Wed, 27 Feb 2019 13:17:13 -0500 Subject: [PATCH] add migration timeouts to vmi migration status Signed-off-by: Vladik Romanovsky --- api/openapi-spec/swagger.json | 10 ++++++++++ pkg/api/v1/types.go | 4 ++++ pkg/api/v1/types_swagger_generated.go | 2 ++ 3 files changed, 16 insertions(+) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index a4d9fcbcd279..2ceffeeb3c77 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5899,6 +5899,11 @@ "description": "Indicates the migration completed", "type": "boolean" }, + "completionTimeoutPerGiB": { + "description": "The time for GiB of data to wait for the migration to be completed before aborting it", + "type": "integer", + "format": "int64" + }, "endTimestamp": { "description": "The time the migration action ended", "type": "string" @@ -5911,6 +5916,11 @@ "description": "The VirtualMachineInstanceMigration object associated with this migration", "type": "string" }, + "progressTimeout": { + "description": "The time to wait for live migration to make progress in transferring data.", + "type": "integer", + "format": "int64" + }, "sourceNode": { "description": "The source node that the VMI originated on", "type": "string" diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 0d124be6f621..96cd833541ca 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -363,6 +363,10 @@ type VirtualMachineInstanceMigrationState struct { Failed bool `json:"failed,omitempty"` // The VirtualMachineInstanceMigration object associated with this migration MigrationUID types.UID `json:"migrationUid,omitempty"` + // The time for GiB of data to wait for the migration to be completed before aborting it + CompletionTimeoutPerGiB int64 `json:"completionTimeoutPerGiB,omitempty"` + // The time to wait for live migration to make progress in transferring data. + ProgressTimeout int64 `json:"progressTimeout,omitempty"` } type MigrationConfig struct { diff --git a/pkg/api/v1/types_swagger_generated.go b/pkg/api/v1/types_swagger_generated.go index 111850c7666e..fcc6ef73e22f 100644 --- a/pkg/api/v1/types_swagger_generated.go +++ b/pkg/api/v1/types_swagger_generated.go @@ -75,6 +75,8 @@ func (VirtualMachineInstanceMigrationState) SwaggerDoc() map[string]string { "completed": "Indicates the migration completed", "failed": "Indicates that the migration failed", "migrationUid": "The VirtualMachineInstanceMigration object associated with this migration", + "completionTimeoutPerGiB": "The time for GiB of data to wait for the migration to be completed before aborting it", + "progressTimeout": "The time to wait for live migration to make progress in transferring data.", } }