Bug 2128949

Summary: Cannot create MigrationPolicy from example YAML
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Aviv Turgeman <aturgema>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.12.0CC: aturgema, gouyang, lkladnit
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-24 13:41:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
error about creating MigrationPolicy from example YAML none

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