You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/12/03 14:24:39 UTC

[GitHub] [cloudstack] DaanHoogland edited a comment on issue #3191: Copy template between zones fails with md5 mismatch

DaanHoogland edited a comment on issue #3191: Copy template between zones fails with md5 mismatch
URL: https://github.com/apache/cloudstack/issues/3191#issuecomment-561111335
 
 
   here are two different checksums:
   1.     One for the file to be downloaded to compare against its origin
   2.     One for checking internal copying
   In the case of downloading a regular image these are the same, but when downloading some sort of archive, the archive will be unpacked on arrival and the result will not match the initial checksum. The checksum can not be updated as it may be used for a re-download.
   
   the original design has not taken this into account.
   
   I propose to implement the following:
   - create an extra field: 'original_checksum'
   - when the template is to be exposed from a store by copying or downloading, the file is checked against the checksum
   - if it doesn't match and 'original_checksum' is null
   -+ checksum is copied to 'original_checksum' and a new checksum is stored
   - if it doesn't match and checksum is not null
   -+ error
   
   There is a caveat to this, if there is multiple copies around and they don't all have the same checksum..?
   
   Alternative also involves an extra data field but proactively always add an afterdownload checksum (after checksum ok and unpack) to the DB
   the caveat to that one is "When use which?"
   
   @andrijapanicsb any thoughts?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services