External Sunstone IMG upload best practice?

(Spencer) #1

As per https://docs.opennebula.org/5.8/deployment/sunstone_setup/suns_advance.html#deploying-sunstone-in-a-different-machine

  • 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.


(Alejandro Huertas) #2

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

(Spencer) #3


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

(Alejandro Huertas) #4

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]
(Spencer) #5

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.