Bug 2012738 - [Doc][Warm Migration] Interval time between precopies is not updated after patching configmap/vm-import-controller-config
Summary: [Doc][Warm Migration] Interval time between precopies is not updated after pa...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: Documentation
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.2.0
Assignee: Avital Pinnick
QA Contact: Maayan Hadasi
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks: 1955263 2015853
TreeView+ depends on / blocked
 
Reported: 2021-10-11 07:56 UTC by Maayan Hadasi
Modified: 2021-11-03 13:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2015853 (view as bug list)
Environment:
Last Closed: 2021-11-03 13:51:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Maayan Hadasi 2021-10-11 07:56:32 UTC
Description of problem:
Looks like the interval time between precopies in warm migration stays 60 minutes, although configmap/vm-import-controller-config was patched

oc command to change the interval time:
$ oc patch configmap/vm-import-controller-config -n openshift-cnv -p '{"data": {"warmImport.intervalMinutes": "3"}}'
configmap/vm-import-controller-config patched


$ oc get configmap/vm-import-controller-config -nopenshift-cnv -oyaml
apiVersion: v1
data:
  warmImport.intervalMinutes: "3"
kind: ConfigMap
metadata:
  creationTimestamp: "2021-10-05T08:55:09Z"
  name: vm-import-controller-config
  namespace: openshift-cnv
  resourceVersion: "7858476"
  uid: b34163e4-cdb6-479e-9d4f-db55baa1f46f


$ oc describe plan mig-plan-warm
...
      Warm:
        Consecutive Failures:  0
        Failures:              0
        Next Precopy At:       2021-10-11T07:47:19Z
        Precopies:
          Completed:    2021-10-11T06:47:19Z
          Snapshot:     snapshot-7858
          Started:      2021-10-11T06:41:02Z
        Successes:      0
  Observed Generation:  1
Events:
  Type    Reason  Age   From  Message
  ----    ------  ----  ----  -------
  Normal  Ready   44m   plan  The migration plan is ready.



Version-Release number of selected component (if applicable):
MTV 2.2.0-39 / iib: 121326
CNV 4.9.0-232 / iib: 117863


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Fabien Dupont 2021-10-11 12:13:54 UTC
I've updated the Product to MTV, since you're apparently not using VMIO API.
In MTV 2.2, the interval is not set in HCO or VMIO, because we don't use VMIO anymore. So, we need to update the documentation.

@slucidi, could you please explain how to set the interval ?

Comment 2 Sam Lucidi 2021-10-12 19:32:51 UTC
The precopy interval is now set as an environment variable on the forklift-controller pod's `controller` container. In order to adjust it, you need to add `PRECOPY_INTERVAL` with a value in minutes to the `env` section of the `controller` container definition on the `forklift-controller` deployment, or add the key `PRECOPY_INTERVAL` with a value in minutes to the `forklift-controller-config` config map and restart the controller pod.

Example of setting the environment variable on the deployment:

kind: Deployment
apiVersion: apps/v1
metadata:
  name: forklift-controller
  namespace: konveyor-forklift
  <...>
spec:
  template:
    spec:
      restartPolicy: Always
      serviceAccountName: forklift-controller
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 10
      securityContext: {}
      containers:
        - resources:
            limits:
              cpu: 500m
              memory: 800Mi
            requests:
              cpu: 100m
              memory: 350Mi
          terminationMessagePath: /dev/termination-log
          name: controller
          command:
            - /usr/local/bin/manager
          env:
            - name: PRECOPY_INTERVAL
              value: 60
     <...>

Example with the forklift-controller-config config map:

kind: ConfigMap
apiVersion: v1
metadata:
  name: forklift-controller-config
  namespace: konveyor-forklift
  <...>
data:
  PRECOPY_INTERVAL: '60'
  WORKING_DIR: /var/cache/inventory

Comment 3 Maayan Hadasi 2021-10-14 09:40:28 UTC
Thanks @slucidi for providing this information (comment #2)

Both options were checked and the interval time between precopies has been changed accordingly.
I noticed that the PRECOPY_INTERVAL environment variable on the `forklift-controller` deployment is what counts in case of PRECOPY_INTERVAL is set in both places
(`forklift-controller` deployment and `forklift-controller-config` configMap)
Could you please confirm this is expected?

Comment 4 Sam Lucidi 2021-10-15 18:09:39 UTC
Yes, that is expected.

Comment 7 Avital Pinnick 2021-11-03 13:51:29 UTC
Changes merged.


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