[one-users] Sunstone image upload not working - images not in tmpdir

Daniel Molina dmolina at opennebula.org
Wed Nov 13 01:52:56 PST 2013


Hi Stefan,


On 13 November 2013 08:57, Stefan Kooman <stefan at bit.nl> wrote:

> Hi List,
>
> I'm a bit puzzled. I have a set of load-balanced sunstone nodes with
> ":tmpdir" set to "/mnt/sunstone_upload". This is an nfs share accessible
> by both "front-end" and "sunstone" nodes. If I upload an image it fails
> like this (from oned.log):
>
> Tue Nov 12 22:26:02 2013 [ReM][D]: Req:3824 UID:0 ImageAllocate invoked,
> "NAME="ubuntu_saucy"...", 105
> Tue Nov 12 22:26:02 2013 [ImM][I]: Command execution fail:
> /var/lib/one/remotes/datastore/fs/stat
>
> PERTX0RSSVZFUl9BQ1RJT05fREFUQT48SU1BR0U+PFBBVEg+L3RtcC9zdW5zdG9uZS11cGxvYWQyMDEzMTExMi0xMzUyLTFtNWlmcHg8L1BBVEg+PC9JT
>
> UFHRT48REFUQVNUT1JFPjxJRD4xMDU8L0lEPjxVSUQ+MDwvVUlEPjxHSUQ+MDwvR0lEPjxVTkFNRT5vbmVhZG1pbjwvVU5BTUU+PEdOQU1FPm9uZWFkbW
>
> luPC9HTkFNRT48TkFNRT5pbWFnZXNfZHNfMV9rdm1fY2x1c3RlcjwvTkFNRT48UEVSTUlTU0lPTlM+PE9XTkVSX1U+MTwvT1dORVJfVT48T1dORVJfTT4
>
> xPC9PV05FUl9NPjxPV05FUl9BPjA8L09XTkVSX0E+PEdST1VQX1U+MTwvR1JPVVBfVT48R1JPVVBfTT4wPC9HUk9VUF9NPjxHUk9VUF9BPjA8L0dST1VQ
>
> X0E+PE9USEVSX1U+MDwvT1RIRVJfVT48T1RIRVJfTT4wPC9PVEhFUl9NPjxPVEhFUl9BPjA8L09USEVSX0E+PC9QRVJNSVNTSU9OUz48RFNfTUFEPmZzP
>
> C9EU19NQUQ+PFRNX01BRD5zaGFyZWQ8L1RNX01BRD48QkFTRV9QQVRIPi92YXIvbGliL29uZS8vZGF0YXN0b3Jlcy8xMDU8L0JBU0VfUEFUSD48VFlQRT
>
> 4wPC9UWVBFPjxESVNLX1RZUEU+MDwvRElTS19UWVBFPjxDTFVTVEVSX0lEPjEwMDwvQ0xVU1RFUl9JRD48Q0xVU1RFUj5LVk08L0NMVVNURVI+PFRPVEF
>
> MX01CPjk5NjE0ODwvVE9UQUxfTUI+PEZSRUVfTUI+OTQyODAwPC9GUkVFX01CPjxVU0VEX01CPjE8L1VTRURfTUI+PElNQUdFUz48L0lNQUdFUz48VEVN
>
> UExBVEU+PERTX01BRD48IVtDREFUQVtmc11dPjwvRFNfTUFEPjxUTV9NQUQ+PCFbQ0RBVEFbc2hhcmVkXV0+PC9
>
> UTV9NQUQ+PFRZUEU+PCFbQ0RBVEFbSU1BR0VfRFNdXT48L1RZUEU+PC9URU1QTEFURT48L0RBVEFTVE9SRT48L0RTX0RSSVZFUl9BQ1RJT05fREFUQT4=
> 11178
> Tue Nov 12 22:26:02 2013 [ImM][I]: stat: cannot stat
> '/tmp/sunstone-upload20131112-1352-1m5ifpx': No such file or directory
> Tue Nov 12 22:26:02 2013 [ImM][E]: stat: Cannot determine size for
> /tmp/sunstone-upload20131112-1352-1m5ifpx
>
> It's trying to stat the file in /tmp while the tempdir should be
> "/mnt/sunstone_upload". The file does not apear in /tmp, /var/tmp on the
> sunstone nodes either.
>
> Sunstone nodes are running sunstone with Apache Passenger, running as
> "www-data" user. Permissions on /mnt/sunstone_upload are as follow:
>
> drwxrwxr-x 2 www-data oneadmin 4096 Nov 12 22:09 sunstone_upload
>
> Any hints?
>


Could you try exporting the $TMPDIR var before starting the passenger
processes?

This is the code that generates the temp file (sunstone-server.rb):
        tmpfile = Tempfile.open('sunstone-upload')

by default, it uses Dir.tmpdir as temp dir and this method checks the env
var TMPDIR.  This variable is defined in the sunstone-server script, but
Apache do not use this script to start new server instances

You can also specify it as a parameter in the code:
        tmpfile = Tempfile.open('sunstone-upload', '/mnt/sunstone_upload')

Hope this helps


>
> Thanks,
>
> Stefan
>
> P.s. I did apply patch http://dev.opennebula.org/issues/2407
>
>
> --
> | BIT BV  http://www.bit.nl/        Kamer van Koophandel 09090351
> | GPG: 0xD14839C6                   +31 318 648 688 / info at bit.nl
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iF4EAREIAAYFAlKDMNQACgkQTyGgYdFIOcYGYQD9FD/dfdHhWJdqgU9dI6huVnQx
> +ybFuGMhIU5waGUyrnMA/0kBHhX7Ejx3CzhYfbdIjpIBY0AdaVD57Gf7UVo+/nWm
> =qysQ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
--
Daniel Molina
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131113/34c3540a/attachment-0002.htm>


More information about the Users mailing list