Bug 1095240

Summary: PRD35 - [RFE] Support logging of commands parameters
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engineAssignee: Ravi Nori <rnori>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aberezin, eedri, gklein, iheim, lpeer, mavital, ofrenkel, oourfali, pstehlik, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.5.0-alpha2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 18:01:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1108861    
Bug Blocks: 1142923, 1156165    

Description Ilanit Stein 2014-05-07 10:42:12 UTC
Description of problem:
engine.log is missing information on what lead to the decision that "cluster doesn't exist", though it does exist, reported in bug 1095223: 
"Import VM fail on 3.3 "Cluster doesn't exist", though it does exist."

Version-Release number of selected component (if applicable):
rhevm-3.5.0-0.1000.2890.efcac0a.master.el6ev.noarch

Comment 1 Omer Frenkel 2014-05-08 10:22:40 UTC
well the only missing information is what cluster did the user send in the parameters, as we know the error is that we couldn't find the cluster.

im changing this bug to a feature request, to have an option to print command parameters (as sent from the user/caller).
we have the same infrastructure for VDS commands (commands that are executed in the VDS broker, which responsible to vdsm communication).

it would be greate to have the same mechanism in the BLL, for all commands.
i wonder if by default printing should be in debug or info (as it is in VDS commands)

example of printing of DestroyVDSCommand:

2014-02-25 09:59:03,402 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (org.ovirt.thread.pool-6-thread-47) [28e7666b] START, DestroyVDSCommand(HostName = duba, HostId = 9df66e59-dbec-4e4c-b002-a6090ce619f2, vmId=3b40b641-9e47-4511-9c11-189aab5534cb, force=false, secondsToWait=0, gracefully=false), log id: ccb68b4

Comment 2 Pavel Novotny 2014-10-22 13:45:49 UTC
Verified in rhevm-3.5.0-0.15.beta.el6ev.noarch (vt6).

In debug mode, BLL commands are printed with all arguments dumped.

Example of import VM action in engine.log:

2014-10-22 15:31:02,949 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8702-8) [5fd5f669] Running command: ImportVmCommand(Vm = VM [F19], VdsGroupId = 00000001-0001-0001-0001-0000000001f0, DiskMap = null, SourceDomainId = 38c0db4a-cfd7-4ef9-b8ed-6942ae42841b, DestDomainId = 6f60d892-3ef7-459d-9804-b4c8765c565a, CpuProfileId = null, ContainerId = 5d4f3c8a-7514-400d-a0f7-5c6c51178ba8, ForceOverride = false, ImportAsNewEntity = false, ImageToDestinationDomainMap = {d7c8d040-ad8b-44b6-ab03-2dd3cde4a03c=6f60d892-3ef7-459d-9804-b4c8765c565a}, ImagesExistOnTargetStorageDomain = false, CopyCollapse = false, TemplateMustExists = false, QuotaId = null, DiskProfileId = null, StorageDomainId = 6f60d892-3ef7-459d-9804-b4c8765c565a, IsInternal = false, StoragePoolId = 00000002-0002-0002-0002-00000000035b, ForceDelete = false, VdsId = null) internal: false. Entities affected :  ID: 6f60d892-3ef7-459d-9804-b4c8765c565a Type: StorageAction group IMPORT_EXPORT_VM with role type ADMIN

Comment 4 errata-xmlrpc 2015-02-11 18:01:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0158.html