From a6c72309bc6354ef4393c0c27c84e49f8958473d Mon Sep 17 00:00:00 2001 From: Andreas Naumann Date: Mon, 23 Oct 2023 16:41:38 +0200 Subject: [PATCH] exporter: Use fqdn instead of hostname only In distributed setups, the coordinator may point to places in different subnets. In order for clients to resolve resources behind the exporter, they need to know its FQDN instead of just the hostname. Thus, set this to be the default. Signed-off-by: Andreas Naumann --- labgrid/remote/exporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labgrid/remote/exporter.py b/labgrid/remote/exporter.py index a30b1afe1..e7fbebe88 100755 --- a/labgrid/remote/exporter.py +++ b/labgrid/remote/exporter.py @@ -914,7 +914,7 @@ def main(): dest='hostname', type=str, default=None, - help='hostname (or IP) published for accessing resources (defaults to the system hostname)' + help='hostname (or IP) published for accessing resources (defaults to the system FQDN)' ) parser.add_argument( '-d', @@ -943,7 +943,7 @@ def main(): extra = { 'name': args.name or gethostname(), - 'hostname': args.hostname or gethostname(), + 'hostname': args.hostname or getfqdn(), 'resources': args.resources, 'isolated': args.isolated }