Fix host values in cta-admin commands
Dev ticket for https://gitlab.cern.ch/cta/operations/-/issues/469
Currently, cta-admin uses the host name present in /etc/cta/cta-cli.conf
. Due to https://gitlab.cern.ch/ai/it-puppet-hostgroup-cta/-/commit/b1f6d5d480591440ceb04e0c10af7598274dfae8 this will be localhost
, which is not useful for debugging, parsing logs, and ends up in the catalogue tables:
[root@ctaproductionfrontend02 ~]# cta-admin ll ls | grep SPC1
SPC1L8 true CASTOR CASTOR 2020-10-02 13:39 vlado eosctafst0203.cern.ch 2021-09-21 15:32 SPECTRALIB1 (Spectra Logic TFinity tape library in B513) - LTO-8 tape drives
SPC1L9 false CASTOR CASTOR 2020-11-30 16:14 vlado localhost 2021-09-21 15:33 SPECTRALIB1 (Spectra Logic TFinity tape library in B513) - LTO-9 tape drives
This should be changed to display the hostname of the frontend the command is executed on (using hostname -s
), instead of the value in the config file.