Bug #21926
closedCompute-resource image creation allows duplicate name
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1517092
Description of problem: Satellite allows to create compute-resource image with same name.
hammer> compute-resource image list --compute-resource 'rhev_compute'
---|--------|------------------|----------|-------------------------------------
ID | NAME | OPERATING SYSTEM | USERNAME | UUID
---|--------|------------------|----------|-------------------------------------
20 | latest | RedHat 7.3 | root | 09b7babe-4514-4585-9dcc-fbfef071256d
21 | latest | RedHat 7.3 | root | 79ef62d4-1d04-44e0-9e3d-2223529b0253
---|--------|------------------|----------|-------------------------------------
This can be problematic, If there are multiple images with same name. Commands to list info shows Error: found more than one image
hammer> compute-resource image info --compute-resource 'rhev_compute' --name latest --operatingsystem-id 6
Error: found more than one image
Version-Release number of selected component (if applicable): Satellite 6.3 snap 25
How reproducible: always
Steps to Reproduce:
1. compute-resource image create --compute-resource rhev_compute --name 'latest' --username 'root' --password 'password' --architecture 'x86_64' --operatingsystem 'RedHat 7.3' --uuid '<uuid>'
2. compute-resource image create --compute-resource rhev_compute --name 'latest' --username 'root' --password 'password' --architecture 'x86_64' --operatingsystem 'RedHat 7.3' --uuid '<uuid_changed>'
Actual results:
Allows to create compute-resource image with duplicate names.
Expected results:
It should validate and no duplicate/same name images creation should allow.
Additional info: This can be reproduced on WebUI as well.
Updated by Tomer Brisker about 7 years ago
- Blocks Refactor #21639: unique constraints should be enforced in the DB as well added
Updated by The Foreman Bot about 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5081 added
Updated by Tomer Brisker about 7 years ago
- Subject changed from Compute-resource image creation allows duplicate name to Compute-resource image creation allows duplicate name
- Assignee changed from Chris Roberts to Tomer Brisker
Updated by Marek Hulán almost 7 years ago
- Translation missing: en.field_release set to 330
Updated by Anonymous almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset a186f43bc5aa61bddc3667763afee036f90d9ad0.