June 7, 2021, 1:45pm
When I want to create a Host via GUI/API I get :
“hostname can contain only lowercase letters, numbers, dashes and dots according to RFC921, RFC952 and RFC1123”
My hostname is: aa.bb-cc.dd-04
I dont know why I get that Error.
Can anyone help me.
I can see it here as a Bug, it should be solved in 2.4.0 but its still there
Foreman and Proxy versions:
Thanks in advance
June 7, 2021, 1:56pm
or when I create it like this: nl.arnhem.xy-z.hostname
I get: must not include periods
June 7, 2021, 2:13pm
Generally the first part before the first dot is the plain hostname and the everything after that is the dotted domain name. So your hostname looks reversed. It should be hostname.xy-z.arnhem.nl. You should create a domain xy-z.arnhem.nl in foreman and then assign it to your new host with name “hostname”.
June 7, 2021, 2:31pm
Thanks for you answer
@gvde , you are right.
But I have many hosts from other technology which I want create the hosts for them in foreman.
The format is like what I send.
And they have different domains that’s the problem. So I cannot cover all of them
But why I cannot create Hostname like what they suggest letter(small), number, dashes and dots.
Thank you again.
June 7, 2021, 2:33pm
You cannot simply use a different fqdn hostname format. It’s defined in the rfcs mentioned. The dot separates the domain part. It’s not part of the hostname itself. It belongs to the fqdn hostname.
June 7, 2021, 2:38pm
it’s possible to have dashes/underscores in the hostname?
In this way I can replace them in my code.
So that will help me a little bit better.
I think you push me in right way
June 7, 2021, 2:41pm
As the error messages and the rfcs say: lowercase letters, numbers, dashes.
June 7, 2021, 2:43pm
So I’ll replace them with dashes that’s Dienst matter for me.
And I can also cut the host- domain name and create the hosts in my code…
Thank you so much