Bug 1574227

Summary: Can't upload image to different datacenter when in another datacenter template already exists
Product: [oVirt] ovirt-ansible-collection Reporter: Petr Kubica <pkubica>
Component: image-templateAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Ravi Nori <rnori>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.1.6CC: mperina, pkubica
Target Milestone: ovirt-4.2.5Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-image-template-1.1.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-31 15:26:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Kubica 2018-05-02 20:33:21 UTC
Description of problem:
Can't upload image to different datacenter when in another datacenter template already exists. Using the same template_name

Version-Release number of selected component (if applicable):
rhv 4.2
oVirt.image-template (1.1.6)
ansible-2.5.1-1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. have environment with two datacenters
2. upload image to first datacenter (specified by cluster in first DC) will work
3. upload image to second datacenter (specified by cluster in second DC) will not work. Role recognizes that template with that name already existing in system

Comment 1 Yaniv Kaul 2018-05-03 06:38:01 UTC
If I were to guess, I'd say the issue is @ https://github.com/oVirt/ovirt-ansible-image-template/blob/master/tasks/qcow2_image.yml#L61

Care to try and send a patch upstream?

Comment 2 Petr Kubica 2018-05-09 15:18:32 UTC
It is not that easy (one line fix)
- error is also in https://github.com/oVirt/ovirt-ansible-image-template/blob/4a41b4a9fa57fe08aede3dcee939d285e3f68c2e/tasks/qcow2_image.yml#L51 while fetching wrong storage domain (from wrong datacenter). It can't be filtered easily by pattern: "cluster={{template_cluster}}" while fetching storage domains because storage domain dictionary doesn't have clusters.

Comment 3 Sandro Bonazzola 2018-07-31 15:26:00 UTC
This bugzilla is included in oVirt 4.2.5 release, published on July 30th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.5 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.