Hi all,
Need your support for figuring out the problem, this issue has hijacked our 
work.
The issue is , when starting the system VM, management server tries to 
initialize templates, in which it fails.
As a result, I am not able to see the default templates in the list of 
templates.

Cloudstack has a local copy of the ova file and tries to copy this into the 
mounted secondary storage under a folder with a unique id. 
Then it tries to change the permissions on the file using "sudo chmod 777" - 
but this command fails. 
If I try and execute this command from the shell directly as root, it also 
fails with the same error. 

There should be a setting on the mounted file system that allows the root 
userid to do super user operations on the files in the mounted file system. 
"no_root_squash". We have checked and this setting is defined for the exported 
file system. I guess the question is now, why is the "no_root_squash" not 
working. It should allow the root user to do root operations on the files, but 
it is still giving us an error message for the chmod command. It seems that our 
secondary storage is implemented with ZFS instead of NFS as documented in the 
Cloudstack install. I don't know if there are issues with no_root_squash and 
ZFS, might be worth investigating that. 

Perhaps there are other settings on the ZFS configuration that we need to set?
 All we should need is to be able to set the permissions on these files to 
allow the local file to be accessible to the cloudstack user.
Please let me know your thoughts on this.

Logs show:

2013-01-11 05:23:16,018 INFO  [vmware.manager.VmwareStorageManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Executing 
copyTemplateFromSecondaryToPrimary. secondaryStorage: 
nfs://10.0.110.12/data/cloudstack/secondary, templatePathAtSecondaryStorage: 
template/tmpl/1/8/, templateName: routing-8
2013-01-11 05:23:16,019 DEBUG [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Executing: sudo mount -t nfs 
10.0.110.12:/data/cloudstack/secondary 
/var/lib/cloud/management/mnt/VM/345051758635.37d8c841
2013-01-11 05:23:16,147 DEBUG [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Execution is successful.
2013-01-11 05:23:16,148 DEBUG [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Executing: sudo chmod 777 
/var/lib/cloud/management/mnt/VM/345051758635.37d8c841
2013-01-11 05:23:16,192 DEBUG [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Exit value is 1
2013-01-11 05:23:16,192 DEBUG [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) chmod: changing permissions of 
`/var/lib/cloud/management/mnt/VM/345051758635.37d8c841': Operation not 
permitted
2013-01-11 05:23:16,193 WARN  [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Unable to set permissions for 
/var/lib/cloud/management/mnt/VM/345051758635.37d8c841 due to chmod: changing 
permissions of `/var/lib/cloud/management/mnt/VM/345051758635.37d8c841': 
Operation not permitted
2013-01-11 05:23:16,193 ERROR [vmware.manager.VmwareManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Unable to create mount point for 
nfs://10.0.110.12/data/cloudstack/secondary
2013-01-11 05:23:16,193 INFO  [vmware.manager.VmwareStorageManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Secondary storage mount point: /mnt/sec
2013-01-11 05:23:16,193 INFO  [vmware.manager.VmwareStorageManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Executing command: tar --no-same-owner 
-xf /mnt/sec/template/tmpl/1/8/routing-8.ova
2013-01-11 05:23:16,193 DEBUG [vmware.manager.VmwareStorageManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Executing: tar --no-same-owner -xf 
/mnt/sec/template/tmpl/1/8/routing-8.ova
2013-01-11 05:23:16,195 WARN  [vmware.manager.VmwareStorageManagerImpl] 
(DirectAgent-14:torvms04lx.sigmasys.net) Exception: tar --no-same-owner -xf 
/mnt/sec/template/tmpl/1/8/routing-8.ova
java.io.IOException: Cannot run program "tar" (in directory 
"/mnt/sec/template/tmpl/1/8"): error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)



Thanks and Regards.

Asmita Patil Vagyani. 

Reply via email to