subiquity install is calling DHCP twice on default interface

Bug #2045310 reported by richard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

I am provisioning an Ubuntu 20.04 template in vSphere using Packer and passing in my network config using http/user-data, which subiquity finds and processes. The first IP that get assigned to the server is reported back to packer, which waits for it to come available via ssh.

Subsequently, the 00-installer-config.yaml under /etc/netplan gets installed and appears to be re-read, as the ipv4 address on the default network (ens192) is re-assigned a different IP.

Due to the above Packer fails as access to the original IP times out. How can I set my DHCP address once only using subiquity during this provisioning process? Note the issue is intermittent, but appears to be fully congtrolled by subiquity.

Ultimately this VM is converted back into a template and distributed via our vSphere catalog.

The /etc/netplan/00-installer-config.yaml file is here:
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens192:
      dhcp4: true
      dhcp6: false
      nameservers:
        addresses:
        - 10.250.0.33
        search:
        - example.net
  version: 2

A full sample packer http/user-data file is here:
#cloud-config
autoinstall:
  apt:
    geoip: true
    preserve_sources_list: false
    primary:
    - arches: [default]
      uri: http://ports.ubuntu.com/ubuntu-ports
    - arches: [amd64, i386]
      uri: http://archive.ubuntu.com/ubuntu
  identity: {hostname: ubuntu-server, password: $6$or...obfuscated,
    realname: installer, username: installer}
  keyboard: {layout: us, toggle: null, variant: ''}
  locale: en_US
  network:
    ethernets:
      ens192:
        dhcp4: yes
        dhcp6: no
        nameservers:
          search:
            - example.net
          addresses:
            - 10.250.0.33
    version: 2
  packages:
    - open-vm-tools
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  early-commands:
    - echo "Early commands"
  late-commands:
    - curl -o /target/etc/sudoers.d/55-installer http://10.20.30.40/preseed/55-installer
    - chmod 0440 /target/etc/sudoers.d/55-installer
    - echo "Done with late commands"
  write_files:
    # setup installer sudo
    - path: /target/etc/sudoers.d/81-installer
      content: |
        Defaults:installer !requiretty
        installer ALL=(ALL) NOPASSWD: ALL
      owner: root:root
      permissions: "0440"
  version: 1

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.