Closed cparjaszewski closed 3 years ago
LXD does not configure your system's DNS to hit LXD's dnsmasq so this can't really be a LXD bug.
I'd recommend asking at https://discuss.linuxcontainers.org instead for such support and integration questions.
I suspect you'll want to at least show your resolved config.
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 213.186.33.99
nameserver 10.181.105.1
nameserver 127.0.0.53
search lxd
@stgraber this issue was reported back is 2018, shame LXD/XLC hasn't resolved it completely: https://github.com/lxc/lxd/issues/4337
@krzysztofp that won't work as you want, because the first IP may give an answer (even a negative one) which will stop the resolver trying the LXD bridge resolver.
Ok, switching the IP addresses helped:
$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 10.181.105.1
nameserver 213.186.33.99
nameserver 127.0.0.53
search lxd
$ host host-name.lxd
host-name.lxd has address 10.181.105.130
host-name.lxd has IPv6 address fd42:ee17:c4f2:d370:216:3eff:fe6e:1d7f
cparjaszewski@skynet:/etc/nginx/sites-enabled$ host host-name
host-name.lxd has address 10.181.105.130
host-name.lxd has IPv6 address fd42:ee17:c4f2:d370:216:3eff:fe6e:1d7f
Thank you @tomponline !
Required information
Issue description
I would like to reach my container by it's name, but when doing host host-name, I'm receiving this error:
Steps to reproduce
Information to attach
$dmesg
lxc info NAME --show-log
)Log:
lxc host-name 20210409105008.153 WARN cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1129 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.monitor.host-name" lxc host-name 20210409105008.220 WARN cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1129 - File exists - Failed to create directory "/sys/fs/cgroup/cpuset//lxc.payload.host-name" lxc host-name 20210409105008.450 WARN cgfsng - cgroups/cgfsng.c:fchowmodat:1550 - No such file or directory - Failed to fchownat(17, memory.oom.group, 1000000000, 0, AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW ) lxc host-name 20210409105008.776 ERROR utils - utils.c:safe_mount_beneath_at:1106 - Function not implemented - Failed to open 30(dev) lxc host-name 20210409105008.104 ERROR utils - utils.c:__safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(full) lxc host-name 20210409105008.104 ERROR utils - utils.c:safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(null) lxc host-name 20210409105008.104 ERROR utils - utils.c:safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(random) lxc host-name 20210409105008.104 ERROR utils - utils.c:__safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(tty) lxc host-name 20210409105008.104 ERROR utils - utils.c:safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(urandom) lxc host-name 20210409105008.104 ERROR utils - utils.c:__safe_mount_beneath_at:1106 - Function not implemented - Failed to open 33(zero)
$ lxc config show host-name --expanded architecture: x86_64 config: image.architecture: amd64 image.description: Ubuntu focal amd64 (20210405_07:42) image.os: Ubuntu image.release: focal image.serial: "20210405_07:42" image.type: squashfs image.variant: default volatile.base_image: 51daf97cdac601892072004b7baa235d69c8bc45284fc4dbef16dff4a6542184 volatile.eth0.host_name: veth72ff7db7 volatile.eth0.hwaddr: 00:16:3e:6e:1d:7f volatile.idmap.base: "0" volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]' volatile.last_state.power: RUNNING volatile.uuid: 39d8189e-0156-48a2-844a-02a415d41c66 devices: eth0: name: eth0 network: lxdbr0 type: nic root: path: / pool: default type: disk ephemeral: false profiles:
/var/log/lxd/lxd.log: No such file or directory
$ sudo cat /var/snap/lxd/common/lxd/logs/lxd.log
$ lxc list
$ lxc monitor