"Temporary failure in name resolution" when pinging container with uppercase name

I have 3 containers (t1, t2 and tC) in the same ovn network. They can ping each other, except tC for some reason. Looks like having uppercase letters in the name causes problems. Following are the commands I used to create this setup:

apt-get update
apt-get -y install thin-provisioning-tools ovn-central ovn-host

snap switch --channel=5.4/stable lxd
snap refresh lxd

cat <<EOF | lxd init --preseed
config: {}
networks: []
- config:
    size: 5GB
  description: ""
  name: default
  driver: zfs
- config: {}
  description: ""
      path: /
      pool: default
      type: disk
  name: default
projects: []
cluster: null

systemctl stop ovn-central
while pgrep ovn-ctl; do sleep 1; done
LOCAL=$(hostname -I | cut -f1 -d' ')
echo "OVN_CTL_OPTS=--db-nb-addr=$LOCAL \
	--db-sb-addr=$LOCAL \
	--db-nb-cluster-local-addr=$LOCAL \
	--db-sb-cluster-local-addr=$LOCAL \
	--db-nb-create-insecure-remote=yes \
	--db-sb-create-insecure-remote=yes \
	--ovn-northd-nb-db=tcp:$LOCAL:6641 \
	--ovn-northd-sb-db=tcp:$LOCAL:6642" > /etc/default/ovn-central
rm -rvf /var/lib/ovn
systemctl start ovn-central
ovs-vsctl set open_vswitch . \
	external_ids:ovn-encap-type=geneve \
	external_ids:ovn-remote="unix:/var/run/ovn/ovnsb_db.sock" \
lxc config set network.ovn.northbound_connection="tcp:$LOCAL:6641"
lxc network create b-uplink \
	ipv4.address= \
	ipv4.nat=true \
	ipv4.dhcp.ranges= \
	ipv4.ovn.ranges= \
lxc network create test --type=ovn network=b-uplink ipv4.address= ipv4.nat=true ipv6.address=none
lxc launch ubuntu: t1 --network test
lxc launch ubuntu: t2 --network test
lxc launch ubuntu: tC --network test

I’ve reproduced the issue and fixed it here:

1 Like