Bug 2143039

Summary: Some liveMigrationConfig options cannot be used for cluster-wide setting
Product: Container Native Virtualization (CNV) Reporter: Jenifer Abrams <jhopper>
Component: InstallationAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Debarati Basu-Nag <dbasunag>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.11.1CC: dbasunag, kbidarka, kmajcher, sgott, srao, stirabos
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry-container-v4.13.0.rhel9-1070 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-18 02:55:41 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:

Description Jenifer Abrams 2022-11-15 21:10:10 UTC
Description of problem:
Following the doc method to adjust cluster-wide migration policies:
https://docs.openshift.com/container-platform/4.11/virt/live_migration/virt-live-migration-limits.html

 oc edit hco -n openshift-cnv kubevirt-hyperconverged

It is not possible to add:
allowAutoConverge: "true"
or
allowPostCopy: "true" 

I can adjust existing params and/or add a bandwidthPerMigration value, but when I add either of the "allow" options it just saves and they disappear. 

Version-Release number of selected component (if applicable):
OCP 4.11.7
Virt 4.11.1-91

How reproducible:
Each time

Steps to Reproduce:
1. oc edit hco -n openshift-cnv kubevirt-hyperconverged
Default values:
  liveMigrationConfig:
    completionTimeoutPerGiB: 800
    parallelMigrationsPerCluster: 5
    parallelOutboundMigrationsPerNode: 2
    progressTimeout: 150
2. Add to this section and save:
allowAutoConverge: "true"
3. oc edit again, that param is gone 

Actual results:
Changes are removed.

Expected results:
Users can set cluster-wide policies that are not in the default list. 

Additional info:
The cluster-wide policy cannot be set for those params, however setting a migration policy for a group of VMs does work properly, ex:

apiVersion: migrations.kubevirt.io/v1alpha1
kind: MigrationPolicy
metadata:
  name: my-awesome-policy
spec:
  # Migration Configuration
  allowAutoConverge: true
  completionTimeoutPerGiB: 900
  allowPostCopy: false
  # Matching to VMIs
  selectors:
    virtualMachineInstanceSelector:
      matchLabels:
      app: db

Once the VMI migrated it shows those values are used as expected:
    migrationConfiguration:
      allowAutoConverge: true
      allowPostCopy: false
      bandwidthPerMigration: "0"
      completionTimeoutPerGiB: 900

Comment 1 sgott 2022-11-16 13:30:19 UTC
Moving this BZ to the installation component because the parameters listed in the description are exposed in the KubeVirt CR. We suspect they simply need to be exposed in the hyperconverged operator. Please feel free to revert if you feel this is in error.

Comment 2 Simone Tiraboschi 2022-11-22 13:53:23 UTC
Stu, we never really got any request to implement those knobs and they are nor even mentioned in the documentation ( https://docs.openshift.com/container-platform/4.11/virt/live_migration/virt-live-migration-limits.html ) so this looks more like an RFE to me.
On the technical side exposing the additional APIs is straightforward, my concerns are mostly about the upgrade path that could potentially be affected.
Are we thinking about adding those for 4.13 or backporting them to 4.12 or even 4.11?

Comment 3 sgott 2022-11-22 18:40:01 UTC
Jenifer, as the issue reporter here, what's the urgency level from your PoV?

Comment 5 Krzysztof Majcher 2022-11-29 13:45:30 UTC
It's a trivial change on HCO side, that would then have to be covered with QE automation on Virt side.
If it's not yet covered, will you have capacity to do that?

What would be the default value for those two parameters?

Parameters are:
allowAutoConverge: "true"
allowPostCopy: "true"

Comment 8 Debarati Basu-Nag 2023-01-31 22:21:15 UTC
Verified against CNV-v4.13.0.rhel9-1184.
hco.spec.liveMigrationConfig has the following values:
==============================
allowAutoConverge: false
allowPostCopy: false

Comment 11 errata-xmlrpc 2023-05-18 02:55:41 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 (Moderate: OpenShift Virtualization 4.13.0 Images security, bug fix, and enhancement 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:3205