[Bug 1980368] Re: [SRU] rename ESM services on messages delivered to MOTD
Lucas Albuquerque Medeiros de Moura
1980368 at bugs.launchpad.net
Fri Sep 30 17:55:48 UTC 2022
I have run the test script for this SRU and generated the following
results
** Description changed:
[Impact]
There is an update on how the ESM services are named on the Ubuntu Advantage Client (UA) project.
We need to change those names on update-notifier as well to provide an unified user experience regarding the ESM services.
We are changing:
UA Infra: ESM -> ESM Infra
UA Apps: ESM -> ESM Apps
UA Infra: Extended Security Maintenance (ESM) -> Expanded Security Maintenance for Infrastructure
UA Apps: Extended Security Maintenance (ESM) -> Expanded Security Maintenance for Applications
[Test Case]
- NOTE: this test case will be expanded in the next few hours.
+ To test this change, use the following script:
- Launch a Xenial machine with the update-notifier package with the new changes and verify that MOTD
- now deliver the modified messages we expect.
+ ---------------------------------------------
+ #!/bin/sh
+ set -e
+
+ GREEN="\e[32m"
+ RED="\e[31m"
+ BLUE="\e[36m"
+ END_COLOR="\e[0m"
+
+ series=$1
+ token=$2
+ name=$series-dev
+
+ function cleanup {
+ lxc delete test --force
+ }
+
+ function on_err {
+ echo -e "${RED}Test Failed${END_COLOR}"
+ cleanup
+ exit 1
+ }
+
+ trap on_err ERR
+
+ function print_and_run_cmd {
+ echo -e "${BLUE}Running:${END_COLOR}" "$@"
+ echo -e "${BLUE}Output:${END_COLOR}"
+ lxc exec test -- sh -c "$@"
+ echo
+ }
+
+ function explanatory_message {
+ echo -e "${BLUE}$@${END_COLOR}"
+ }
+
+ explanatory_message "Starting $series container"
+ lxc launch ubuntu-daily:$series test
+ sleep 10
+
+ explanatory_message "Update ubuntu-advantage-tools package"
+ explanatory_message "We need that package to enable services that cause motd message changes"
+ print_and_run_cmd "add-apt-repository ppa:ua-client/staging -y"
+ print_and_run_cmd "sudo apt-get update > /dev/null"
+ print_and_run_cmd "sudo apt-get install ubuntu-advantage-tools -y > /dev/null"
+ print_and_run_cmd "ua version"
+
+ explanatory_message "Update update-notifier package"
+ print_and_run_cmd "sh -c 'echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list'"
+ print_and_run_cmd "sudo apt-get update > /dev/null"
+ print_and_run_cmd "sudo apt-get install update-notifier -y > /dev/null"
+ print_and_run_cmd "apt-cache policy update-notifier"
+
+ explanatory_message "Running update-motd for machine without an ua subscription"
+ print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
+
+ explanatory_message "Attaching machine to a UA subscription"
+ print_and_run_cmd "ua attach $token"
+
+ explanatory_message "Running update-motd for attached machine"
+ print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
+
+ explanatory_message "Installing all esm-infra packages"
+ print_and_run_cmd "sudo apt-get upgrade -y > /dev/null"
+
+ explanatory_message "Disabling esm-infra"
+ print_and_run_cmd "sudo pro disable esm-infra"
+
+ explanatory_message "Running update-motd for attached machine"
+ print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
+
+ cleanup
+ -----------------------------------------------------
+
+ Notice that you need a UA token to run this script.
+ Additionally, most messages will appear on the xenial machine due to it being ESM already
[Regression Potential]
See translatable string note in comment 3.
We are just providing message changes, so the regression potential is
really low. User might notice the changes, but they are not that
different from the original ones.
** Attachment added: "test-update-notifier.tar.xz"
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1980368/+attachment/5620324/+files/test-update-notifier.tar.xz
** Tags removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-jammy verification-needed-xenial
** Tags added: verification-done verification-done-bionic verification-done-focal verification-done-jammy verification-done-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1980368
Title:
[SRU] rename ESM services on messages delivered to MOTD
Status in update-notifier package in Ubuntu:
Fix Released
Status in update-notifier source package in Xenial:
Fix Committed
Status in update-notifier source package in Bionic:
Fix Committed
Status in update-notifier source package in Focal:
Fix Committed
Status in update-notifier source package in Impish:
Won't Fix
Status in update-notifier source package in Jammy:
Fix Committed
Bug description:
[Impact]
There is an update on how the ESM services are named on the Ubuntu Advantage Client (UA) project.
We need to change those names on update-notifier as well to provide an unified user experience regarding the ESM services.
We are changing:
UA Infra: ESM -> ESM Infra
UA Apps: ESM -> ESM Apps
UA Infra: Extended Security Maintenance (ESM) -> Expanded Security Maintenance for Infrastructure
UA Apps: Extended Security Maintenance (ESM) -> Expanded Security Maintenance for Applications
[Test Case]
To test this change, use the following script:
---------------------------------------------
#!/bin/sh
set -e
GREEN="\e[32m"
RED="\e[31m"
BLUE="\e[36m"
END_COLOR="\e[0m"
series=$1
token=$2
name=$series-dev
function cleanup {
lxc delete test --force
}
function on_err {
echo -e "${RED}Test Failed${END_COLOR}"
cleanup
exit 1
}
trap on_err ERR
function print_and_run_cmd {
echo -e "${BLUE}Running:${END_COLOR}" "$@"
echo -e "${BLUE}Output:${END_COLOR}"
lxc exec test -- sh -c "$@"
echo
}
function explanatory_message {
echo -e "${BLUE}$@${END_COLOR}"
}
explanatory_message "Starting $series container"
lxc launch ubuntu-daily:$series test
sleep 10
explanatory_message "Update ubuntu-advantage-tools package"
explanatory_message "We need that package to enable services that cause motd message changes"
print_and_run_cmd "add-apt-repository ppa:ua-client/staging -y"
print_and_run_cmd "sudo apt-get update > /dev/null"
print_and_run_cmd "sudo apt-get install ubuntu-advantage-tools -y > /dev/null"
print_and_run_cmd "ua version"
explanatory_message "Update update-notifier package"
print_and_run_cmd "sh -c 'echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list'"
print_and_run_cmd "sudo apt-get update > /dev/null"
print_and_run_cmd "sudo apt-get install update-notifier -y > /dev/null"
print_and_run_cmd "apt-cache policy update-notifier"
explanatory_message "Running update-motd for machine without an ua subscription"
print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
explanatory_message "Attaching machine to a UA subscription"
print_and_run_cmd "ua attach $token"
explanatory_message "Running update-motd for attached machine"
print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
explanatory_message "Installing all esm-infra packages"
print_and_run_cmd "sudo apt-get upgrade -y > /dev/null"
explanatory_message "Disabling esm-infra"
print_and_run_cmd "sudo pro disable esm-infra"
explanatory_message "Running update-motd for attached machine"
print_and_run_cmd "/usr/lib/update-notifier/apt-check --human-readable"
cleanup
-----------------------------------------------------
Notice that you need a UA token to run this script.
Additionally, most messages will appear on the xenial machine due to it being ESM already
[Regression Potential]
See translatable string note in comment 3.
We are just providing message changes, so the regression potential is
really low. User might notice the changes, but they are not that
different from the original ones.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1980368/+subscriptions
More information about the foundations-bugs
mailing list