[ https://issues.apache.org/jira/browse/CLOUDSTACK-9105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15041197#comment-15041197 ]
ASF GitHub Bot commented on CLOUDSTACK-9105: -------------------------------------------- Github user koushik-das commented on the pull request: https://github.com/apache/cloudstack/pull/1167#issuecomment-161897298 Now all logs related to an operation can be traced by running something like "grep logid:62314271 <MS logs>". Sample logs 2015-12-02 12:40:27,628 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-1:ctx-9fb051eb job-939) (logid:62314271) Executing AsyncJobVO {id:939, userId: 2, accountId: 2, instanceType: VirtualMachine, instanceId: 144, cmd: org.apache.cloudstack.api.command.admin.vm.DeployVMCmdByAdmin, cmdInfo: {"id":"144","response":"json","serviceofferingid":"0381afb2-50ab-40ca-9a57-e5d12482b5a3","ctxDetails":"{\"interface com.cloud.dc.DataCenter\":\"4cea85aa-3dda-4b03-8caf-391198777fb3\",\"interface com.cloud.vm.VirtualMachine\":\"5fb88c3e-3879-45b0-9a34-47dc1b82b8a5\",\"interface com.cloud.offering.ServiceOffering\":\"0381afb2-50ab-40ca-9a57-e5d12482b5a3\",\"interface com.cloud.template.VirtualMachineTemplate\":\"f74be2e8-73be-11e5-8882-249684d59f9c\"}","cmdEventType":"VM.CREATE","ctxUserId":"2","zoneid":"4cea85aa-3dda-4b03-8caf-391198777fb3","hypervisor":"Simulator","iptonetworklist[0].networkid":"4156249e-2b1f-49cb-b333-c2032c0792c5","templateid":"f74be2e8-73be-11e5-8882-249684d59f9c","httpmethod":"GET","_":"1449040227133","uuid":"5fb88c3e-3879-45b0-9a34-47dc1b82b8a5","ctxAccountId":"2","ctxStartEventId":"1420"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 1, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} Even the HV resource logs are tagged using the same "logid" identifier. 2015-12-02 12:40:30,263 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-15:ctx-99c2667b) (logid:62314271) Seq 2-852024754503155726: Response Received: 2015-12-02 12:40:30,266 DEBUG [c.c.a.t.Request] (DirectAgent-15:ctx-99c2667b) (logid:62314271) Seq 2-852024754503155726: Processing: { Ans: , MgmtId: 1, via: 2(SimulatedAgent.40265aab-4037-41f7-a971-230b2cf50730), Ver: v1, Flags: 10, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":144,"name":"i-2-144-QA","type":"User","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":536870912,"maxRam":536870912,"arch":"x86_64","os":"CentOS 5.3 (32-bit)","bootArgs":"","enableHA":false,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"fE8JPrJ_58va5JFGCvzpYg","params":{"deployvm":"true"},"uuid":"5fb88c3e-3879-45b0-9a34-47dc1b82b8a5","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"55ca5f13-f7e3-4e04-8cfe-e35e1c4f6e7f","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"7c07ec9b-a3c6-3466-ab5a-f5669ead0b22","id":1,"poolType":"NetworkFilesystem","host":"10.147.28.6","path":"/export/home/sandbox/primary0","port":2049,"url":"NetworkFilesystem://10.147.28.6/export/home/sandbox/primary0/?ROLE=Primary&STOREUUID=7c07ec9b-a3c6-3466-ab5a-f5669ead0b22"}},"name":"ROOT-144","size":100,"path":"8f44da97-efa5-400e-8b9c-fcef0399c9e4","volumeId":150,"vmName":"i-2-144-QA","accountId":2,"format":"RAW","provisioningType":"THIN","id":150,"deviceId":0,"hypervisorType":"Simulator"}},"diskSeq":0,"path":"8f44da97-efa5-400e-8b9c-fcef0399c9e4","type":"ROOT","_details":{"managed":"false","storagePort":"2049","storageHost":"10.147.28.6","volumeSize":"100"}},{"data":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"id":0,"format":"ISO","accountId":0,"hvm":false}},"diskSeq":3,"type":"ISO"}],"nics":[{"deviceId":0,"networkRateMbps":200,"defaultNic":true,"pxeDisable":false,"nicUuid":"f6da6502-7971-4b34-903b-15ba11247338","uuid":"4156249e-2b1f-49cb-b333-c2032c0792c5","ip":"10.1.1.172","netmask":"255.255.255.0","gateway":"10.1.1.1","mac":"02:00:04:52:00:8a","dns1":"10.147.28.6","broadcastType":"Vlan","trafficId":1,"type":"Guest","broadcastUri":"vlan://108","isolationUri":"vlan://108","isSecurityGroupEnabled":false}]},"result":true,"wait":0}}] } 2015-12-02 12:40:30,266 DEBUG [c.c.a.t.Request] (Work-Job-Executor-1:ctx-5ea59ec0 job-939/job-940 ctx-73b5d0fa) (logid:62314271) Seq 2-852024754503155726: Received: { Ans: , MgmtId: 1, via: 2(SimulatedAgent.40265aab-4037-41f7-a971-230b2cf50730), Ver: v1, Flags: 10, { StartAnswer } } 2015-12-02 12:40:30,302 DEBUG [c.c.c.CapacityManagerImpl] (Work-Job-Executor-1:ctx-5ea59ec0 job-939/job-940 ctx-73b5d0fa) (logid:62314271) VM state transitted from :Starting to Running with event: OperationSucceededvm's original host id: 2 new host id: 2 host id before state transition: 2 > Logging enhancement: Handle/reference to track API calls end to end in the MS > logs > ---------------------------------------------------------------------------------- > > Key: CLOUDSTACK-9105 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9105 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.6.0 > Reporter: Koushik Das > Assignee: Koushik Das > Fix For: 4.7.0 > > > Unique reference for each API call, so that it enables easier tracking and > debugging. > The reference handle should be propagated all the way down to the resource > layer. -- This message was sent by Atlassian JIRA (v6.3.4#6332)