Bug 2128949 - Cannot create MigrationPolicy from example YAML
Summary: Cannot create MigrationPolicy from example YAML
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.12.0
Assignee: Aviv Turgeman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-22 04:40 UTC by Guohua Ouyang
Modified: 2023-01-24 13:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-24 13:41:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error about creating MigrationPolicy from example YAML (194.11 KB, image/png)
2022-09-22 04:40 UTC, Guohua Ouyang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 896 0 None Merged Bug 2128949: Cannot create MigrationPolicy from example YAML 2022-09-29 15:06:52 UTC
Red Hat Issue Tracker CNV-21404 0 None None None 2023-01-24 12:51:46 UTC
Red Hat Product Errata RHSA-2023:0408 0 None None None 2023-01-24 13:41:16 UTC

Description Guohua Ouyang 2022-09-22 04:40:26 UTC
Created attachment 1913429 [details]
error about creating MigrationPolicy from example YAML

Description of problem:
Cannot create MigrationPolicy from example YAML.

apiVersion: migrations.kubevirt.io/v1alpha1
kind: MigrationPolicy
metadata:
  name: example
spec: {}


error: Error "Required value" for field "spec.selectors".

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create MigrationPolicy from example YAML
2.
3.

Actual results:


Expected results:
provide an usable example YAML for MigrationPolicy

Additional info:

Comment 1 Leon Kladnitsky 2022-09-29 15:11:21 UTC
The default YAML is still not sufficient, something like this is needed:

```
apiVersion: migrations.kubevirt.io/v1alpha1
kind: MigrationPolicy
metadata:
  name: mp-example
spec:
  selectors: {}
```

Comment 2 Leon Kladnitsky 2022-10-06 00:16:35 UTC
Verified on v4.12.0-131

Comment 4 Leon Kladnitsky 2022-10-06 07:04:34 UTC
The name should probably be "mp-example", as in other YAML-generated entities.

Comment 5 Aviv Turgeman 2022-10-06 09:52:47 UTC
(In reply to Leon Kladnitsky from comment #4)
> The name should probably be "mp-example", as in other YAML-generated
> entities.

Hi Leon

actually, the Console convention is to simply name it `example`, you can see in PV create/PVC create/Service create and so on
you're right that on VM YAML and VM template YAML example we have a different name (vm-example and vm-template-example), and those should be changed to example, can you please open a different bug for this?

Comment 8 errata-xmlrpc 2023-01-24 13:41:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:0408


Note You need to log in before you can comment on or make changes to this bug.