External Sunstone IMG upload best practice?

As per Configuring Sunstone for Large Deployments — OpenNebula 5.8.5 documentation

  • If you want to upload files to OpenNebula, you will have to share the upload directory ( /var/tmp by default ) between sunstone and oned. Some server do not take into account the TMPDIR env var and this directory must be defined in the configuration file, for example in Passenger (client_body_temp_path)

On my external sunstone server I export /var/tmp via nfs and mounted the nfs-dir on /var/tmp on my oned server. Image upload is a success.
However, image upload fails when changing the mountpoint to a configured datastore safe_dir. Logging complains that the file is not found.
I’d like to avoid creating a NFS /var/tmp dir distributed across oned and sunstone farms. Is there a way to configure oned to look in a specific dir when the sunstone img upload function is triggered? It seems to expect everything in /var/tmp.

Thanks

You can change :tmpdir: /var/tmp this attribute in sunstone-server.conf.

Hi!

Does sunstone tell oned which directory will contain the uploaded image for datastore processing via the tmpdir variable?

Yes, Sunstone manage all the things related with the tmpdir.

 # Set the TMPDIR environment variable for uploaded images                       
ENV['TMPDIR']=$conf[:tmpdir] if $conf[:tmpdir]

Okay thank you, it wasn’t super duper clear that the mountpoint on oned for the shared sunstone tmpdir needed to be the same path.