Public bug reported:

I'm seeing very slow 'sudo' times in a qemu guest when the host uses 
systemd-resolved.
If I change /etc/resolv.conf on the host to point directly to a dns server 
(8.8.8.8) then the problem goes away.


To recreate, you can download a cloud image and boot it under qemu with a 
command line like:
  cloud-localds seed.img user-data meta-data 
  qemu-system-x86_64 -enable-kvm \
     -device virtio-net-pci,netdev=net00 \
     -netdev type=user,id=net00 \
     -drive file=root.img,id=disk00,if=none,index=0 \
     -device virtio-blk,drive=disk00,serial=root.img \
     -drive file=seed.img,id=disk01,if=none,index=1 \
     -device virtio-blk,drive=disk01,serial=seed.img \
     -m 768

Make sure that your hostname does not resolve (change it to 'bogus-host1').
Log into the guest and then just try sudo, you'll see something like:
# time sudo ls
sudo: unable to resolve host rooturl-trusty

real    0m10.029s
user    0m0.006s
sys     0m0.011s

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1730744

Title:
  sudo is slow (10 seconds) when hostname is not resolvable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1730744/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to