Bug #7743
closedDuplicate OSes can be created
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.
Updated by Joseph Magen about 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.
Updated by Anonymous about 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.
Updated by The Foreman Bot almost 10 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1885 added
- Pull request deleted (
)
Updated by Dominic Cleal almost 10 years ago
- Has duplicate Bug #6886: User should not be allowed to create OS with same name and version added
Updated by Shlomi Zadok over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 59b230959ab24b3573eb87616805bf3218a2cb13.
Updated by Dominic Cleal over 9 years ago
- Translation missing: en.field_release set to 50
Updated by Dominic Cleal about 9 years ago
- Related to Bug #12076: Unable to create Mulitple OS with same name, major, minor added