Description of problem: As part of the DR site to site we added the ability to support other entity attributes such as permissions, affinity group and affinity labels. All those properties are already part of the entity's OVF. If some of those properties are missing like role or user, we simply register the entity without those properties. We should add validations for those properties which will be validated as part of the entity registration process. For example, we should check if user/role/affinity exists, if not the registration should fail unless the user will register the entity with the partial import flag. The missing properties should be displayed in an audit log message Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create VM + Add it to an affinity group 2. detach the storage domain the VM's disks are reside on 3. attach the storage domain to a new DC and register the VM Actual results: The VM will be registered without the affinity group Expected results: The VM should fail to be registered Additional info:
Maor, the link to the patch seems to be broken - can you take a look please?
Severity?
Hi Benny, I can't see any audit message in case a user/role/affinity-group/label is missing in the DC/cluster where the VM is registered to, after this VM's storage domain was detached from a different DC.
Tested with rhvm-4.2.1.4-0.1.el7.noarch
No warning in audit log in Webadmin events is shown, it does in engine.log [1]. I think we should also have this logged in the Webadmin. Leaving the bug ON_QA for now. Allon/Benny, please add your input, thanks. [1] 2018-02-01 13:55:57,602+02 WARN [org.ovirt.engine.core.bll.validator.ImportValidator] (default task-5) [] Affinity group g1 for cluster id df476b9e-8c90-40ae-a9ea-a0ba5bbeaef9 does not match VM cluster id 72112289-46ee-4049-a7a4-bc9f90ac1145
Created attachment 1389518 [details] verification screenshot As seen in the screenshot, in case an entity doesn't exist in the DC (such as affinity group or label), an event is shown in events tab in Webadmin along with log entry in engine.log: 2018-02-01 16:14:13,229+02 WARN [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engine-Thread-69063) [6df7d601-4341-4496-af31-677c1eb0daf4] EVENT_ID: IMPORTEXPORT _PARTIAL_VM_MISSING_ENTITIES(1,188), The following entities could not be verified and will not be part of the imported VM test: 'Affinity groups: g1 Affinity labels: label Users: elad@internal-authz ' (User: adm in@internal-authz) Used rhvm-4.2.1.4-0.1.el7.noarch
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.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.