| Summary: | [REST-API] The completion of copying template disk audit log is shown with user SYSTEM | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Elad <ebenahar> | ||||
| Component: | RestAPI | Assignee: | Fred Rolland <frolland> | ||||
| Status: | CLOSED UPSTREAM | QA Contact: | Elad <ebenahar> | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.6.5 | CC: | acanan, amureini, bugs, ebenahar, juan.hernandez, sbonazzo, tnisan, ylavi | ||||
| Target Milestone: | ovirt-4.0.4 | Flags: | amureini:
ovirt-4.0.z?
ylavi: planning_ack+ tnisan: devel_ack+ acanan: testing_ack+ |
||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-09-07 11:48:06 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Tried to reproduce on 3.6.6, seems to work OK: User admin@internal-authz finished copying disk 1_Disk1 to domain NFS_TAL2. User admin@internal-authz logged out. User admin@internal-authz is copying disk 1_Disk1 to domain NFS_TAL2. Moving to MODIFIED so you can test it on 3.6.6 Still getting SYSTEM instead of the actual user in the audit log of template disk copy completion.
User SYSTEM finished copying disk test1_Disk1 to domain nfs13.
2016-05-10 15:20:11,250 INFO [org.ovirt.engine.core.bll.MoveOrCopyDiskCommand] (org.ovirt.thread.pool-6-thread-7) [] Lock freed to object 'EngineLock:{exclusiveLocks='[ec57bc76-37ae-409b-9fd5-7f66385db6e5=<DISK, ACTION_TYPE_FAILED_DISK_IS_BEING_MIGRATED$DiskName test1_Disk1>]', sharedLocks='[4074a6a6-e573-4f99-9802-67f1ca0985f6=<TEMPLATE, ACTION_TYPE_FAILED_DISK_IS_BEING_MIGRATED$DiskName test1_Disk1>]'}'
2016-05-10 15:20:11,274 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-7) [] Correlation ID: 7fb25bf, Job ID: 368aefbe-afe9-44a0-805c-19dabf7ca865, Call Stack: null, Custom Event ID: -1, Message: User SYSTEM finished copying disk test1_Disk1 to domain nfs13.
Used:
rhevm-3.6.6.2-0.1.el6.noarch
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release. Juan - if you're taking this, please change the team to Infra. If not, please reassign it to me. Elad, I cannot reproduce this issue in version 4. Can you see if it is still happening to you ? Thanks. Wasn't able to reproduce on latest 4.0 either. POST application/xml to: https://elad-rhevm3.scl.lab.tlv.redhat.com/ovirt-engine/api/disks/46e87932-14b1-48fe-accd-4da99f55ff39/copy Body: <action> <storage_domain> <name>nfs1</name> </storage_domain> </action> Log: 2016-09-07 14:32:42,952 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-11) [68db17c9] Correlation ID: 22cdc879, Job ID: b3ccf139-ba89-44ef-89ad-2b b991014425, Call Stack: null, Custom Event ID: -1, Message: User admin@internal-authz is copying disk vm-1_Disk1 to domain nfs1. rhevm-4.0.4-0.1.el7ev.noarch ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch Closing based on that comment, please reopen if this reproduces |
Created attachment 1153260 [details] engine.log Description of problem: When copying a template disk via REST-API, the audit log of the operation completion is shown with user SYSTEM instead of the actual user that did the operation (admdin@internal in my case). The audit log of the same operation, done via Webadmin portal includes the right user. Version-Release number of selected component (if applicable): rhevm-3.6.6-0.1.el6.noarch rhevm-restapi-3.6.6-0.1.el6.noarch rhevm-webadmin-portal-3.6.6-0.1.el6.noarch How reproducible: 100% Steps to Reproduce: 1. Copy a template disk via REST-API. For example: <action> <storage_domain> <name>nfs9</name> </storage_domain> </action> Actual results: The following audit log is shown in Webadmin portal for copying a template disk via REST-API (for the operation completion): User SYSTEM finished copying disk 1_Disk1 to domain nfs9. engine.log: 2016-05-03 08:09:06,002 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-10) [] Correlation ID: 7cdd7e56, Job ID: 38836a9b-572 e-4dc0-be41-11e44ac7641a, Call Stack: null, Custom Event ID: -1, Message: User SYSTEM finished copying disk 1_Disk1 to domain nfs9. This is different from the audit log shown for the same operation completion while it's being done via Webadmin portal: User admin@internal finished copying disk 1_Disk1 to domain nfs9. engine.log: 2016-05-03 08:12:50,712 INFO [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-6-thread-46) [] Correlation ID: e30683a, Job ID: 27bcd335-6cd6 -4116-9e1f-696659fd6cfe, Call Stack: null, Custom Event ID: -1, Message: User admin@internal finished copying disk 1_Disk1 to domain nfs9. Expected results: The actual user should be reported in the audit log while copying a template disk via REST-API and not SYSTEM Additional info: engine.log