[Bug 2038375] Re: unable to provide autoinstall user-data to jammy-server-live-amd64.iso daily images with cloud-init 23.3.1

Chad Smith 2038375 at bugs.launchpad.net
Tue Oct 3 19:57:17 UTC 2023


** Changed in: cloud-init (Ubuntu)
       Status: New => Triaged

** Changed in: cloud-init (Ubuntu)
   Importance: Undecided => Medium

** Description changed:

  During manual SRU verification of cloud-init 23.3.1 from jammy-proposed
  subiquity is unable to read cloud-init user-data containing autoinstall
  directives due to a traceback while trying to invoke stages.Init() prior
  to reading cloud-init combined user-data.
  
  ### From /var/log/installer/subiquity-server-debug.log
  2023-10-03 17:00:49,502 INFO subiquity:163 Starting Subiquity server revision 5097 of snap /snap/subiquity/5097
  ...
  2023-10-03 17:00:53,165 WARNING cloudinit.sources:1727 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  2023-10-03 17:00:53,166 DEBUG cloudinit.sources:1736 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  Traceback (most recent call last):
    File "/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 1170, in pkl_load
      return pickle.loads(pickle_contents)
  AttributeError: Can't get attribute 'Udhcpc' on <module 'cloudinit.net.dhcp' from '/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/net/dhcp.py'>
  
  This traceback is due to unpickling errors due to an older version of
  cloud-init (23.2.2) installed in the snap being unable to unpickle the
  cached datasource written by the host version of cloud-init (23.3.1) at
  /var/lib/cloud/isntance/obj.pkl.
  
  Because the subiquity snap updates cloud-init at a different pace than
  SRU's of cloud-init into jammy-updates, this issue will show up anytime
  cloud-init SRU's an update to classes or attributes related to the
  cached datasource object.
  
- To avoid this unpickling incompatibility, subiquity has already landed
- an upstream fix[1] to avoid using stages.Init() to read autoinstall
- configuration, but read cloud-init's processed config artifact at
- /run/cloud-init/combined-cloud-config.json.
+ To avoid this unpickling incompatibility, subiquity already landed an
+ upstream fix[1] to avoid using stages.Init() in favor of reading cloud-
+ init's processed config artifact at /run/cloud-init/combined-cloud-
+ config.json to get any `autoinstall` configuration.
  
  ### References:
  1: upstream fix to prefer /run/cloud-init/combined-cloud-config.json over stages.Init()
      https://github.com/canonical/subiquity/commit/751119866
  
  ### Reproducer steps:
  ## to be updated
  
  wget https://cdimage.ubuntu.com/ubuntu-server/jammy/daily-
  live/current/jammy-live-server-amd64.iso
  
  pull-lp-debs cloud-init jammy-updates
  # inject cloud-init from jammy-proposed
  cat > proposed-actions.yaml <<EOF
  - name: setup-rootfs
  - name: cp
    source: /home/csmith/src/subiquity/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
    dest: rootfs/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
  - name: shell
  EOF
  
  git clone git at github.com:mwhudson/livefs-editor.git
  sudo PYTHONPATH=./livefs-editor python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./proposed-jammy-server.iso --actions proposed-actions.yaml
  
  # At the /tmp prompt
  chroot rootfs
  dpkg -i /cloud-init*deb
  exit
  exit
  
  mkdir -p ~/cidata
  cd ~/cidata
  cat > user-data << 'EOF'
  #cloud-config
  autoinstall:
    version: 1
    identity:
      hostname: ubuntu-server
      password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
      username: ubuntu
  EOF
  touch meta-data
  cloud-localds ~/seed.iso user-data meta-data
  truncate -s 10G image.img
  
  $ kvm -name ci-test-kvm-live-server-ephemeral-1 -m 3G -drive
  file=image.img,format=raw,if=virtio -net nic -D qemu.log -net
  user,hostfwd=tcp::2222-:22 -cdrom ./proposed-jammy-server.iso -drive
  file=~/seed.iso,format=raw,if=ide -kernel /tmp/tmp1gro8vnk/vmlinuz
  -initrd /tmp/tmp1gro8vnk/initrd -append console=ttyS0 autoinstall
  -nographic

** Description changed:

  During manual SRU verification of cloud-init 23.3.1 from jammy-proposed
  subiquity is unable to read cloud-init user-data containing autoinstall
  directives due to a traceback while trying to invoke stages.Init() prior
  to reading cloud-init combined user-data.
  
  ### From /var/log/installer/subiquity-server-debug.log
  2023-10-03 17:00:49,502 INFO subiquity:163 Starting Subiquity server revision 5097 of snap /snap/subiquity/5097
  ...
  2023-10-03 17:00:53,165 WARNING cloudinit.sources:1727 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  2023-10-03 17:00:53,166 DEBUG cloudinit.sources:1736 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  Traceback (most recent call last):
    File "/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 1170, in pkl_load
      return pickle.loads(pickle_contents)
  AttributeError: Can't get attribute 'Udhcpc' on <module 'cloudinit.net.dhcp' from '/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/net/dhcp.py'>
  
  This traceback is due to unpickling errors due to an older version of
  cloud-init (23.2.2) installed in the snap being unable to unpickle the
  cached datasource written by the host version of cloud-init (23.3.1) at
  /var/lib/cloud/isntance/obj.pkl.
  
  Because the subiquity snap updates cloud-init at a different pace than
  SRU's of cloud-init into jammy-updates, this issue will show up anytime
  cloud-init SRU's an update to classes or attributes related to the
  cached datasource object.
  
  To avoid this unpickling incompatibility, subiquity already landed an
  upstream fix[1] to avoid using stages.Init() in favor of reading cloud-
  init's processed config artifact at /run/cloud-init/combined-cloud-
  config.json to get any `autoinstall` configuration.
+ 
+ This upstream release is not yet in the stable version of the subiquity
+ snap #5097. And a release is expected in a couple of weeks that will
+ contain this fix.
+ 
  
  ### References:
  1: upstream fix to prefer /run/cloud-init/combined-cloud-config.json over stages.Init()
      https://github.com/canonical/subiquity/commit/751119866
  
  ### Reproducer steps:
  ## to be updated
  
  wget https://cdimage.ubuntu.com/ubuntu-server/jammy/daily-
  live/current/jammy-live-server-amd64.iso
  
  pull-lp-debs cloud-init jammy-updates
  # inject cloud-init from jammy-proposed
  cat > proposed-actions.yaml <<EOF
  - name: setup-rootfs
  - name: cp
    source: /home/csmith/src/subiquity/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
    dest: rootfs/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
  - name: shell
  EOF
  
  git clone git at github.com:mwhudson/livefs-editor.git
  sudo PYTHONPATH=./livefs-editor python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./proposed-jammy-server.iso --actions proposed-actions.yaml
  
  # At the /tmp prompt
  chroot rootfs
  dpkg -i /cloud-init*deb
  exit
  exit
  
  mkdir -p ~/cidata
  cd ~/cidata
  cat > user-data << 'EOF'
  #cloud-config
  autoinstall:
    version: 1
    identity:
      hostname: ubuntu-server
      password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
      username: ubuntu
  EOF
  touch meta-data
  cloud-localds ~/seed.iso user-data meta-data
  truncate -s 10G image.img
  
  $ kvm -name ci-test-kvm-live-server-ephemeral-1 -m 3G -drive
  file=image.img,format=raw,if=virtio -net nic -D qemu.log -net
  user,hostfwd=tcp::2222-:22 -cdrom ./proposed-jammy-server.iso -drive
  file=~/seed.iso,format=raw,if=ide -kernel /tmp/tmp1gro8vnk/vmlinuz
  -initrd /tmp/tmp1gro8vnk/initrd -append console=ttyS0 autoinstall
  -nographic

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

Title:
  unable to provide autoinstall user-data to jammy-server-live-amd64.iso
  daily images with cloud-init 23.3.1

Status in cloud-init package in Ubuntu:
  Triaged
Status in subiquity package in Ubuntu:
  New

Bug description:
  During manual SRU verification of cloud-init 23.3.1 from jammy-
  proposed subiquity is unable to read cloud-init user-data containing
  autoinstall directives due to a traceback while trying to invoke
  stages.Init() prior to reading cloud-init combined user-data.

  ### From /var/log/installer/subiquity-server-debug.log
  2023-10-03 17:00:49,502 INFO subiquity:163 Starting Subiquity server revision 5097 of snap /snap/subiquity/5097
  ...
  2023-10-03 17:00:53,165 WARNING cloudinit.sources:1727 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  2023-10-03 17:00:53,166 DEBUG cloudinit.sources:1736 Failed loading pickled blob from /var/lib/cloud/instance/obj.pkl
  Traceback (most recent call last):
    File "/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 1170, in pkl_load
      return pickle.loads(pickle_contents)
  AttributeError: Can't get attribute 'Udhcpc' on <module 'cloudinit.net.dhcp' from '/snap/subiquity/5097/usr/lib/python3/dist-packages/cloudinit/net/dhcp.py'>

  This traceback is due to unpickling errors due to an older version of
  cloud-init (23.2.2) installed in the snap being unable to unpickle the
  cached datasource written by the host version of cloud-init (23.3.1)
  at /var/lib/cloud/isntance/obj.pkl.

  Because the subiquity snap updates cloud-init at a different pace than
  SRU's of cloud-init into jammy-updates, this issue will show up
  anytime cloud-init SRU's an update to classes or attributes related to
  the cached datasource object.

  To avoid this unpickling incompatibility, subiquity already landed an
  upstream fix[1] to avoid using stages.Init() in favor of reading
  cloud-init's processed config artifact at /run/cloud-init/combined-
  cloud-config.json to get any `autoinstall` configuration.

  This upstream release is not yet in the stable version of the
  subiquity snap #5097. And a release is expected in a couple of weeks
  that will contain this fix.

  ### References:
  1: upstream fix to prefer /run/cloud-init/combined-cloud-config.json over stages.Init()
      https://github.com/canonical/subiquity/commit/751119866

  ### Reproducer steps:
  ## to be updated

  wget https://cdimage.ubuntu.com/ubuntu-server/jammy/daily-
  live/current/jammy-live-server-amd64.iso

  pull-lp-debs cloud-init jammy-proposed
  # inject cloud-init from jammy-proposed
  cat > proposed-actions.yaml <<EOF
  - name: setup-rootfs
  - name: cp
    source: /home/csmith/src/subiquity/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
    dest: rootfs/cloud-init_23.3.1-0ubuntu1~22.04.1_all.deb
  - name: shell
  EOF

  git clone git at github.com:mwhudson/livefs-editor.git
  sudo PYTHONPATH=./livefs-editor python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./proposed-jammy-server.iso --actions proposed-actions.yaml

  # At the /tmp prompt
  chroot rootfs
  dpkg -i /cloud-init*deb
  exit
  exit

  mkdir -p ~/cidata
  cd ~/cidata
  cat > user-data << 'EOF'
  #cloud-config
  autoinstall:
    version: 1
    identity:
      hostname: ubuntu-server
      password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
      username: ubuntu
  EOF
  touch meta-data
  cloud-localds ~/seed.iso user-data meta-data
  truncate -s 10G image.img

  $ kvm -name ci-test-kvm-live-server-ephemeral-1 -m 3G -drive
  file=image.img,format=raw,if=virtio -net nic -D qemu.log -net
  user,hostfwd=tcp::2222-:22 -cdrom ./proposed-jammy-server.iso -drive
  file=~/seed.iso,format=raw,if=ide -kernel /tmp/tmp1gro8vnk/vmlinuz
  -initrd /tmp/tmp1gro8vnk/initrd -append console=ttyS0 autoinstall
  -nographic

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2038375/+subscriptions




More information about the foundations-bugs mailing list