Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SSVM agent and SSVM apache interaction

The SSVM agent will run nio server and will listen for any connections from Apache web server (using the NioServer utility). It will be using the localhost and port number (come from a configuration - TBD specify details) to listen.

SSVM apache proxies the data from https to http url on localhost:port using ProxyPass.

All the http events and data will be proxied by apache to agent. only SSL validation only happens at apache layer.

Upload lifecycle

Upload failures

The below failures can happen while SSVM agent is receiving the template. When management server polls for the status of the template/volume, if any of these below errors happen, the agent returns appropriate information and management server updates transitions the state accordingly.

  • pre-validation errors (file upload hasn't started yet)
    • SSL handshake failed
    • params validation with PSK failed
    • max file size from the header crossed the limit
  • post validation error 
    • file successfully uploaded
      • file uploaded is not of the type specified (for ex: if the template is said to be of type tar, the actual downloaded file is not if this type)
      • max upload limit crossed
    • partial file upload (http errors can be caught through appropriate event handlers: exception,timeout,closed (http://hc.apache.org/httpcomponents-core-ga/tutorial/html/nio.html))
      • user stopped/canceled the post request before completion
      • uploading the template failed due to a network issue
      • browser request timed out
      • browser crashed
      • SSVM is down/restarted
      • SSVM apache down/restarted
      • secondary storage is not accessible
      • there isn't enough space in secondary storage and hence agent can't write to it

Upload

...

success

The process is considered success If the volume/template upload is successfully completed completes (and installed in case of template) within the polling timeout. In this case agent returns a success status to management server during the status pollpolling.

State machine 

Template/Volume go through below state machine state transitions, when it goes through the browser based upload.

...

NOT_UPLOADED: getUploadParams API was successful and the template is registered. But, upload hasn't started yet (agent has no data about this upload)

UPLOAD_IN_PROGRESS: User has initiated the POST request on SSVM Apache and the validation/upload is in progress

UPLOADED: SSVM agent successfully copied the template/volume to secondary storage

UPLOAD_ERROR: Any failure in between user initiating the POST request and template being downloaded OR failure to complete within configured timeout

ABANDONED: the POST request isn't called in the stipulated time (check sequence diagram point 4)initiated within the configured timeout. In this case the SSVM agent has not no record of the upload (TBD: Do we really need to distinguish ERROR and ABANDONED?)

...

  • Transition5: The POST request hasn't been initiated and the timeout has reached

Cleanup

A GC cleanup thread will be running at regular intervals (configurable, provide details). It will pick up all volume/template with upload state as "UPLOAD_ERROR" and "ABANDONED" and send agent command to cleanup any partial data from secondary store. The cleanup will be a best-effort approach.

Recovery mechanisms

There isn't any recovery or retry mechanism as this is a POST request. Once error happens , user gets notified with a clear error message as part of the response. The template/volume will remain in the error state and admin will be able to troubleshoot it based on the appropriate log messages in management server log, agent log, apache access/error log files. This failed entries will eventually get be cleaned by the garbage collector eventuallycleanup process. The user has to reinitiate the upload by calling getUploadParams API again.

One time POST url and parallel uploads

...