Bug 2062966

Summary: Duplicated lines existed in virt-controller deployment command part after adding annotation to HyperConverged CR
Product: Container Native Virtualization (CNV) Reporter: chhu
Component: VirtualizationAssignee: sgott
Status: NEW --- QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10.0CC: dholler, kmajcher, stirabos
Target Milestone: ---   
Target Release: 4.15.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: libvirt_CNV_INT
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Comment 2 Simone Tiraboschi 2023-02-14 16:45:20 UTC
The issue is absolutely reproducible also on CNV 4.12 but probably on virt-oeprator:

this
stirabos@t14s:~$ oc get hco -n openshift-cnv kubevirt-hyperconverged -o json | jq '.metadata.annotations'
{
  "deployOVS": "false",
  "kubevirt.kubevirt.io/jsonpatch": "[\n  {\n    \"op\": \"add\",\n    \"path\": \"/spec/customizeComponents/patches\",\n    \"value\":\n      [\n        {\n          \"patch\": \"[{\\\"op\\\":\\\"add\\\",\\\"path\\\":\\\"/spec/template/spec/containers/0/command/-\\\",\\\"value\\\":\\\"--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197\\\"}]\",\n          \"resourceName\": \"virt-controller\",\n          \"resourceType\": \"Deployment\",\n          \"type\": \"json\"\n        },\n        {\n          \"patch\": \"[{\\\"op\\\":\\\"add\\\",\\\"path\\\":\\\"/spec/template/spec/initContainers/0/image\\\",\\\"value\\\":\\\"quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197\\\"},{\\\"op\\\":\\\"add\\\",\\\"path\\\":\\\"/spec/template/spec/containers/0/image\\\",\\\"value\\\":\\\"quay.io/libvirt_v2v_cnv/virt-handler:v4.10.0-197\\\"}]\",\n          \"resourceName\": \"virt-handler\",\n          \"resourceType\": \"DaemonSet\",\n          \"type\": \"json\"\n        }\n      ]\n  }\n]"
}

sets:
stirabos@t14s:~$ oc get kubevirt -n openshift-cnv kubevirt-kubevirt-hyperconverged -o json | jq .spec.customizeComponents
{
  "patches": [
    {
      "patch": "[{\"op\":\"add\",\"path\":\"/spec/template/spec/containers/0/command/-\",\"value\":\"--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197\"}]",
      "resourceName": "virt-controller",
      "resourceType": "Deployment",
      "type": "json"
    },
    {
      "patch": "[{\"op\":\"add\",\"path\":\"/spec/template/spec/initContainers/0/image\",\"value\":\"quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197\"},{\"op\":\"add\",\"path\":\"/spec/template/spec/containers/0/image\",\"value\":\"quay.io/libvirt_v2v_cnv/virt-handler:v4.10.0-197\"}]",
      "resourceName": "virt-handler",
      "resourceType": "DaemonSet",
      "type": "json"
    }
  ]
}

on the CR for virt-operator

that probably internally multiplies them.

stirabos@t14s:~$ oc get deployment virt-controller -n openshift-cnv -o json | jq .spec.template.spec.containers[0].command
[
  "virt-controller",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197",
  "--launcher-image=quay.io/libvirt_v2v_cnv/virt-launcher:v4.10.0-197"
]


Moving to virt component for further investigations.

Comment 3 Kedar Bidarkar 2023-02-15 13:42:42 UTC
Taking severity and capacity into account moving this bug to CNV 4.14

Comment 4 Kedar Bidarkar 2023-07-13 13:46:13 UTC
Taking severity and capacity into account moving this bug to CNV 4.15