Skip to content

virtual-images download command times out on large images (30s hardcoded timeout not overridable) #72

Description

@gidad

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:

  1. Morpheus::RestClient.execute applies a 30 second default timeout for all GET requests (lib/morpheus/rest_client.rb line 25)
  2. download_chunked in virtual_images_interface.rb never passes a :timeout option to override this default
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions