Project

General

Profile

Actions

Bug #7743

closed

Duplicate OSes can be created

Added by Anonymous over 9 years ago. Updated over 5 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 #1

Updated by Dominic Cleal over 9 years ago

  • Category set to Host creation
Actions #2

Updated by Joseph Magen over 9 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 #3

Updated by Dominic Cleal over 9 years ago

  • Status changed from New to Feedback
Actions #4

Updated by Anonymous over 9 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 #5

Updated by Dominic Cleal over 9 years ago

  • Status changed from Feedback to New
Actions #6

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1885 added
  • Pull request deleted ()
Actions #7

Updated by Shlomi Zadok over 9 years ago

  • Assignee set to Shlomi Zadok
Actions #8

Updated by Dominic Cleal over 9 years ago

  • Has duplicate Bug #6886: User should not be allowed to create OS with same name and version added
Actions #9

Updated by Dominic Cleal over 9 years ago

  • Bugzilla link set to 1120985
Actions #10

Updated by Shlomi Zadok almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

  • translation missing: en.field_release set to 50
Actions #12

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #12076: Unable to create Mulitple OS with same name, major, minor added
Actions

Also available in: Atom PDF