Bug #6687
open
Subdomains in Foreman doesn't work
Added by Jon Skarpeteig over 10 years ago.
Updated over 8 years ago.
Description
Example domains:
domain.com
sub.domain.com
sub.domain2.com
When editing a host I've seen the following behavior:
Create: Name = hostname / Domain = sub.domain.com
Edit: Name = hostname.sub / Domain=domain.com
Edit: Name = hostname / Domain=sub.domain2.com
Custom override params disappears in between edits
Save fails saying ip address already in use
End result: fubared host.
Another effect related to this:
Warning!
Validation failed: Match fqdn=hostname.domain.com does not match an existing host
If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
ActiveRecord::RecordInvalid
Validation failed: Match fqdn=adam.cisco.com does not match an existing host
app/models/concerns/host_common.rb:46:in `block in lookup_values_attributes='
app/models/concerns/host_common.rb:39:in `each_value'
app/models/concerns/host_common.rb:39:in `lookup_values_attributes='
app/controllers/hosts_controller.rb:113:in `block in update'
app/models/taxonomy.rb:41:in `block in no_taxonomy_scope'
app/models/taxonomy.rb:48:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:143:in `as_location'
app/models/taxonomy.rb:47:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:108:in `as_org'
app/models/taxonomy.rb:46:in `as_taxonomy'
app/models/taxonomy.rb:40:in `no_taxonomy_scope'
app/controllers/hosts_controller.rb:105:in `update'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
- Project changed from Plugins to Foreman
- Category set to Host creation
- Assignee set to Shlomi Zadok
- Status changed from New to Need more information
Hi Jon,
I am trying to reproduce this issue and I would love to get some more details.
Currently when I am changing the domain / sub-domain - I am only getting a message to acknowledge the IP change (DHCP record already exists... - with option to override)
I'm seeing that the name field is changing it's value from creation time, and the same for the domain dropdown.
Also, the IP should be constant in between edits (no need to overwrite with the same value)
Another related issue:
Changing the domain of an existing host results in:
xx has already been taken
This makes it impossible to save the node.
In 1.8.2 this has yet another side effect, causing node parameters to be blanked out
When creating a new host: host.domain.tld the name is actually set to: host.sub.domain.tld
I have both domain.tld and sub.domain.tld present.
root@foreman:~# sudo u puppet /etc/puppet/node.rb host.*domain.tld*
--
classes: {}
parameters:
puppetmaster: foreman
domainname: ''
root_pw:
foreman_env: production
ip:
mac:
foreman_subnets: []
foreman_interfaces:
- mac:
ip:
type: Interface
name: host.*sub.domain.tld*
attrs: {}
virtual: false
link: true
identifier:
managed: true
primary: true
provision: true
subnet:
environment: production
I am also unable to edit this host, as GUI reports: "name is already in use" when attempting to submit any changes
- Status changed from Need more information to New
- Assignee deleted (
Shlomi Zadok)
- Related to Bug #12083: Domain matching isn't specific enough added
Also available in: Atom
PDF