Description of problem: Trying to create new Pool based on a Template with at least two disks from the same Data Domain (same Target) and checking the 'Auto select target' check box (in 'Resource Allocation' side tab), causes the whole pool creation to fail with the following error: ERROR [org.ovirt.engine.core.bll.AddVmPoolCommand] (default task-61) [2cc7a883-e071-4198-98af-868344152e44] Error during ValidateFailure.: java.lang.IllegalStateException: Duplicate key StorageDomain Version-Release number of selected component (if applicable): 4.2 master How reproducible: 100% Steps to Reproduce: 1.Open a new Pool dialog 2.Select a Template with at least two disks from the same Data Domain (Target). 3. Go to 'Resource Allocation' side tab and check the 'Auto select target' check box. Actual results: The Pool creation fails. Expected results: Pool creation should succeed. Additional info: This bug is because of invalid using of Java Streams in ImagesHandler (done as part of a re-factoring patch in 6/6/17): stream().collect(Collectors.toMap(<non unique/distinct keys list>, values)) - it was assumed it will take the last key in the stream, but instead it fails the whole state with "Duplicate key" error.
I have a patch ready for master branch for fixing this bug
patch seems to be trivial - targeting 4.1.6
Tomas, can we set Target Milestone to 4.1.5 (since a patch for master was merged already)?
This bug was caused due to a re-factoring patch - commit number: a6d29adf20b905. Since this re-factoring patch was not back-ported to 4.1, the problem is not reproduced on 4.1.z and therefor this bug can me marked as MODIFIED without the need to back-port. So changing status to MODIFIED.
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason: [No relevant external trackers attached] For more info please contact: infra
Verification builds: ovirt-engine-4.1.5.2-0.1.el7 libvirt-client-3.2.0-14.el7_4.2.x86_64 vdsm-4.19.28-1.el7ev.x86_64 qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64 sanlock-3.5.0-1.el7.x86_64