The server installer double or triple fetches source ISO file

Bug #1970595 reported by Robert Socha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello, hello,

I'm not sure if this is bug or expected behavior but here we go.

I was doing server reinstall from already installed linux OS via grub bootstraping (to continue installation via SSH due to lacking access to the server's physical console). I noticed that ISO file pointed by url bootoption is fetched three times by Ubuntu installer. I did some checking and this is my observation.

ISO file: ubuntu-22.04-live-server-amd64.iso
(SHA256: 84aeaf7823c8c61baa0ae862d0a06b03409394800000b3235854a6b38eb4856f)

IP used:
100.64.241.175 / local-install.vm - http server providing ISO and {meta,user}-data files
100.64.100.100 - static IP for reinstalled server
100.64.0.1 - default gw
100.64.255.255 - DNS resolver

I tested two cases. One with DNS support and second one without DNS resolver in place.

My grub.cfg looks like that:

menuentry 'Install with DNS support' {
  load_video
  gfxmode text
  insmod gzio
  insmod part_msdos
  insmod part_gpt
  insmod lvm
  insmod diskfilter
  insmod mdraid1x
  insmod ext2
  insmod xfs
  search --no-floppy --fs-uuid --set=root 2559c296-413a-4f82-9882-de741aca022f
  linux /boot/reinstall/vmlinuz root=/dev/ram0 ramdisk_size=1500000 ip=100.64.100.100::100.64.0.1:255.255.0.0::enp1s0:static:100.64.255.254 url=http://local-install.vm/ubuntu-22.04-live-server-amd64.iso ds="nocloud-net;s=http://local-install.vm/"
  initrd /boot/reinstall/initrd
}

menuentry 'Install without DNS support' {
  load_video
  gfxmode text
  insmod gzio
  insmod part_msdos
  insmod part_gpt
  insmod lvm
  insmod diskfilter
  insmod mdraid1x
  insmod ext2
  insmod xfs
  search --no-floppy --fs-uuid --set=root 2559c296-413a-4f82-9882-de741aca022f
  linux /boot/reinstall/vmlinuz root=/dev/ram0 ramdisk_size=1500000 ip=100.64.100.100::100.64.0.1:255.255.0.0::enp1s0:static url=http://100.64.241.175/ubuntu-22.04-live-server-amd64.iso ds="nocloud-net;s=http://100.64.241.175/"
  initrd /boot/reinstall/initrd
}

user-data file:
#cloud-config
chpasswd:
  expire: false
  list:
    - installer:ubuntu-installer-22.04

meta-data is empty.

When running from 'Install with DNS support' http server logs shows:

local-install.vm 100.64.100.100 - - [27/Apr/2022:11:09:10 +0200] "GET /ubuntu-22.04-live-server-amd64.iso HTTP/1.1" 200 1466714112 "-" "Wget"
local-install.vm 100.64.100.100 - - [27/Apr/2022:11:09:18 +0200] "GET /ubuntu-22.04-live-server-amd64.iso HTTP/1.1" 200 1466714112 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"
local-install.vm 100.64.100.100 - - [27/Apr/2022:11:09:18 +0200] "GET /meta-data HTTP/1.1" 200 0 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"
local-install.vm 100.64.100.100 - - [27/Apr/2022:11:09:19 +0200] "GET /user-data HTTP/1.1" 200 87 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"

ubuntu-22.04-live-server-amd64.iso is fetched twice. Once by wget (casper phase?) and secound one by cloud-init.

But when running from 'Install without DNS support' I got this in the logs:

100.64.241.175 100.64.100.100 - - [27/Apr/2022:11:13:26 +0200] "GET /ubuntu-22.04-live-server-amd64.iso HTTP/1.1" 200 1466714112 "-" "Wget"
100.64.241.175 100.64.100.100 - - [27/Apr/2022:11:13:33 +0200] "GET /ubuntu-22.04-live-server-amd64.iso HTTP/1.1" 200 1466714112 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"
100.64.241.175 100.64.100.100 - - [27/Apr/2022:11:13:36 +0200] "GET /ubuntu-22.04-live-server-amd64.iso HTTP/1.1" 200 1466714112 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"
100.64.241.175 100.64.100.100 - - [27/Apr/2022:11:13:37 +0200] "GET /meta-data HTTP/1.1" 200 0 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"
100.64.241.175 100.64.100.100 - - [27/Apr/2022:11:13:37 +0200] "GET /user-data HTTP/1.1" 200 87 "-" "Cloud-Init/22.1-14-g2e17a0d6-0ubuntu1~22.04.5"

ubuntu-22.04-live-server-amd64.iso is fetched tree times (once by wget, and two times by cloud-init).

I additonaly checked this with ubuntu-20.04.3-live-server-amd64.iso (f8e3086f3cea0fb3fefb29937ab5ed9d19e767079633960ccb50e76153effc98) and results are the same.

It's not big problem in LAN - but this is slow for insalling from remote (Internet) location.

Best regards

Tags: jammy
Paul White (paulw2u)
affects: ubuntu → subiquity (Ubuntu)
tags: added: jammy
Robert Socha (rjsocha)
description: updated
Revision history for this message
Dan Bungert (dbungert) wrote :

Thanks for the report, and thanks as well for the detailed analysis.
I believe this issue to be a duplicate of https://bugs.launchpad.net/cloud-init/+bug/1937319, so I think we should merge these.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.