The virtual-images download subcommand fails with RestClient::Exceptions::ReadTimeout: Timed out reading data from server when downloading large virtual images (e.g. multi-GB Windows base templates). The root cause is that:
Morpheus::RestClient.execute applies a 30 second default timeout for all GET requests (lib/morpheus/rest_client.rb line 25)
download_chunked in virtual_images_interface.rb never passes a :timeout option to override this default
- The
download subcommand in virtual_images.rb uses build_common_options(opts, options, [:dry_run, :quiet]) which does not include :options, so the hidden --timeout flag is parsed but never propagated to the HTTP request
Even though setopts(options) is called at line 1031, the download_chunked method constructs its own opts hash directly and never reads the timeout from @options.
Expected Behavior
The --timeout option should be respected by the download command, or download_chunked should use a much longer default timeout (like the upload method does).
Actual Behavior
Error Communicating with the remote appliance.
Timed out reading data from server
RestClient::Exceptions::ReadTimeout: Timed out reading data from server
Environment
- Morpheus CLI version: 8.0.13 (also affects 9.0)
- Ruby: 3.1.2
The
virtual-images downloadsubcommand fails withRestClient::Exceptions::ReadTimeout: Timed out reading data from serverwhen downloading large virtual images (e.g. multi-GB Windows base templates). The root cause is that:Morpheus::RestClient.executeapplies a 30 second default timeout for all GET requests (lib/morpheus/rest_client.rbline 25)download_chunkedinvirtual_images_interface.rbnever passes a:timeoutoption to override this defaultdownloadsubcommand invirtual_images.rbusesbuild_common_options(opts, options, [:dry_run, :quiet])which does not include:options, so the hidden--timeoutflag is parsed but never propagated to the HTTP requestEven though
setopts(options)is called at line 1031, thedownload_chunkedmethod constructs its ownoptshash directly and never reads the timeout from@options.Expected Behavior
The
--timeoutoption should be respected by the download command, ordownload_chunkedshould use a much longer default timeout (like theuploadmethod does).Actual Behavior
Environment