-
Bug
-
Resolution: Done-Errata
-
Major
-
CNV v4.18.0
-
None
-
2
-
False
-
-
False
-
CNV v4.99.0.rhel9-1721, CNV v4.18.0.rhel9-543
-
---
-
---
-
-
Storage Core Sprint 262, Storage Core Sprint 263, CNV Storage 264
-
None
Description of problem:
test_restore_snapshot_while_vm_is_running AssertionError: Regex pattern did not match. Regex: '.*virtualmachinerestore-validator.snapshot.kubevirt.io.*denied the request: VirtualMachine.*is not stopped.*' Input: '422\nReason: Unprocessable Entity\nHTTP response headers: HTTPHeaderDict({\'Audit-Id\': \'36cdd874-f684-4f11-ae27-1d96c37a1007\', \'Cache-Control\': \'no-cache, private\', \'Content-Type\': \'application/json\', \'Strict-Transport-Security\': \'max-age=31536000; includeSubDomains; preload\', \'X-Kubernetes-Pf-Flowschema-Uid\': \'7ad217d4-3011-4251-8258-e39a62641a79\', \'X-Kubernetes-Pf-Prioritylevel-Uid\': \'d8ab5843-1a0d-4911-b7b5-3e188530f4e9\', \'Date\': \'Mon, 11 Nov 2024 08:11:42 GMT\', \'Content-Length\': \'454\'})\nHTTP response body: b\'{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"admission webhook \\\\"virtualmachinerestore-validator.snapshot.kubevirt.io\\\\" denied the request: VirtualMachine \\\\"vm-cnv-5048-1731312505-0371518\\\\" run strategy has to be Halted","reason":"Invalid","details":{"causes":[{"reason":"FieldValueInvalid","message":"VirtualMachine \\\\"vm-cnv-5048-1731312505-0371518\\\\" run strategy has to be Halted","field":"spec.target"}]},"code":422}\\n\'\nOriginal traceback: \n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/dynamic/client.py", line 55, in inner\n resp = func(self, *args, **kwargs)\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/dynamic/client.py", line 273, in request\n api_response = self.client.call_api(\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 348, in call_api\n return self.__call_api(resource_path, method,\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 180, in __call_api\n response_data = self.request(\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/client/api_client.py", line 391, in request\n return self.rest_client.POST(url,\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/client/rest.py", line 279, in POST\n return self.request("POST", url,\n\n File "/cnv-tests/.venv/lib/python3.9/site-packages/kubernetes/client/rest.py", line 238, in request\n raise ApiException(http_resp=r)\n'
Version-Release number of selected component (if applicable):
4.18
How reproducible:
Always
Steps to Reproduce:
1. Restore a running VM VM yaml: {'apiVersion': 'kubevirt.io/v1', 'kind': 'VirtualMachine', 'metadata': {'name': 'vm-cnv-5048-1731312505-0371518', 'namespace': 'snapshots-test-snapshots', 'labels': {}}, 'spec': {'template': {'spec': {'domain': {'devices': {'rng': {}, 'disks': [{'disk': {'bus': 'virtio'}, 'name': 'dv-disk'}]}, 'resources': {'requests': {'memory': '64M'}}}, 'volumes': [{'name': 'dv-disk', 'dataVolume': {'name': 'dv-vm-cnv-5048'}}]}, 'metadata': {'labels': {'kubevirt.io/vm': 'vm-cnv-5048-1731312505-0371518', 'kubevirt.io/domain': 'vm-cnv-5048-1731312505-0371518', 'debugLogs': 'true'}}}, 'runStrategy': 'Halted', 'dataVolumeTemplates': [{'metadata': {'name': 'dv-vm-cnv-5048', 'namespace': 'snapshots-test-snapshots'}, 'spec': {'source': {'http': {'url': 'https://cnv-qe-artifactory.apps.int.prod-stable-spoke1-dc-iad2.itup.redhat.com/artifactory/cnv-qe-server-local/cnv-tests/cirros-images/cirros-0.4.0-x86_64-disk.qcow2', 'secretRef': 'cnv-tests-artifactory-secret', 'certConfigMap': 'artifactory-configmap'}}, 'storage': {'resources': {'requests': {'storage': '1Gi'}}, 'storageClassName': 'ocs-storagecluster-ceph-rbd-virtualization'}, 'contentType': 'kubevirt'}}]}} 2. 3.
Actual results:
Expected results:
Additional info:
- is cloned by
-
CNV-53953 [4.17] VirtualMachineRestore fails with 'run strategy has to be Halted'
-
- Closed
-
-
CNV-53954 [4.16] VirtualMachineRestore fails with 'run strategy has to be Halted'
-
- Closed
-
- is related to
-
CNV-54440 VM runStrategy changes after VM Restore
-
- ASSIGNED
-
- links to
-
RHEA-2024:139653 OpenShift Virtualization 4.18.0 Images
- mentioned on
(2 mentioned on)