[Bug 1888572] Please test proposed package
Timo Aaltonen
1888572 at bugs.launchpad.net
Fri Aug 21 11:10:41 UTC 2020
Hello Andreas, or anyone else affected,
Accepted base-files into bionic-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/base-
files/10.1ubuntu2.10 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
bionic to verification-done-bionic. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-bionic. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: base-files (Ubuntu Xenial)
Status: In Progress => Fix Committed
** Tags added: verification-needed-xenial
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1888572
Title:
motd-news: use wget instead of curl
Status in base-files package in Ubuntu:
Fix Released
Status in base-files source package in Xenial:
Fix Committed
Status in base-files source package in Bionic:
Fix Committed
Status in base-files source package in Focal:
Fix Committed
Bug description:
[Impact]
The motd-news script is using curl, but since that is an optional package, there is no guarantee that it will be installed. The script correctly checks for its presence before trying to use it, though, so it won't fail. As we don't want to add such a dependency to the base-files package, we should switch to wget, which is standard.
[Test Case]
wget has a different behavior than curl in some areas, one of which is crucial for the motd-per-cloud feature. While curl will only complain about a 404 from the server if given a specific parameter (-f), wget does that by default, and needs special handling.
a) With curl, base-files and ubuntu-server installed, first verify motd-news works:
$ sudo /etc/update-motd.d/50-motd-news --force
* Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
sudo snap install microk8s --channel=1.19/candidate --classic
https://microk8s.io/ has docs and details.
Now remove curl, and retry. It should exit immediately with no output:
$ sudo /etc/update-motd.d/50-motd-news --force
Install the updated base-files package and the new motd-news-config
package from proposed:
$ sudo apt install base-files motd-news-config
Note curl is still not available:
$ curl
Command 'curl' not found, but can be installed with:
sudo apt install curl
Re-run the motd-news script, this time it should produce output again:
$ sudo /etc/update-motd.d/50-motd-news --force
* Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
sudo snap install microk8s --channel=1.19/candidate --classic
https://microk8s.io/ has docs and details.
b) Verify motd-news per cloud remains working.
If you have /usr/bin/cloud-id, copy it to a backup:
sudo cp /usr/bin/cloud-id{,.orig}
Create a new one, per supported cloud. For aws, for example:
echo -e '#!/bin/sh\necho aws' | sudo tee /usr/bin/cloud-id
Confirm by running it:
$ cloud-id
aws
And confirm motd-news keeps working (it might return different content):
$ sudo /etc/update-motd.d/50-motd-news --force
* Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
sudo snap install microk8s --channel=1.19/candidate --classic
https://microk8s.io/ has docs and details.
Repeat for the gce and azure clouds, by changing the cloud-id script
accordingly.
To confirm the right cloud_id is being used, use sh -x and grep for
its output:
$ sudo sh -x /etc/update-motd.d/50-motd-news --force 2>&1 | grep -wE 'wget .*cloud_id/[a-z]+'
+ wget --timeout 60 -U wget/1.20.3-1ubuntu1 Ubuntu/20.04.1/LTS GNU/Linux/5.4.0-42-generic/x86_64 Intel(R)/Core(TM)/i7-7600U/CPU/@/2.80GHz cloud_id/azure -O- --content-on-error https://motd.ubuntu.com
This also verifies again it's using wget instead of curl.
[Regression Potential]
Possible regressions will likely be tied to a difference in behavior between curl and wget. In fact, one was caught[1] in the development release and the fix is included here, with a test.
[Other Info]
N/A
1. https://bugs.launchpad.net/bugs/1889117
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1888572/+subscriptions
More information about the foundations-bugs
mailing list