Missing variable for puppet:aio

Bug #1992835 reported by Hadmut Danisch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Chad Smith

Bug Description

Hi,

I'm currently testing autoconfiguration in LXD with cloud-init user-data set through LXD profiles. Both the host and the guest run Ubuntu 22.04.

In user-data:

puppet:
  exec: false
  start_service: false
  install_type: aio

fails with error message

18:49:44 +0200 INFO: Version parameter not defined and no agent detected. Assuming latest.
18:49:44 +0200 INFO: Downloading Puppet latest for Ubuntu...
18:49:44 +0200 INFO: Ubuntu platform! Lets get you a DEB...
18:49:44 +0200 INFO: Downloading http://apt.puppet.com/puppet-release-.deb
18:49:44 +0200 INFO: to file /tmp/install.sh.1639.62290/puppet-release-.deb
18:49:44 +0200 INFO: Trying wget...
18:49:44 +0200 INFO: Retrying... [1/5]
18:49:44 +0200 INFO: Return code: 8
18:49:45 +0200 INFO: Retrying... [2/5]
18:49:45 +0200 INFO: Return code: 8
18:49:46 +0200 INFO: Retrying... [3/5]
18:49:46 +0200 INFO: Return code: 8
18:49:47 +0200 INFO: Retrying... [4/5]
18:49:48 +0200 INFO: Return code: 8
18:49:49 +0200 INFO: Retrying... [5/5]
18:49:49 +0200 INFO: Return code: 8
18:49:50 +0200 CRIT: ERROR 404
18:49:50 +0200 CRIT: Unable to retrieve a valid package!

so it tries to download

http://apt.puppet.com/puppet-release-.deb

where obviously the release name is missing, because the correct path is

http://apt.puppet.com/puppet-release-jammy.deb

regards

Revision history for this message
Brett Holman (holmanb) wrote :

Confirmed locally:

15:41:51 +0000 INFO: Version parameter not defined and no agent detected. Assuming latest.
15:41:51 +0000 INFO: Downloading Puppet latest for Ubuntu...
15:41:51 +0000 INFO: Ubuntu platform! Lets get you a DEB...
15:41:51 +0000 INFO: Downloading http://apt.puppet.com/puppet-release-.deb
15:41:51 +0000 INFO: to file /tmp/install.sh.859.56092/puppet-release-.deb
15:41:51 +0000 INFO: Trying wget...
15:41:51 +0000 INFO: Retrying... [1/5]
15:41:51 +0000 INFO: Return code: 8
15:41:52 +0000 INFO: Retrying... [2/5]
15:41:52 +0000 INFO: Return code: 8
15:41:53 +0000 INFO: Retrying... [3/5]
15:41:53 +0000 INFO: Return code: 8
15:41:54 +0000 INFO: Retrying... [4/5]
15:41:55 +0000 INFO: Return code: 8
15:41:56 +0000 INFO: Retrying... [5/5]
15:41:56 +0000 INFO: Return code: 8
15:41:57 +0000 CRIT: ERROR 404
15:41:57 +0000 CRIT: Unable to retrieve a valid package!
2022-10-17 15:41:57,142 - util.py[WARNING]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py'>) failed
Cloud-init v. 22.3.4-0ubuntu1~22.04.1 finished at Mon, 17 Oct 2022 15:41:57 +0000. Datasource DataSourceLXD. Up 14.46 seconds

Changed in cloud-init:
status: New → Triaged
Revision history for this message
Chad Smith (chad.smith) wrote :

This looks like a bug in puppet's upstream install.sh script[1] which cloud-init invokes. This failure mode is due to 22.04 not being represented in their install script below:

  "Ubuntu")
    info "Ubuntu platform! Lets get you a DEB..."
    case $platform_version in
      "12.04") deb_codename="precise";;
      "12.10") deb_codename="quantal";;
      "13.04") deb_codename="raring";;
      "13.10") deb_codename="saucy";;
      "14.04") deb_codename="trusty";;
      "14.10") deb_codename="trusty";;
      "15.04") deb_codename="vivid";;
      "15.10") deb_codename="wily";;
      "16.04") deb_codename="xenial";;
      "16.10") deb_codename="yakkety";;
      "17.04") deb_codename="zesty";;
      "18.04") deb_codename="bionic";;
      "20.04") deb_codename="focal";;
    esac

It looks like this also affects Mint too.(which only represents 20/focal and not a 21/jammy)
  info "Mint platform! Lets get you a DEB..."
  case $major_version in
      "3") deb_codename="stretch";;
      "4") deb_codename="buster";;
      "20") deb_codename="focal";;
      "19") deb_codename="bionic";;
      "18") deb_codename="xenial";;
      "17") deb_codename="trusty";;
    esac

I've put up an upstream PR against puppetlabs' repo to get mint/ubuntu sync'd[2].

[1] https://raw.githubusercontent.com/puppetlabs/install-puppet/main/install.sh
[2] https://github.com/puppetlabs/install-puppet/pull/7

Changed in cloud-init:
importance: Undecided → Medium
assignee: nobody → Chad Smith (chad.smith)
status: Triaged → In Progress
Revision history for this message
Hadmut Danisch (hadmut) wrote :

Maybe cloud-init should consider and implement a third method to install the puppet agent:

- install debian/ubuntu packages
  ruby
  ruby-rubygems
  ruby-augeas

- gem install puppet

That's what I used to manually workaround the outdated ubuntu puppet packages (still on puppet 5, which is not supported anymore, current version is puppet 7).

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: In Progress → Expired
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.