Skip to content

Avoid resolving dns aliases in tangohost fqdn expansion

Carlos Pascual requested to merge github/fork/cpascual/fqdn into develop

taurus.core.tango expands the tangohost names using socket.getfqdn() in order to normalize PQDN names into FQDN when generating the model full names. This has the unwanted side-effect that if the host name is defined as an alias in the ressolv chain, the target of the alias is returned. This causes problems with tango events (the DB name in the client does not match that of the DB itself and the events are lost). It can also cause trouble if the expanded model names are stored in some persistent media and the target of the alias is changed in the meanwhile (e.g. if the Tango DB is served from a cloud provider that dynamically changes the actual machine running it).

Fix these issues by replacing socket.getfqdn() by an alternative that behaves like it except in that it honors the aliases.

Merge request reports

Loading