systemd / mkosi

💽 Build Bespoke OS Images
https://mkosi.systemd.io/
1.18k stars 319 forks source link

ubuntu 'artful' fails to install - Temporary failure resolving 'archive.ubuntu.com' #185

Closed NeilW closed 7 years ago

NeilW commented 7 years ago

Building Ubuntu 'artful' on Fedora 26 with

sudo mkosi/mkosi --distribution ubuntu --release artful --output artful.tar.xz --format tar build

builds the debootstrap phase and then fails with

Host and machine ids are equal (1d97ae2831c44890b68ba67e8b283bff): refusing to link journals
Reading package lists... Done
Building dependency tree... Done
The following additional packages will be installed:
  libdbus-1-3 libexpat1
Suggested packages:
  default-dbus-session-bus | dbus-session-bus
The following NEW packages will be installed:
  dbus libdbus-1-3 libexpat1 libpam-systemd
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 492 kB of archives.
After this operation, 1758 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu artful/main amd64 libdbus-1-3 amd64 1.10.22-1ubuntu1
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu artful/main amd64 libexpat1 amd64 2.2.3-1
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu artful/main amd64 dbus amd64 1.10.22-1ubuntu1
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu artful/main amd64 libpam-systemd amd64 234-2ubuntu12
  Temporary failure resolving 'archive.ubuntu.com'
W: Download is performed unsandboxed as root as file '/var/cache/apt/archives/partial/libdbus-1-3_1.10.22-1ubuntu1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/libdbus-1-3_1.10.22-1ubuntu1_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/e/expat/libexpat1_2.2.3-1_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/dbus_1.10.22-1ubuntu1_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_234-2ubuntu12_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
‣ Unmounting Package Cache...
‣ Unmounting Package Cache complete.
Traceback (most recent call last):
  File "mkosi/mkosi", line 3185, in <module>
    main()
  File "mkosi/mkosi", line 3178, in main
    build_stuff(args)
  File "mkosi/mkosi", line 3109, in build_stuff
    raw, tar, root_hash = build_image(args, workspace, run_build_script=False)
  File "mkosi/mkosi", line 2958, in build_image
    install_distribution(args, workspace.name, run_build_script, cached)
  File "mkosi/mkosi", line 1304, in install_distribution
    install[args.distribution](args, workspace, run_build_script)
  File "/usr/lib64/python3.6/contextlib.py", line 53, in inner
    return func(*args, **kwds)
  File "mkosi/mkosi", line 1099, in install_ubuntu
    install_debian_or_ubuntu(args, workspace, run_build_script, args.mirror)
  File "mkosi/mkosi", line 1090, in install_debian_or_ubuntu
    run_workspace_command(args, workspace, network=True, env={'DEBIAN_FRONTEND': 'noninteractive', 'DEBCONF_NONINTERACTIVE_SEEN': 'true'}, *cmdline)
  File "mkosi/mkosi", line 750, in run_workspace_command
    subprocess.run(cmdline, check=True)
  File "/usr/lib64/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['systemd-nspawn', '--quiet', '--directory=/var/tmp/mkosi-qayq_ku8/root', '--uuid=bf56df15f97141618405d697a6bf81a0', '--machine=mkosi-f52bd4340f9b46bd892fa1773ecc96fd', '--as-pid2', '--register=no', '--bind=/var/tmp/mkosi-qayq_ku8/var-tmp:/var/tmp', '--setenv=DEBIAN_FRONTEND=noninteractive', '--setenv=DEBCONF_NONINTERACTIVE_SEEN=true', '--', '/usr/bin/apt-get', '--assume-yes', '--no-install-recommends', 'install', 'dbus', 'libpam-systemd']' returned non-zero exit status 100.

Xenial and Zesty install perfectly fine, and archive.ubuntu.com resolves on the machine

$ ping archive.ubuntu.com
PING archive.ubuntu.com(keeton.canonical.com (2001:67c:1560:8001::14)) 56 data bytes
64 bytes from keeton.canonical.com (2001:67c:1560:8001::14): icmp_seq=1 ttl=51 time=7.18 ms
64 bytes from keeton.canonical.com (2001:67c:1560:8001::14): icmp_seq=2 ttl=51 time=7.28 ms
^C
--- archive.ubuntu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 7.189/7.235/7.282/0.096 ms
lucaswerkmeister commented 7 years ago

Can confirm (Arch host system)… perhaps it’s because of the change from ifupdown to netplan (see release notes), or another change in the network configuration?