Project

General

Profile

Actions

Bug #21926

closed

Compute-resource image creation allows duplicate name

Added by Marek Hulán over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
VM management
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Blocks Foreman - Refactor #21639: unique constraints should be enforced in the DB as wellResolvedActions
Actions #1

Updated by Tomer Brisker over 6 years ago

  • Blocks Refactor #21639: unique constraints should be enforced in the DB as well added
Actions #2

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5081 added
Actions #3

Updated by Tomer Brisker over 6 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
Actions #4

Updated by Marek Hulán over 6 years ago

  • Translation missing: en.field_release set to 330
Actions #5

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF