Versions Compared

Key

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

...

  1. key is saved in encrypted form in the configuration tables as hidden configuration with name upload.secret.key
  2. on start of management server, if the key doesnt exist, it generates one using sha1 and stores it in db
  3. when the management server sends StartCommand to SSVM agent, it shares this key with it. 
  4. SSVM agent stores this key in a file at /etc/cloudstack/agent/ms-psk.

one time POST url and parallel uploads

The POST url returned by the management server to upload the file is expected to be used only once. If there is a download in-progress/error/success state for template/volume in the URL and the SSVM agent gets a new request for the same URL, the agent rejects this request saying there is another download in progress (409 conflict).

The limitation here is that if the template/volume sync happened and the template is cleaned, agent would start accepting the url again. This will be fixed later. 

API changes

A new API getUploadParams which takes all the params as the registertemplate/uploadvolume except for URL and  which returns all the required params plus a post URL to be used to uploadVolume/registerTemplate

...