[one-users] Sunstone image upload not working - images not in tmpdir
Stefan Kooman
stefan at bit.nl
Fri Nov 15 06:30:06 PST 2013
Quoting Stefan Kooman (stefan at bit.nl):
> I've tried this and that works, i.e. the image gets uploaded and stored
> in /mnt/sunstone_upload directory. However, something goes wrong copying
> the file to the datastore. The file is empty (0 bytes). Here some logging:
Answering myself here. This turns out te be a permissions problem.
www-data user creates the uploaded image with 600 permissions as user
www-data. oned is unable to read that file, does create the file but it
is empty. oned logs the following:
Fri Nov 15 15:18:06 2013 [ImM][I]: Copying
/mnt/sunstone_upload/sunstone-upload20131115-17163-lj1x9r to repository
fo
r image 31
Fri Nov 15 15:18:06 2013 [ReM][D]: Req:560 UID:0 ImageAllocate result
SUCCESS, 31
Fri Nov 15 15:18:06 2013 [ReM][D]: Req:8720 UID:0 ImageInfo invoked, 31
Fri Nov 15 15:18:06 2013 [ReM][D]: Req:8720 UID:0 ImageInfo result
SUCCESS, "<IMAGE><ID>31</ID><U..."
Fri Nov 15 15:18:06 2013 [ImM][I]: Image copied and ready to use.
It shouldn't report it's able to copy the file if it isn't. Somehow oned
manages to report file size (Size in sunstone) to be "16MB" (instead of
232M). It would be safer to "md5sum" the image before the copy and
after. Only if the hashes are equal it should report succes.
The more I think of it the more I think "sunstone" can better be run as
user "oneadmin" instead of www-data. Makes life easier in most places.
Shall I file a bug report?
Kind regards,
Stefan
P.s. Thanks for fixing the bugs anyway, you guys are doing a great job!
--
| BIT BV http://www.bit.nl/ Kamer van Koophandel 09090351
| GPG: 0xD14839C6 +31 318 648 688 / info at bit.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: Digital signature
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131115/7b260fca/attachment-0002.pgp>
More information about the Users
mailing list