Description of problem: I edit Openshift virtualization VM name, after save I am not able to perform any action with selected VM Version-Release number of selected component (if applicable): 4.4.0.2-0.1.el8ev How reproducible: 100 Steps to Reproduce: 1. have cnv vm propagated in RHV ( name: cirros-vm-notfromtemplate ) 2. edit vm in rhv admin portal ( new name: cirros-vm ) 3. any action over such VM is failing Actual results: VM is not found. Expected results: Either name should be propagated back to OCP cluster or change of name should not be allowed Additional info: 2020-06-04 14:31:07,702+02 ERROR [org.ovirt.engine.core.bll.MigrateVmToServerCommand] (default task-143) [91f1772e-6c92-4193-8a74-b44fa0cfee3d] Command 'org.ovirt.engine.core.bll.MigrateVmToServerCommand' failed: EngineException: virtualmachine.kubevirt.io "cirros-vm" not found (Failed with error migrateErr and code 12) 2020-06-04 14:46:02,883+02 ERROR [org.ovirt.engine.core.bll.ShutdownVmCommand] (EE-ManagedThreadFactory-engine-Thread-24393) [51553238-e99a-481b-b9f3-2f46dce895fb] Command 'org.ovirt.engine.core.bll.ShutdownVmCommand' failed: EngineException: failed to interact with kubevirt stop endpoint (Failed with error unexpected and code 16) 2020-06-04 14:46:02,919+02 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-24393) [51553238-e99a-481b-b9f3-2f46dce895fb] EVENT_ID: USER_FAILED_SHUTDOWN_VM(74), Failed to initiate shutdown on VM cirros-vm (Host: ENV-z7j54-worker-bnpcl, User: admin@internal-authz).
We should not allow to change vm name.
> Expected results: > Either name should be propagated back to OCP cluster or change of name > should not be allowed Entities in Kubernetes cannot be renamed - in RHV we rely on the entity's UUID as its identifier but in Kubernetes entities are identified by their name (together with the namespace of namespaced entities). So long term, even when enabling updates of VMs in Kubevirt from within oVirt, we'd probably need to block renaming them as Piotr mentioned above. Short term though, any update of these VMs is not supported [1] and should be blocked [2]. There's a simple workaround for the reported scenario - to rename the VM back to its name in Kubevirt. [1] https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.4.0/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/KubevirtSupportedActions.java#L17 [2] The async nature of updates in Kubevirt (posting desired state and waiting for the actual state "to match" that) makes updating from RHV a bit more complicated.
The idea was to block name changes in the UI. As stated in description: "change of name should not be allowed"
Arik, Piotr, what is the expected behaviour? Should we disable just the name change or the whole editing of KubeVirt VMs?
(In reply to Lucia Jelinkova from comment #6) > Arik, Piotr, what is the expected behaviour? Should we disable just the name > change or the whole editing of KubeVirt VMs? For the time being, the whole editing should be disabled since the changes are not posted to Kubevirt
(In reply to Arik from comment #7) > For the time being, the whole editing should be disabled since the changes > are not posted to Kubevirt We have vm update for memory and cpu working and I would like to keep this ability. From my perspective disabling rename of the vm should be enough.
Piotr, can you please point to where we post the updates to Kubevirt?
Arik, here is updateVM method => https://github.com/oVirt/ovirt-engine/blob/2dfebce5f9de48290fde0fcf50a1138042e715ac/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/kubevirt/VmUpdater.java#L110
(In reply to Piotr Kliczewski from comment #10) > Arik, here is updateVM method => > https://github.com/oVirt/ovirt-engine/blob/ > 2dfebce5f9de48290fde0fcf50a1138042e715ac/backend/manager/modules/bll/src/ > main/java/org/ovirt/engine/core/bll/kubevirt/VmUpdater.java#L110 That's the other way around - we get a notification from Kubevirt about a change and update the RHV VM accordingly. I meant about propagating changes in oVirt to Kubevirt VMs
You are right I confused updates from cnv.
*** Bug 1844350 has been marked as a duplicate of this bug. ***
This bug is in modified state with target 4.4.2. Can this be re-targeted to 4.4.1?
(In reply to Sandro Bonazzola from comment #14) > This bug is in modified state with target 4.4.2. Can this be re-targeted to > 4.4.1? Yes, done
Edit button is disabled for vms which are belonging to kubevirt data center.
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.