Containers can't find each other by hostname

Hi

I just setup 2 instances in a cluster on AWS. Ran lxd init and booted up 2 containers.

When I go inside the container test-01 I can ping test-02 by IP but not by hostname.

May I know how to start debugging an issue like this?

+---------+---------+----------------------+------+-----------+-----------+---------------+
|  NAME   |  STATE  |         IPV4         | IPV6 |   TYPE    | SNAPSHOTS |   LOCATION    |
+---------+---------+----------------------+------+-----------+-----------+---------------+
| test-01 | RUNNING | 240.2.158.154 (eth0) |      | CONTAINER | 0         | ubuntu-lxd-01 |
+---------+---------+----------------------+------+-----------+-----------+---------------+
| test-02 | RUNNING | 240.21.8.171 (eth0)  |      | CONTAINER | 0         | ubuntu-lxd-02 |
+---------+---------+----------------------+------+-----------+-----------+---------------+

lxc network info lxdfan0

Name: lxdfan0
MAC address: 00:16:3e:cb:04:9c
MTU: 8951
State: up
Type: broadcast

IP addresses:
  inet	240.21.8.1/8 (global)

Network usage:
  Bytes received: 3.31kB
  Bytes sent: 3.20kB
  Packets received: 54
  Packets sent: 41

Bridge:
  ID: 8000.00163ecb049c
  STP: false
  Forward delay: 1500
  Default VLAN ID: 1
  VLAN filtering: true
  Upper devices: lxdfan0-fan, lxdfan0-mtu, veth0f3d6a69

Apologies. I was too hasty in setting up this thread. After I rebooted the hosts everything is working as expected. I guess on initial setup I just have to remember to reboot the hosts. I probably don’t setup new clusters often enough :smile: