Project

General

Custom queries

Profile

Actions

Bug #7743

closed

Duplicate OSes can be created

Added by Anonymous over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

As some people in the IRC channel stumbeled upon this, here an issue.
Let's say, there's an OS "Debian 7.6" with all the fields correctly set. I still can create an OS with another name and the same parameters. Some People do this in order to create several variants of e.g. CentOS 6.5 with different provision templates each and run into problems then.


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #12076: Unable to create Mulitple OS with same name, major, minorRejected10/06/2015Actions
Has duplicate Foreman - Bug #6886: User should not be allowed to create OS with same name and versionDuplicate08/01/2014Actions
Actions #2

Updated by Joseph Magen over 10 years ago

There was a recent commit 8b737c9c7648b3726dadb3b2e4708fcb43af02a8 that fixed this.

It was unfortunately hidden within a commit called 'fixes #4386 - gem friendly_id to simplify find by id, name, label, etc'

The was a db migration that added a field called 'title' that must be unique.

Please verify that this is fixed and I (or you) can close this issue.

Actions #4

Updated by Anonymous over 10 years ago

That seems to be something different then... Let's say I have this OS for Debian wheezy:

>> Operatingsystem.find_by_id(13)
  Operatingsystem Load (0.7ms)  SELECT "operatingsystems".* FROM "operatingsystems" WHERE "operatingsystems"."id" = 13 ORDER BY operatingsystems.name LIMIT 1
+----+-------+--------+-------+--------------+--------------+----------------+--------------+--------+-------------+-------------+--------------+--------------+------------+
| id | major | name   | minor | nameindic... | created_at   | updated_at     | release_name | type   | description | hosts_count | hostgroup... | password_... | title      |
+----+-------+--------+-------+--------------+--------------+----------------+--------------+--------+-------------+-------------+--------------+--------------+------------+
| 13 | 7     | Debian | 6     |              | 2014-07-1... | 2014-09-30 ... | wheezy       | Debian | Debian 7.6  | 4           | 0            | MD5          | Debian 7.6 |
+----+-------+--------+-------+--------------+--------------+----------------+--------------+--------+-------------+-------------+--------------+--------------+------------+
1 row in set

I can still create another OS:
+----+-------+--------+-------+--------------+-------------+---------------+--------------+--------+-------------+-------------+--------------+--------------+--------------+
| id | major | name   | minor | nameindic... | created_at  | updated_at    | release_name | type   | description | hosts_count | hostgroup... | password_... | title        |
+----+-------+--------+-------+--------------+-------------+---------------+--------------+--------+-------------+-------------+--------------+--------------+--------------+
| 17 | 7     | Debian | 6     |              | 2014-10-... | 2014-10-01... | wheezy       | Debian | Deb what... | 0           | 0            | MD5          | Deb whatever |
+----+-------+--------+-------+--------------+-------------+---------------+--------------+--------+-------------+-------------+--------------+--------------+--------------+

It's also Debian 7.6 (wheezy).

A guy on IRC had created multiple CentOS 6.5 versions, each with a different name and different Kickstart templates associated. But when the first facts uploads came in, things started to switch around.

Actions #10

Updated by Shlomi Zadok almost 10 years ago

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

Also available in: Atom PDF