-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating image on CLI with URL source can throw timeout #6431
Comments
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
…2800) Signed-off-by: Neal Hansen <nhansen@opennebula.io>
I don't think this issue depends on the curl version. The default timeout for all CLI actions is 30 seconds. If you are downloading big image, this can be exceeded. You can increase the timeout by setting ONE_XMLRPC_TIMEOUT environment variable In case of timeout, we may add a warning message, that the download continues in background, similar to showback calculation |
Hi Sir I agree with your proposal. At least, let the user know that the download will continue and the image will be created. |
The timeout occurs during the This error is coming because we are using the A couple of solutions to avoid this error is to lower the version of curl below 7.17.0, or you may need to edit the
|
@onenhansen Hi Sir, thanks for your solution...but this will also sacrifice the possibility of retries for downloads. Is there any other solution in the feature that include |
@Franco-Sparrow It does not remove all the retries, but forces it to retry even on failures where it should not be retrying. In the When curl is piped to a command which stops accepting input it returns the code So, in certain cases, this added up with all the other stuff running to create the image will take up to and over 30 seconds which triggers the timeout on the API. This caused failures where there should not have been any. If you do see failures please send us any errors you encounter so we can improve this further if necessary! If the image you're trying to download is on a server which has many transient errors, then you may want to consider an alternate form of downloading the image and then FTP/SCP upload the image to the frontend in order to add the image via a local path rather than downloading via a URL. |
Thanks @onenhansen, I will keep you updated about this modification. The cluster is on LA with a good DC and internet provider, with no problem to access the internet. In this case, removing these lines should not affect the download of the image via URL. |
Hi @onenhansen This means that if if verlte "7.71.0" "$CURL_VER"; then
RETRY_ARGS+=" --retry-all-errors"
fi In my case I am using Ubuntu 22.04, then curl version is # Returns curl retry options based on its version
function curl_retry_args {
[ "$NO_RETRY" = "yes" ] && return
RETRY_ARGS="--retry 3 --retry-delay 3"
CURL_VER=`curl --version | grep -o 'curl [0-9\.]*' | awk '{print $2}'`
# To retry also on conn-reset-by-peer fresh curl is needed
if verlte "7.71.0" "$CURL_VER"; then
RETRY_ARGS+=" --retry-all-errors"
fi
echo $RETRY_ARGS
} In other words...every time I get this error, my curl command should is using the option **Anyway...your approach solved the issue. By commenting those lines, the issue is gone...the image is created and no error is prompted in the Sunstone. Thanks for your solution Sir :-) ** |
The problem is related with the use of the option
|
@Franco-Sparrow Just for clarity, the line |
Good day @onenhansen Thank for the clarity of the bash logic. As you can see on my previous comment, I tested all three possibilities on ubuntu 22.04 with curl |
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Signed-off-by: Neal Hansen <nhansen@opennebula.io>
Description
When creating a URL-sourced image,
Net::ReadTimeout with #<TCPSocket:(closed)>
may be displayed, but the image will still be created correctly.To Reproduce
Using curl > 7.17.0
Expected behavior
Should output the ID of the created image
Details
Progress Status
Testing - QAThe text was updated successfully, but these errors were encountered: