ansible/awx
View on GitHubHostnames in dev environment fail validator, makes no-op PATCH error
Open
#13292 opened on Dec 6, 2022
component:apihelp wanted
Description
ISSUE TYPE
- Bug, Docs Fix or other nominal change
COMPONENT NAME
- API
SUMMARY
A new Instance hostname validator fails with the basic docker development environment.
Also, we seem to validate the field even when it's not changing, which makes it hard to do other things in the API.
ENVIRONMENT
- AWX install method: developer environment
STEPS TO REPRODUCE
Start the docker-compose development environment with 1 hybrid instance.
PATCH with default data
https://localhost:8043/api/v2/instances/1/
EXPECTED RESULTS
A 200 response code.
ACTUAL RESULTS
A 400 response code with
{
"hostname": [
"illegal characters detected in hostname=awx_1. Please verify."
]
}
ADDITIONAL INFORMATION
It seems questionable that we allow registration with a hostname that would fail validation?
Provided that we don't want to fix that, then we must assume that we have invalid hostnames in all cases, and it would be nice to only validate when it is changing.