Need a consistent means to know the hostname of a machine
Bug #1918204 reported by
Xav Paice
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Achilleas Anagnostopoulos |
Bug Description
Currently various providers list the dns-name, and instance-id, for machines but oftentimes the cloud provider doesn't provide the hostname, so in dns-name we see an IP address and in instance-id we might see an instance uuid. We do have occasions when it's necessary to know the actual hostname of a machine, outside the times we can run code on the unit itself or via ssh.
It would be good to include in machine data a 'hostname' field that is populated by the machine agent, to read whatever is returned by a command like 'hostname', or os.Hostname().
Changed in juju: | |
milestone: | none → 2.8.10 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in juju: | |
assignee: | nobody → Achilleas Anagnostopoulos (achilleasa) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Example output from an openstack provider machine:
$ juju show-machine 0 --format yaml 396d-436b- 90f2-4134d49d58 d4 n-status: interfaces:
ip-addresses:
mac-address: fa:16:3e:cd:4c:af
ip-addresses:
mac-address: 06:b8:17:f1:57:98 zone=nova
model: hacluster
machines:
"0":
juju-status:
current: started
since: 09 Mar 2021 10:07:25+13:00
version: 2.9-beta1
dns-name: 10.5.0.16
ip-addresses:
- 10.5.0.16
- 252.0.16.1
instance-id: 36364855-
machine-status:
current: running
message: ACTIVE
since: 09 Mar 2021 10:06:34+13:00
modificatio
current: idle
since: 09 Mar 2021 10:05:47+13:00
series: xenial
network-
ens3:
- 10.5.0.16
gateway: 10.5.0.1
space: alpha
is-up: true
fan-252:
- 252.0.16.1
space: alpha
is-up: true
hardware: arch=amd64 cores=1 mem=2048M root-disk=20480M availability-
Compared to Maas output: n-status: interfaces:
ip-addresses:
mac-address: e4:43:4b:f6:58:f8
ip-addresses:
mac-address: e4:43:4b:f6:58:fc zone=default
machines:
"60":
juju-status:
current: started
since: 02 Feb 2021 21:11:48Z
version: 2.8.7
dns-name: 1.2.3.4
ip-addresses:
- 1.2.3.4
- 192.168.1.2
instance-id: whpchd
display-name: host1
machine-status:
current: running
message: Deployed
since: 24 Dec 2020 20:36:51Z
modificatio
current: idle
since: 24 Dec 2020 20:24:19Z
series: xenial
network-
bond0.120:
- 192.168.1.2
space: space-2
is-up: true
eno3:
- 1.2.3.4
gateway: 1.2.3.1
space: space-0
is-up: true
constraints: tags=compute
hardware: arch=amd64 cores=104 mem=589824M tags=294254-compute availability-