Inconsistent Down-casing causes host page to 404
When adding a client to Foreman that has a mixed case hostname (HostName.localdomain), the host details page for this client would display a 404 error. The debug logs showed this when trying to load the host details page:
even though the reports log worked as expected:
gwmngilfen on #theforeman walked me through all the above troubleshooting and narrowed the issue down to the following line of code:
I commented out that line of code, restarted the foreman and it began to work as expected.
Thanks to gwmngilfen for all the help on this!
#1 Updated by Greg Sutcliffe over 6 years ago
- Assignee set to Greg Sutcliffe
- Priority changed from High to Normal
For clarity, this issue seems to be that the validations are not applied to hosts created via fact upload - UI-created hosts cannot have uppercase characters in, but fact-created ones can.
We should probably apply the same validations to both creation types, and add a test to ensure it.