Activity log for bug #2039621

Date Who What changed Old value New value Message
2023-10-18 00:02:25 Chad Smith bug added bug
2023-10-18 00:26:37 Chad Smith cloud-init (Ubuntu): status Triaged Fix Committed
2023-10-19 22:48:55 Chad Smith description Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'. === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do VM=sru-$release-2039621 lxc launch ubuntu-daily:$release $VM lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}') lxc file push $RELEASE_DEB $VM/ lxc exec $VM -- dpkg -i /$RELEASE_DEB lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data" lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'.
2023-10-24 14:51:15 Chad Smith nominated for series Ubuntu Mantic
2023-10-24 14:51:15 Chad Smith bug task added cloud-init (Ubuntu Mantic)
2023-10-24 14:51:15 Chad Smith nominated for series Ubuntu Lunar
2023-10-24 14:51:15 Chad Smith bug task added cloud-init (Ubuntu Lunar)
2023-10-24 14:51:15 Chad Smith nominated for series Ubuntu Focal
2023-10-24 14:51:15 Chad Smith bug task added cloud-init (Ubuntu Focal)
2023-10-24 14:51:15 Chad Smith nominated for series Ubuntu Jammy
2023-10-24 14:51:15 Chad Smith bug task added cloud-init (Ubuntu Jammy)
2023-10-24 21:44:26 Ubuntu Archive Robot bug added subscriber James Falcon
2023-11-16 18:45:03 Chad Smith cloud-init (Ubuntu Focal): status New Invalid
2023-11-16 18:45:07 Chad Smith cloud-init (Ubuntu Jammy): status New Opinion
2023-11-16 18:45:12 Chad Smith cloud-init (Ubuntu Jammy): status Opinion Invalid
2023-11-16 18:45:16 Chad Smith cloud-init (Ubuntu Lunar): status New Invalid
2023-11-16 18:51:29 Chad Smith cloud-init (Ubuntu Mantic): status New Fix Committed
2023-11-16 18:51:33 Chad Smith cloud-init (Ubuntu): status Fix Committed Fix Released
2023-11-16 19:57:26 Chad Smith description === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do VM=sru-$release-2039621 lxc launch ubuntu-daily:$release $VM lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}') lxc file push $RELEASE_DEB $VM/ lxc exec $VM -- dpkg -i /$RELEASE_DEB lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data" lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'. === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do VM=sru-$release-2039621 lxc launch ubuntu-daily:$release $VM lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" echo " --- Assert apt-get update called across clean reboot on released pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" echo "---- install proposed cloud-init" RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}') lxc file push $RELEASE_DEB $VM/ lxc exec $VM -- dpkg -i /$RELEASE_DEB echo " --- Assert apt-get update called across clean reboot on proposed pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data" lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'.
2023-11-16 20:02:24 Andreas Hasenack bug added subscriber Ubuntu Stable Release Updates Team
2023-11-16 20:02:44 Andreas Hasenack bug added subscriber SRU Verification
2023-11-16 20:02:53 Andreas Hasenack tags verification-needed verification-needed-mantic
2023-11-17 16:04:01 Chad Smith description === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do VM=sru-$release-2039621 lxc launch ubuntu-daily:$release $VM lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" echo " --- Assert apt-get update called across clean reboot on released pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" echo "---- install proposed cloud-init" RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}') lxc file push $RELEASE_DEB $VM/ lxc exec $VM -- dpkg -i /$RELEASE_DEB echo " --- Assert apt-get update called across clean reboot on proposed pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data" lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'. === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat > setup-proposed.sh <<EOF #/bin/bash mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -qy cloud-init; EOF cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do  VM=sru-$release-2039621  lxc launch ubuntu-daily:$release $VM  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo " --- Assert apt-get update called across clean reboot on released pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo "---- install proposed cloud-init" lxc file push $VM setup-proposed.sh lxc exec $VM -- bash setup-proposed.sh | grep cloud-init  RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}')  lxc file push $RELEASE_DEB $VM/  lxc exec $VM -- dpkg -i /$RELEASE_DEB  echo " --- Assert apt-get update called across clean reboot on proposed pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data"  lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'.
2023-11-17 16:28:49 Chad Smith description === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat > setup-proposed.sh <<EOF #/bin/bash mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -qy cloud-init; EOF cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do  VM=sru-$release-2039621  lxc launch ubuntu-daily:$release $VM  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo " --- Assert apt-get update called across clean reboot on released pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo "---- install proposed cloud-init" lxc file push $VM setup-proposed.sh lxc exec $VM -- bash setup-proposed.sh | grep cloud-init  RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}')  lxc file push $RELEASE_DEB $VM/  lxc exec $VM -- dpkg -i /$RELEASE_DEB  echo " --- Assert apt-get update called across clean reboot on proposed pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data"  lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'. === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat > setup-proposed.sh <<EOF #/bin/bash mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -t \$(lsb_release -sc)-proposed -qy cloud-init; EOF cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do  VM=sru-$release-2039621  lxc launch ubuntu-daily:$release $VM  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo " --- Assert apt-get update called across clean reboot on released pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo "---- install proposed cloud-init"  lxc file push $VM setup-proposed.sh  lxc exec $VM -- bash setup-proposed.sh | grep cloud-init  RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}')  lxc file push $RELEASE_DEB $VM/  lxc exec $VM -- dpkg -i /$RELEASE_DEB  echo " --- Assert apt-get update called across clean reboot on proposed pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data"  lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'.
2023-11-17 16:43:39 Chad Smith description === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat > setup-proposed.sh <<EOF #/bin/bash mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -t \$(lsb_release -sc)-proposed -qy cloud-init; EOF cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do  VM=sru-$release-2039621  lxc launch ubuntu-daily:$release $VM  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo " --- Assert apt-get update called across clean reboot on released pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS"  echo "---- install proposed cloud-init"  lxc file push $VM setup-proposed.sh  lxc exec $VM -- bash setup-proposed.sh | grep cloud-init  RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}')  lxc file push $RELEASE_DEB $VM/  lxc exec $VM -- dpkg -i /$RELEASE_DEB  echo " --- Assert apt-get update called across clean reboot on proposed pkg"  lxc exec $VM -- cloud-init clean --logs --reboot  sleep 5  lxc exec $VM -- cloud-init status --wait --long  APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log)  [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data"  lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'. === Begin SRU Template === [Impact] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. The fix is to avoid calling apt-get update in default case when no missing dependencies are required for installation. [Test Case] * launch daily mantic images with no user-data and confirm apt-get update is called by cloud-init on first boot * upgrade cloud-init in the mantic VM to the proposed SRU cloud-init deb * cloud-init clean --logs --reboot to re-run upgraded cloud-init across reboot * assert that newly booted upgraded VM no longer calls apt-get update test procedure: cat > setup-proposed.sh <<EOF #/bin/bash mirror=http://archive.ubuntu.com/ubuntu echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list apt-get update -q; apt-get install -t \$(lsb_release -sc)-proposed -qy cloud-init; EOF cat sru-2039621.sh <<EOF #!/bin/bash for release in mantic; do VM=sru-$release-2039621 lxc launch ubuntu-daily:$release $VM lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found apt-get update calls $APT_UPDATE_CALLS" echo " --- Assert apt-get update called across clean reboot on released pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -n "$APT_UPDATE_CALLS" ] || echo "FAILURE: did not find expected apt-get update calls on empty user-data" && echo "SUCCESS: found reproducer: $(echo $APT_UPDATE_CALLS | wc -l ) apt-get update call across clean reboot for published cloud-init" echo "---- install proposed cloud-init" lxc file push setup-proposed.sh $VM/ lxc exec $VM -- bash /setup-proposed.sh | grep cloud-init RELEASE_DEB=$(pull-ppa-debs ppa:cloud-init-dev/proposed cloud-init ${release} | awk '/.deb/{print $NF}') lxc file push $RELEASE_DEB $VM/ lxc exec $VM -- dpkg -i /$RELEASE_DEB echo " --- Assert apt-get update NOT called across clean reboot on proposed pkg" lxc exec $VM -- cloud-init clean --logs --reboot sleep 5 lxc exec $VM -- cloud-init status --wait --long APT_UPDATE_CALLS=$(lxc exec $VM -- grep apt-get /var/log/cloud-init.log) [ -z "$APT_UPDATE_CALLS" ] || echo "FAILURE: found $(echo $APT_UPDATE_CALLS | wc -l ) unexpected apt-get update calls per boot: $APT_UPDATE_CALLS" && echo "SUCCESS: found NO apt-get update logs per boot on empty user-data" lxc delete $VM --force done EOF bash sru-2039621.sh # look for SUCCESS|FAIL messages [Regression Potential] If done wrong, minimal images may not attempt to install gnupg or software-properties-common packages when cloud-config user-data specifies apt configuration that requires setting up PPAs or importing gpg keys. This regression test is already covered by https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Other info] Existing integration test for installing missing dependencies https://github.com/canonical/cloud-init/blob/main/tests/integration_tests/modules/test_apt_functionality.py#L419-L447 [Original description] Upstream commit 015543d304[1] introduced the ability to install missing dependencies (software-properties-common or gnupg) when running on minimal images with custom cloud-config that contains APT configuration that requires interaction with those tools. The commit also introduced a default case on first boot where, regardless of whether apt configuration is present, apt update will be called. This adds an initial boot delay of around 2 seconds and apt update should be avoided unless packages are going to be installed or `package_update: true` is provided in cloud-config user-data. [1] https://github.com/canonical/cloud-init/commit/015543d304 The resolution here is to avoid calling the method cloud.distro.install_packages(missing_packages) when no packages need to be installed because the side-effect of this install_packages call is a run of 'apt update'.
2023-11-17 16:43:49 Chad Smith tags verification-needed verification-needed-mantic verification-done verification-done-mantic
2023-11-27 18:36:42 Launchpad Janitor cloud-init (Ubuntu Mantic): status Fix Committed Fix Released
2023-11-27 18:36:53 Timo Aaltonen removed subscriber Ubuntu Stable Release Updates Team