Description of problem: In second run of this role, due to this parameter which is set to True by default, when user wants to upload another image, role takes previous uploaded image from /tmp to upload into engine. Version-Release number of selected component (if applicable): oVirt.image-template (1.1.6) ansible-2.5.2-1.el7.noarch How reproducible: always Steps to Reproduce: 1. upload an image (without set image_cache_download) 2. upload different image (without set image_cache_download) Actual results: created template will be from first image and not from second Additional info: - parameter should be set to False - no caching images at all - who wants to upload the same template twice? - comparing specified image (url) and downloaded image by size and other attributes (if match - if it is the same image)
As per whats written in the documentation this is expected behavior: https://github.com/ovirt/ovirt-ansible-image-template So what's actual issue? > - parameter should be set to False Why? I am not against it, if we have strong arguments. > - no caching images at all - who wants to upload the same template twice? more setups for example > - comparing specified image (url) and downloaded image by size and other attributes (if match - if it is the same image) Size isn't reliable parameter for comparison. We should support hash as we do in miq role.
(In reply to Ondra Machacek from comment #1) > As per whats written in the documentation this is expected behavior: > > https://github.com/ovirt/ovirt-ansible-image-template > > So what's actual issue? > yes, but it's expected that cached image is the image which I want to upload to engine. For example: - If I upload an image within 10 days [1]. I will expect that uploaded image will be the image specified by qcow_url and not some random image in /tmp from previous run. - When I upload more images to engine. Cached is true by default but from user perspective it doesn't mean that if file with name 'ovirt_image_data' exists upload that file. I expect: Cache downloaded image for next time (Probably I will use the image again) And in next run: If image specified by url is already cached, don't download the "same" image again and use cached. > > - parameter should be set to False > > Why? I am not against it, if we have strong arguments. > Based on above, but it can be True - but only with caching more images than one - when I will want to upload two different images into multiple setups > > - no caching images at all - who wants to upload the same template twice? > > more setups for example > > > - comparing specified image (url) and downloaded image by size and other attributes (if match - if it is the same image) > > Size isn't reliable parameter for comparison. We should support hash as we > do in miq role. I think it can't be hash, it isn't about checking the image (if image was downloaded correctly) - to compute hash you must download the image first and with caching you want to avoid downloading the image again. I know, on some servers you can find hash of files but it's really small group of servers. so how user could find hash of these files: http://releases.manageiq.org/ http://cloud.centos.org/centos/7/images/ ManageIQ hasn't hashes for all images: https://github.com/ManageIQ/manageiq.org/issues/526 [1] 10 days is defined in /usr/lib/tmpfiles.d/tmp.conf as default for cleaning files in /tmp (10 days only if nobody didn't touch the file)
Verified in ovirt-ansible-image-template-1.1.7-1.el7ev.noarch ansible-2.6.0-0.3.rc3.el7ae.noarch
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.