2023-05-10 08:39:23 |
Philip Roche |
bug |
|
|
added bug |
2023-05-10 08:39:23 |
Philip Roche |
attachment added |
|
Reproducer and test script https://bugs.launchpad.net/bugs/2019089/+attachment/5672115/+files/reproducer-and-test.sh |
|
2023-05-10 08:40:18 |
Philip Roche |
google-guest-agent (Ubuntu): assignee |
|
Philip Roche (philroche) |
|
2023-05-10 08:40:42 |
Philip Roche |
google-guest-agent (Ubuntu): status |
New |
In Progress |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
nominated for series |
|
Ubuntu Mantic |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
bug task added |
|
google-guest-agent (Ubuntu Mantic) |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
nominated for series |
|
Ubuntu Lunar |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
bug task added |
|
google-guest-agent (Ubuntu Lunar) |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
nominated for series |
|
Ubuntu Kinetic |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
bug task added |
|
google-guest-agent (Ubuntu Kinetic) |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
nominated for series |
|
Ubuntu Jammy |
|
2023-05-10 08:57:44 |
Miriam España Acebal |
bug task added |
|
google-guest-agent (Ubuntu Jammy) |
|
2023-05-10 09:00:36 |
Andrew Cloke |
bug |
|
|
added subscriber Andrew Cloke |
2023-05-10 09:45:32 |
Alberto Contreras |
bug |
|
|
added subscriber Alberto Contreras |
2023-05-11 11:52:49 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~philroche/ubuntu/+source/google-guest-agent/+git/google-guest-agent/+merge/442648 |
|
2023-05-12 12:05:01 |
Philip Roche |
description |
Initially reported @ https://github.com/GoogleCloudPlatform/guest-agent/issues/119
It is only relevant for Ubuntu 22.04 and later.
The previous logic https://git.launchpad.net/ubuntu/+source/google-guest-agent/tree/debian/rules#n20 in the package works fine in 20.04 and 18.04 but not in 22.04+.
Basically anytime the google-guest-agent package is updated, these services are restarted which means the customer scripts are run at a time they are not supposed to be. This caused an outage for one customer who had some logic in their shutdown script that basically turned off their services.
The issue is most certainly in the autogenerated preinst script which should not be there. Stopping the shutdown service will invoke the shutdown script. This wasn't there in previous Ubuntu versions.
Ubuntu 22.04 preinst script
```
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'google-shutdown-scripts.service' 'google-startup-scripts.service' >/dev/null || true
fi
# End automatically added section
```
Ubuntu 20.04 preinst script
```
root@ubu2004:/tmp/DEBIAN# cat preinst
#!/bin/sh
set -e
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
```
One reason this issue was of concern as the latest google-guest-agent update was a rebuild promoted by golang-1.18 being updated to address CVEs prompting a rebuild of all packages dependant on golang-1.18 and publication of those rebuilds to the -security pocket. unattended-upgrades then upgraded google-guest-agent in the background which restarted the shutdown-scripts. |
Initially reported @ https://github.com/GoogleCloudPlatform/guest-agent/issues/119
It is only relevant for Ubuntu 22.04 and later.
The previous logic https://git.launchpad.net/ubuntu/+source/google-guest-agent/tree/debian/rules#n20 in the package works fine in 20.04 and 18.04 but not in 22.04+.
Basically anytime the google-guest-agent package is updated, these services are restarted which means the customer scripts are run at a time they are not supposed to be. This caused an outage for one customer who had some logic in their shutdown script that basically turned off their services.
The issue is most certainly in the autogenerated preinst script which should not be there. Stopping the shutdown service will invoke the shutdown script. This wasn't there in previous Ubuntu versions.
Ubuntu 22.04 preinst script
```
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'google-shutdown-scripts.service' 'google-startup-scripts.service' >/dev/null || true
fi
# End automatically added section
```
Ubuntu 20.04 preinst script
```
root@ubu2004:/tmp/DEBIAN# cat preinst
#!/bin/sh
set -e
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
```
One reason this issue was of concern as the latest google-guest-agent update was a rebuild promoted by golang-1.18 being updated to address CVEs prompting a rebuild of all packages dependant on golang-1.18 and publication of those rebuilds to the -security pocket. unattended-upgrades then upgraded google-guest-agent in the background which restarted the shutdown-scripts.
We do want the services to be enabled on initial installation and to be started on instance start but they should not be restarted/stopped during the lifetime of the instance. |
|
2023-05-18 06:49:33 |
Launchpad Janitor |
google-guest-agent (Ubuntu Mantic): status |
In Progress |
Fix Released |
|
2023-05-18 11:25:49 |
Philip Roche |
attachment added |
|
test-google-guest-agent-upgrade-path.sh to validate upgrade path https://bugs.launchpad.net/ubuntu/+source/google-guest-agent/+bug/2019089/+attachment/5673841/+files/test-google-guest-agent-upgrade-path.sh |
|
2023-05-23 16:17:14 |
Launchpad Janitor |
google-guest-agent (Ubuntu Jammy): status |
New |
Confirmed |
|
2023-05-23 16:17:14 |
Launchpad Janitor |
google-guest-agent (Ubuntu Kinetic): status |
New |
Confirmed |
|
2023-05-23 16:17:14 |
Launchpad Janitor |
google-guest-agent (Ubuntu Lunar): status |
New |
Confirmed |
|
2023-05-24 13:17:32 |
Utkarsh Gupta |
description |
Initially reported @ https://github.com/GoogleCloudPlatform/guest-agent/issues/119
It is only relevant for Ubuntu 22.04 and later.
The previous logic https://git.launchpad.net/ubuntu/+source/google-guest-agent/tree/debian/rules#n20 in the package works fine in 20.04 and 18.04 but not in 22.04+.
Basically anytime the google-guest-agent package is updated, these services are restarted which means the customer scripts are run at a time they are not supposed to be. This caused an outage for one customer who had some logic in their shutdown script that basically turned off their services.
The issue is most certainly in the autogenerated preinst script which should not be there. Stopping the shutdown service will invoke the shutdown script. This wasn't there in previous Ubuntu versions.
Ubuntu 22.04 preinst script
```
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'google-shutdown-scripts.service' 'google-startup-scripts.service' >/dev/null || true
fi
# End automatically added section
```
Ubuntu 20.04 preinst script
```
root@ubu2004:/tmp/DEBIAN# cat preinst
#!/bin/sh
set -e
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
```
One reason this issue was of concern as the latest google-guest-agent update was a rebuild promoted by golang-1.18 being updated to address CVEs prompting a rebuild of all packages dependant on golang-1.18 and publication of those rebuilds to the -security pocket. unattended-upgrades then upgraded google-guest-agent in the background which restarted the shutdown-scripts.
We do want the services to be enabled on initial installation and to be started on instance start but they should not be restarted/stopped during the lifetime of the instance. |
[Impact]
========
Initially reported @ https://github.com/GoogleCloudPlatform/guest-agent/issues/119
Basically anytime the google-guest-agent package is updated, these services are restarted which means the customer scripts are run at a time they are not supposed to be. This caused an outage for one customer who had some logic in their shutdown script that basically turned off their services.
The issue is most certainly in the autogenerated preinst script which should not be there. Stopping the shutdown service will invoke the shutdown script. This wasn't there in previous Ubuntu versions.
Ubuntu 22.04 preinst script
```
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
# Automatically added by dh_installsystemd/13.6ubuntu1
if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = upgrade ] && [ -d /run/systemd/system ] ; then
deb-systemd-invoke stop 'google-shutdown-scripts.service' 'google-startup-scripts.service' >/dev/null || true
fi
# End automatically added section
```
Ubuntu 20.04 preinst script
```
root@ubu2004:/tmp/DEBIAN# cat preinst
#!/bin/sh
set -e
# Automatically added by dh_installdeb/12.10ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defaults/instance_configs.cfg 20200617.00-0ubuntu2\~ -- "$@"
# End automatically added section
```
One reason this issue was of concern as the latest google-guest-agent update was a rebuild promoted by golang-1.18 being updated to address CVEs prompting a rebuild of all packages dependant on golang-1.18 and publication of those rebuilds to the -security pocket. unattended-upgrades then upgraded google-guest-agent in the background which restarted the shutdown-scripts.
We do want the services to be enabled on initial installation and to be started on instance start but they should not be restarted/stopped during the lifetime of the instance.
[Test Plan]
===========
After having the fixes in, we'll run the reproducer and the test script mentioned in the first comment: https://bugs.launchpad.net/ubuntu/+source/google-guest-agent/+bug/2019089/comments/1.
This will help us validate that the fix is indeed working as it should.
A demonstration of that reproducer script is shown in the 2nd comment:
https://bugs.launchpad.net/ubuntu/+source/google-guest-agent/+bug/2019089/comments/2.
Further, we'll also build the images and run the CTF tests (internal tests) on them on our side and then ask Google to validate these images to make sure they also confirm that the bug is indeed fix and there's no regression or fallout with this update.
Once Google comes back with the validation, we'll assume enough testing and verification has been done and will mark the bug with the same.
[Where Problems Could Occur]
============================
The patch just adds "--no-stop-on-upgrade" to the already existing "--no-start --no-restart-after-upgrade". So if somebody is relying on that behavior or has a workaround that somehow, it'll break the setup for them. But this update should bring them the right fix. I don't expect a lot of users to regress because of that, though. |
|
2023-05-25 08:32:17 |
Utkarsh Gupta |
nominated for series |
|
Ubuntu Focal |
|
2023-05-25 08:32:17 |
Utkarsh Gupta |
bug task added |
|
google-guest-agent (Ubuntu Focal) |
|
2023-05-25 08:32:17 |
Utkarsh Gupta |
nominated for series |
|
Ubuntu Bionic |
|
2023-05-25 08:32:17 |
Utkarsh Gupta |
bug task added |
|
google-guest-agent (Ubuntu Bionic) |
|
2023-05-26 10:32:09 |
Timo Aaltonen |
google-guest-agent (Ubuntu Lunar): status |
Confirmed |
Fix Committed |
|
2023-05-26 10:32:10 |
Timo Aaltonen |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2023-05-26 10:32:12 |
Timo Aaltonen |
bug |
|
|
added subscriber SRU Verification |
2023-05-26 10:32:14 |
Timo Aaltonen |
tags |
|
verification-needed verification-needed-lunar |
|
2023-05-26 10:32:51 |
Timo Aaltonen |
google-guest-agent (Ubuntu Kinetic): status |
Confirmed |
Fix Committed |
|
2023-05-26 10:32:54 |
Timo Aaltonen |
tags |
verification-needed verification-needed-lunar |
verification-needed verification-needed-kinetic verification-needed-lunar |
|
2023-05-26 10:34:42 |
Timo Aaltonen |
google-guest-agent (Ubuntu Jammy): status |
Confirmed |
Fix Committed |
|
2023-05-26 10:34:45 |
Timo Aaltonen |
tags |
verification-needed verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-05-26 10:35:15 |
Timo Aaltonen |
google-guest-agent (Ubuntu Focal): status |
New |
Fix Committed |
|
2023-05-26 10:35:18 |
Timo Aaltonen |
tags |
verification-needed verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-05-26 10:36:06 |
Timo Aaltonen |
google-guest-agent (Ubuntu Bionic): status |
New |
Fix Committed |
|
2023-05-26 10:36:09 |
Timo Aaltonen |
tags |
verification-needed verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
|
2023-06-09 14:11:36 |
Andrew Cloke |
tags |
verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-kinetic verification-needed-lunar |
verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-kinetic verification-done-lunar |
|
2023-06-14 00:46:47 |
Launchpad Janitor |
google-guest-agent (Ubuntu Lunar): status |
Fix Committed |
Fix Released |
|
2023-06-14 00:46:52 |
Chris Halse Rogers |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2023-06-14 00:47:03 |
Launchpad Janitor |
google-guest-agent (Ubuntu Kinetic): status |
Fix Committed |
Fix Released |
|
2023-06-14 00:47:16 |
Launchpad Janitor |
google-guest-agent (Ubuntu Jammy): status |
Fix Committed |
Fix Released |
|
2023-06-14 00:47:29 |
Launchpad Janitor |
google-guest-agent (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2023-06-14 00:47:42 |
Launchpad Janitor |
google-guest-agent (Ubuntu Bionic): status |
Fix Committed |
Fix Released |
|
2024-01-26 17:25:05 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~kajiya/cloud-images/+git/google-guest-agent/+merge/459524 |
|