Bug #7743
closed
Duplicate OSes can be created
Added by Anonymous about 10 years ago.
Updated over 6 years ago.
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.
- Category set to Host creation
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.
- Status changed from New to Feedback
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.
- Status changed from Feedback to New
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1885 added
- Pull request deleted (
)
- Assignee set to Shlomi Zadok
- Has duplicate Bug #6886: User should not be allowed to create OS with same name and version added
- Bugzilla link set to 1120985
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 50
- Related to Bug #12076: Unable to create Mulitple OS with same name, major, minor added
Also available in: Atom
PDF