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/13 07:42:02 UTC

[GitHub] [cloudstack] shwstppr commented on issue #3383: [WIP DO NOT MERGE] template: copy md5 mismatch

shwstppr commented on issue #3383: [WIP DO NOT MERGE] template: copy md5 mismatch
URL: https://github.com/apache/cloudstack/pull/3383#issuecomment-565336917
 
 
   I'm not sure if adding checksum parameter would add any functionality to the user or solve the problem here. As mentioned above copy and create template same code for downloading and checking checksum. For correctly checking checksum while copying a template code should compare the checksum of the copied file and the installed template file and not the checksum of copied file with the original checksum of the template.
   Adding a checksum parameter, I'm not sure if user will ever input the checksum of template's installed file. And if user inputs original checksum of template copy will fail. Making it irrelevant IMO.
   We should rather refactor underlying code (https://github.com/apache/cloudstack/blob/master/engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/TemplateServiceImpl.java#L1026-L1075) to pass checksum string for the installed template file, adding a flag in DownloadCmd and DownloadAnswer classes to identify if we are copying so it doesn't change checksum value in DB later(https://github.com/apache/cloudstack/blob/master/engine/storage/src/main/java/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java#L247), after successful completion.
   I'll try to do it over the weekend. Will update if I'm not able to.
   cc @DaanHoogland 

----------------------------------------------------------------
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