OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.25k stars 483 forks source link

incorrect error message for file not found #2109

Open FlorianHeigl opened 6 years ago

FlorianHeigl commented 6 years ago

Bug Report

Version of OpenNebula

Probably all

Component

Description

The following error is given when trying to import an image with an incorrect filename "[ImageAllocate] Cannot parse image SIZE:"

Expected Behavior

Report that the file isnt there

Actual Behavior

The underlying errors are not correctly handled / passed upwards There is no check if the file exists prior to scanning its size

How to reproduce

Import an image, give incorrect name

rsmontero commented 6 years ago

This issue needs to improve fs_size function (in libfs.sh) to return the message size in a variable so it can be send to oned as part of the response message. Currently is only sent to error stream and so only visible in oned.log.

Command manager expects the error information enclosed in the ERROR_OPEN/CLOSE tags. See GenericCommand::get_error_message in DriverExecHelper