Bug 1843933 - Block updates of Kubevirt VMs from oVirt edit VM dialog
Summary: Block updates of Kubevirt VMs from oVirt edit VM dialog
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.1
: 4.4.1.5
Assignee: Lucia Jelinkova
QA Contact: Pavol Brilla
URL:
Whiteboard:
: 1844350 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-04 12:50 UTC by Pavol Brilla
Modified: 2020-08-05 06:24 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.4.1.5
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-05 06:24:45 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+
ahadas: devel_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 109587 0 master MERGED webadmin: Action availability for unmanaged entity 2020-08-05 07:15:01 UTC
oVirt gerrit 109589 0 master MERGED webadmin: Add 'managed' to EntityObject 2020-08-05 07:15:00 UTC
oVirt gerrit 109592 0 master MERGED Disable buttons for non managed entities 2020-08-05 07:15:00 UTC

Description Pavol Brilla 2020-06-04 12:50:24 UTC
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).

Comment 1 Piotr Kliczewski 2020-06-04 12:55:46 UTC
We should not allow to change vm name.

Comment 4 Arik 2020-06-05 13:44:32 UTC
> 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.

Comment 5 Piotr Kliczewski 2020-06-05 13:52:08 UTC
The idea was to block name changes in the UI. As stated in description: "change of name should not be allowed"

Comment 6 Lucia Jelinkova 2020-06-08 08:14:21 UTC
Arik, Piotr, what is the expected behaviour? Should we disable just the name change or the whole editing of KubeVirt VMs?

Comment 7 Arik 2020-06-08 08:37:50 UTC
(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

Comment 8 Piotr Kliczewski 2020-06-08 08:41:58 UTC
(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.

Comment 9 Arik 2020-06-08 09:02:50 UTC
Piotr, can you please point to where we post the updates to Kubevirt?

Comment 11 Arik 2020-06-08 10:01:36 UTC
(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

Comment 12 Piotr Kliczewski 2020-06-08 11:08:11 UTC
You are right I confused updates from cnv.

Comment 13 Arik 2020-06-08 19:10:49 UTC
*** Bug 1844350 has been marked as a duplicate of this bug. ***

Comment 14 Sandro Bonazzola 2020-06-19 09:36:54 UTC
This bug is in modified state with target 4.4.2. Can this be re-targeted to 4.4.1?

Comment 15 Arik 2020-06-21 07:47:47 UTC
(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

Comment 16 Pavol Brilla 2020-07-09 17:37:45 UTC
Edit button is disabled for vms which are belonging to kubevirt data center.

Comment 17 Sandro Bonazzola 2020-08-05 06:24:45 UTC
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.


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