apache / apache/infrastructure-loggy
who_am_i may not always return the FQDN
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/apache/infrastructure-loggy/blob/5d4029a967992615d823ed4a6841ce6fb6832202/loggy.py#L82
has some issues:
- it assumes that socket.gethostname() returns the short hostname, however that is not guaranteed, it may return the FQDN
- if local_hostname does not match the start of any of the canonical names, it picks the first, which may not be the best
- it does not check that the result is a possible FQDN
If local_hostname looks like a FQDN it should probably return that without comparing against the canonical names (which it probably won't match anyway).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.