Bug 2117319
| Summary: | Error while creating Migration Policy | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Akriti Gupta <akrgupta> | ||||
| Component: | Virtualization | Assignee: | Itamar Holder <iholder> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Kedar Bidarkar <kbidarka> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.12.0 | CC: | cnv-qe-bugs, dshchedr | ||||
| Target Milestone: | --- | Keywords: | Regression, TestBlocker | ||||
| 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: | 2022-09-06 11:56:02 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
Akriti Gupta
2022-08-10 15:32:50 UTC
Created attachment 1905718 [details]
Migration Policy yaml
Blocker as this is Regression. Hello,
A recent commit [1] got rid of the redundant "matchLabels" fields.
In other words, please replace your YAML with this one:
spec:
allowAutoConverge: True
bandwidthPerMigration: 512Ki
completionTimeoutPerGiB: 50
allowPostCopy: True
selectors:
namespaceSelector:
awesome-namespace: "yes"
virtualMachineInstanceSelector:
best-vm: ""
p.s. please bear in mind that having an empty value does NOT act as a wildcard, but literally as an empty string. The reason I mention this is because there was an intention, followed by a PR [2] (that never got merged), to implement a wildcard this way. Currently this PR is abandoned and we plan to delay this implementation for now (for many reasons).
Please confirm that it works. If it does, I think we should close this BZ on "not a bug".
[1] https://github.com/kubevirt/kubevirt/pull/7510/commits/cab98e53fbaf0004299582c4617338d0ffa34950
[2] https://github.com/kubevirt/kubevirt/pull/7322
Thanks Itamar
I checked with suggested changes , I was able to successfully create migration policy on 4.12
[akrgupta@fedora auth]$ cat migration_policy.yaml
apiVersion: migrations.kubevirt.io/v1alpha1
kind: MigrationPolicy
metadata:
name: policy2
spec:
allowAutoConverge: True
bandwidthPerMigration: 512Ki
completionTimeoutPerGiB: 50
allowPostCopy: True
selectors:
namespaceSelector:
awesome-namespace: "yes"
virtualMachineInstanceSelector:
best-vm: ""
[akrgupta@fedora auth]$ oc apply -f migration_policy.yaml
migrationpolicy.migrations.kubevirt.io/policy2 created
Need to update the doc https://docs.openshift.com/container-platform/4.12/virt/live_migration/virt-configuring-live-migration-policies.html the Migration policy yaml in doc contains matchLabels field needs to be removed . Actual : selectors: namespaceSelector: matchLabels: hpc-workloads: "True" xyz-workloads-type: "" virtualMachineInstanceSelector: matchLabels: workload-type: "db" operating-system: "" expected: selectors: namespaceSelector: hpc-workloads: "True" xyz-workloads-type: "" virtualMachineInstanceSelector: workload-type: "db" operating-system: "" Looks good to me. I've also added a PR to upstream user-guide regarding that: https://github.com/kubevirt/user-guide/pull/671 |