You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by li jerry <di...@hotmail.com> on 2019/04/28 14:47:33 UTC

How CopyCommand Chooses the Host to Execute Commands

Hi all

      ACS 4.11.2 + XENSERVER 7.1.2, when creating an instance, why the host that executes the CopyCommand command is not the host that is elected to run the VM

Before CopyCommand is executed, a log like this is output:

2019-04-28 21:59:05,015 DEBUG [c.c.h.XenServerGuru] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) We are returning the default host to execute commands because the source and destination objects are not NFS type.


How was "default host" elected?
--------------------------------------------------------

The following is a streamlined log in the process of creating a VM:

2019-04-28 21:58:53,814 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) Deployment found  - P0=VM[User|i-9-1256-VM], P0=Dest[Zone(Id)-Pod(Id)-Cluster(Id)-Host(Id)-Storage(Volume(Id|Type-->Pool(Id))] : Dest[Zone(1)-Pod(1)-Cluster(1)-Host(21)-Storage(Volume(3177|ROOT-->Pool(57))]


2019-04-28 21:59:04,998 DEBUG [o.a.c.s.d.PrimaryDataStoreImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) Notfound (templateId:333poolId:57) in template_spool_ref, persisting it
2019-04-28 21:59:05,001 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) template 333 is already in store:57, type:Primary
2019-04-28 21:59:05,002 DEBUG [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) Found template bf5db637-f3b6-4b1b-9f0d-129394c57207 in storage pool 57 with VMTemplateStoragePool id: 479
2019-04-28 21:59:05,003 DEBUG [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) Acquire lock on VMTemplateStoragePool 479 with timeout 3600 seconds
2019-04-28 21:59:05,005 INFO  [o.a.c.s.v.VolumeServiceImpl] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) lock is acquired for VMTemplateStoragePool 479
2019-04-28 21:59:05,008 DEBUG [o.a.c.s.m.AncientDataMotionStrategy] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) copyAsync inspecting src type TEMPLATE copyAsync inspecting dest type TEMPLATE
2019-04-28 21:59:05,015 DEBUG [c.c.h.o.r.Ovm3HypervisorGuru] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) getCommandHostDelegation: class org.apache.cloudstack.storage.command.CopyCommand
2019-04-28 21:59:05,015 DEBUG [c.c.h.XenServerGuru] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) We are returning the default host to execute commands because the source and destination objects are not NFS type.
2019-04-28 21:59:05,016 DEBUG [c.c.a.t.Request] (Work-Job-Executor-52:ctx-111f5ae8 job-24311/job-24313 ctx-5dac21bb) (logid:ef1f86fb) Seq 25-4188066178477930907: Sending  { Cmd , MgmtId: 240661250348494, via: 25(ac6008), Ver: v1, Flags: 100111, [{"org.apache.cloudstack.storage.command.CopyCommand":{"srcTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/2/333/bf5db637-f3b6-4b1b-9f0d-129394c57207.vhd","uuid":"c01353d9-dbb6-4fdd-a5e7-42c3718c526b","id":333,"format":"VHD","accountId":2,"hvm":true,"displayText":"ubuntu 16.04","imageDataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://10.10.30.214/nfs/secondary","_role":"Image"}},"name":"bf5db637-f3b6-4b1b-9f0d-129394c57207","size":214748364800,"hypervisorType":"XenServer","bootable":false,"uniqueName":"bf5db637-f3b6-4b1b-9f0d-129394c57207","directDownload":false}},"destTO":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"uuid":"c01353d9-dbb6-4fdd-a5e7-42c3718c526b","id":333,"format":"VHD","accountId":2,"hvm":true,"displayText":"ubuntu 16.04","imageDataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"CP01CL01","id":57,"poolType":"PreSetup","host":"localhost","path":"/CP01CL01","port":0,"url":"PreSetup://localhost/CP01CL01/?ROLE=Primary&STOREUUID=CP01CL01","isManaged":false}},"name":"bf5db637-f3b6-4b1b-9f0d-129394c57207","size":214748364800,"hypervisorType":"XenServer","bootable":false,"uniqueName":"bf5db637-f3b6-4b1b-9f0d-129394c57207","directDownload":false}},"executeInSequence":true,"options":{},"options2":{},"wait":10800}}] }