Project

General

Profile

Actions

Feature #32857

open

Create unique database constraint on host name

Added by Lukas Zapletal almost 3 years ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Foreman currently only enforces unique names via Rails validator:

https://github.com/theforeman/foreman/blob/develop/app/models/host/base.rb#L39

There are some cases in concurrent environments where two hosts can be created with the same name. This should be prevented on the database level using a constraint.

Discussion:

https://community.theforeman.org/t/why-dont-we-have-unique-index-on-host-names/24071


Related issues 1 (1 open0 closed)

Related to Foreman - Bug #32832: Host auto provisioning allows an existing host to be inserted againNewActions
Actions #1

Updated by Lukas Zapletal almost 3 years ago

  • Related to Bug #32832: Host auto provisioning allows an existing host to be inserted again added
Actions

Also available in: Atom PDF