Actions
action #161327
closedcoordination #155485: [saga][epic] Efficient openQA worker pool resource handling in datacenters
coordination #162041: [epic] Improved worker behaviour
Prevent remote workers registering as "localhost" size:S
Description
Motivation¶
In #160424 we first estimated with quite some effort what could and should be done but in the end the ticket was resolved after "just" setting static hostnames which we AFAIK have not even mentioned as a practice in openQA documentation. Are we ok with that or can we do better?
Acceptance criteria¶
- AC1: Remote worker hosts can only register with a proper hostname and not localhost without needing to hardcode the hostname in workers.ini
- AC2: There is a clear error message with suggestion on invalid remote worker connection attempts as "localhost"
- AC3: It is still possible to register as "localhost", e.g. for single instance container setup, when using the loopback interface
Suggestions¶
- Consider only allowing "localhost" when the connection is using the local loopback interface. Start with extending t/24-worker-webui-connection.t . The according implementation code is likely in lib/OpenQA/Worker/WebUIConnection.pm in the "register" function.
- Provide a useful suggestion in any error message preventing the connection attempt.
- Use the
is_host_local
utility function: https://github.com/os-autoinst/openQA/blob/21904f825ca0a24ecd6499b3d5e7e96710d4858e/lib/OpenQA/Utils.pm#L950
Actions