instances cannot resolve their own hostname
Bug #1475260 reported by
Martin Pitt
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Unassigned | ||
juju-core (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
cloud instances created by juju are missing their hostname in /etc/hosts. This results in effects like
$ sudo whoami
sudo: unable to resolve host juju-prod-
root
or failure to install packages like ssmtp.
Please add "manage_etc_hosts: true" to the user-data config supplied to the instances. This is a kind of "unbreak my setup" option which you always want when starting instances.
summary: |
- instances don't know their own hostname + instances cannot resolve their own hostname |
tags: | added: lxd |
tags: | removed: lxd |
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 2.0-beta18 |
Changed in juju: | |
milestone: | 2.0-beta18 → 2.0-beta19 |
Changed in juju: | |
milestone: | 2.0-beta19 → 2.0-rc1 |
Changed in juju: | |
assignee: | nobody → Christian Muirhead (2-xtian) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.0-rc1 → 2.0-rc2 |
Changed in juju: | |
milestone: | 2.0-rc2 → none |
Changed in juju: | |
milestone: | none → 2.0.0 |
Changed in juju: | |
milestone: | 2.0-rc3 → 2.0.0 |
Changed in juju: | |
milestone: | 2.0.0 → 2.0.1 |
Changed in juju: | |
milestone: | 2.0.1 → none |
Changed in juju: | |
milestone: | none → 2.1.0 |
status: | In Progress → Triaged |
assignee: | Christian Muirhead (2-xtian) → nobody |
milestone: | 2.1.0 → 2.2.0 |
Changed in juju: | |
milestone: | 2.2-beta1 → 2.2-beta2 |
Changed in juju: | |
milestone: | 2.2-beta2 → 2.2-beta3 |
Changed in juju: | |
milestone: | 2.2-beta3 → 2.2-beta4 |
Changed in juju: | |
milestone: | 2.2-beta4 → 2.2-rc1 |
To post a comment you must log in.
This is still an issue with latest yakkety-proposed juju-2.0 2.0~beta17- 0ubuntu1. 16.10.1.
$ lxc exec juju-68160d-0 -- sh -c 'ping `hostname`'
ping: unknown host juju-68160d-0
This breaks e. g. the standard rabbitmq-server charm:
2016-09-07 20:08:24 INFO config-changed Traceback (most recent call last): juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/config- changed" , line 724, in <module> sys.argv) juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/charmhelp ers/core/ hookenv. py", line 717, in execute hook_name] () juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/rabbit_ utils.py" , line 734, in wrapped_f juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/config- changed" , line 657, in config_changed nodename( ) juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/config- changed" , line 113, in configure_nodename get_local_ nodename( ) juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/rabbit_ utils.py" , line 672, in get_local_nodename ip(unit_ get('private- address' )) juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/charmhelp ers/contrib/ network/ ip.py", line 417, in get_host_ip juju/agents/ unit-rabbitmq- server- 0/charm/ hooks/charmhelp ers/contrib/ network/ ip.py", line 403, in ns_query query(address, rtype) python2. 7/dist- packages/ dns/resolver. py", line 981, in query python2. 7/dist- packages/ dns/resolver. py", line 910, in query NXDOMAIN uniter. operation runhook.go:107 hook "config-changed" failed: exit status 1
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed hooks.execute(
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed self._hooks[
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed f(*args, **kwargs)
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed configure_
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed nodename = rabbit.
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed ip_addr = get_host_
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed ip_addr = ns_query(hostname)
2016-09-07 20:08:24 INFO config-changed File "/var/lib/
2016-09-07 20:08:24 INFO config-changed answers = dns.resolver.
2016-09-07 20:08:24 INFO config-changed File "/usr/lib/
2016-09-07 20:08:24 INFO config-changed raise_on_no_answer, source_port)
2016-09-07 20:08:24 INFO config-changed File "/usr/lib/
2016-09-07 20:08:24 INFO config-changed raise NXDOMAIN
2016-09-07 20:08:24 INFO config-changed dns.resolver.
2016-09-07 20:08:24 ERROR juju.worker.