./scripts/curtinator: line 132: $3: unbound variable

Bug #1864033 reported by Sean Wheller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtinator
Triaged
Undecided
Taihsiang Ho

Bug Description

curtinator fails to complete. Exits with 'error unbound variable'

Packages installed:
qemu-kvm libvirt-bin virt-viewer genisoimage libguestfs-tools gettext-base ovmf

:~/curtinator$ whoami
sean

:~/curtinator$ groups
sean mail sudo kvm libvirt docker

:~/curtinator$ sudo cat /etc/group | grep libvirt
libvirt:x:129:sean
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:130:

:~/curtinator$ sudo cat /etc/group | grep kvm
kvm:x:127:sean

There is no libvirtd group as per README.

$ uname -a
Linux 4439C45082E6.enbaya.lan 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

:~/curtinator$ bzr update
Tree is up to date at revision 16 of branch /home/sean/curtinator

:~/curtinator$ ls
curtinator-oem data README scripts ubuntu-18.04.4-desktop-amd64.iso

:~/curtinator$ sudo ./scripts/curtinator ubuntu-18.04.4-desktop-amd64.iso
Extracting ubuntu-18.04.4-desktop-amd64.iso to ubuntu-18.04.4-desktop-amd64
Creating ubuntu-18.04.4-desktop-amd64/casper/preseed.cfg
Patching ubuntu-18.04.4-desktop-amd64/casper/initrd with ubuntu-18.04.4-desktop-amd64/casper/preseed.cfg
./scripts/curtinator: line 132: $3: unbound variable
Cleaning environment!

:~/curtinator$ ls
curtinator-oem data README scripts ubuntu-18.04.4-desktop-amd64 ubuntu-18.04.4-desktop-amd64.iso

Revision history for this message
Daniel Manrique (roadmr) wrote :

Curtinator doesn't know about 18.04, this results in this rather obtuse error.

There's a table of known Ubuntu versions around line 169:

function patch_initrd() {
    local distribution=$1; shift
    local initrd=$1; shift
    local files=$@

    local bs=""

    temp=$(mktemp)

    # only needed for 18.10 and beyond
    # the following are also released later than 18.10
    # 14.04.6
    # 18.04.3
    case $distribution in
        14.04.6) bs=1576592;;
        16.04.6) bs=1605632;;
        18.04.3) bs=2441216;;
        18.10) bs=1605632;;
        19.04) bs=2092032;;
    esac

This needs to be augmented with 18.04, but I don't know how to obtain the correct bs value. I think taihsiang would need to determine that.

Changed in curtinator:
status: New → Triaged
assignee: nobody → Taihsiang Ho (taihsiangho)
Revision history for this message
Daniel Manrique (roadmr) wrote :

As a workaround, use 18.04.3, 18.10 or 19.04 :)

Revision history for this message
Sean Wheller (seanwhe) wrote :

@roadmr thanks a million.

I found an 18.04.3 over at http://old-releases.ubuntu.com/releases/18.04.3/

Downloaded and executed successfully. Would be nice to know what the 'bs' is and how to obtain it. Perhaps something for the 'README'.

:~/curtinator$ sudo ./scripts/curtinator ubuntu-18.04.3-desktop-amd64.iso
Extracting ubuntu-18.04.3-desktop-amd64.iso to ubuntu-18.04.3-desktop-amd64
Creating ubuntu-18.04.3-desktop-amd64/casper/preseed.cfg
Patching ubuntu-18.04.3-desktop-amd64/casper/initrd with ubuntu-18.04.3-desktop-amd64/casper/preseed.cfg
16+1 records in
16+1 records out
39566787 bytes (40 MB, 38 MiB) copied, 2.37745 s, 16.6 MB/s
152576+0 records in
152576+0 records out
2441216 bytes (2.4 MB, 2.3 MiB) copied, 0.29024 s, 8.4 MB/s
Creating ubuntu-18.04.3-desktop-amd64/root.qcow2
Creating ubuntu-18.04.3-desktop-amd64/libvirt.xml
Starting domain ubuntu-18.04.3-desktop-amd64
Domain ubuntu-18.04.3-desktop-amd64 defined from ubuntu-18.04.3-desktop-amd64/libvirt.xml

Domain ubuntu-18.04.3-desktop-amd64 started

Installing, run this command for progress:
# virt-viewer ubuntu-18.04.3-desktop-amd64

/home/sean/curtinator
Finished /home/sean/curtinator/ubuntu-18.04.3-desktop-amd64/ubuntu-18.04.3-desktop-amd64.tar.gz
Cleaning environment!

Domain ubuntu-18.04.3-desktop-amd64 has been undefined

:~/curtinator$ ls -lash
total 2.0G
4.0K drwxrwxr-x 7 sean sean 4.0K Feb 20 18:02 .
4.0K drwxr-xr-x 68 sean sean 4.0K Feb 20 17:57 ..
4.0K drwxrwxr-x 6 sean sean 4.0K Feb 19 18:55 .bzr
4.0K drwxrwxr-x 4 sean sean 4.0K Feb 19 18:55 curtinator-oem
4.0K drwxrwxr-x 2 sean sean 4.0K Feb 19 18:55 data
4.0K -rw-rw-r-- 1 sean sean 1.7K Feb 19 18:55 README
4.0K drwxrwxr-x 2 sean sean 4.0K Feb 20 14:35 scripts
4.0K drwxr-xr-x 5 root root 4.0K Feb 20 18:14 ubuntu-18.04.3-desktop-amd64
2.0G -rw-rw-r-- 1 libvirt-qemu kvm 2.0G Aug 5 2019 ubuntu-18.04.3-desktop-amd64.iso

:~/curtinator$ ls -lash ubuntu-18.04.3-desktop-amd64
total 8.3G
4.0K drwxr-xr-x 5 root root 4.0K Feb 20 18:14 .
4.0K drwxrwxr-x 7 sean sean 4.0K Feb 20 18:02 ..
4.0K drwxr-xr-x 2 root root 4.0K Feb 20 18:02 casper
4.0K drwxr-xr-x 2 root root 4.0K Feb 20 18:02 .disk
4.0K -rw-r--r-- 1 root root 820 Feb 20 18:14 libvirt.xml
4.0K drwxr-xr-x 2 root root 4.0K Feb 20 18:02 preseed
6.4G -rw-r--r-- 1 root root 6.4G Feb 20 18:10 root.qcow2
1.9G -rw-r--r-- 1 root root 1.9G Feb 20 18:14 ubuntu-18.04.3-desktop-amd64.tar.gz

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.