I have been testing the proposed package against the test plan and I'm
happy to report this passes validation! See the steps I took below.
---
Install terraform and LXD
sudo snap install terraform --classic
sudo snap install lxd
Make sure you're in the `lxd` group:
if ! getent group lxd | grep "$USER"; then
sudo usermod -aG lxd "$USER"
newgrp lxd
fi
If you've not already set up LXD do so now:
lxd init --minimal
Start up Landscape Server, enable autoregistration and get the
registration info.
Create a file called `main.tf` and paste the following, making sure to
replace the server/pro info. This will create two jammy instances, one
with the proposed version of Landscape Client and one with the current
version in the jammy archives, install lsb-core in them, and then
register them with Landscape Server. Then, it will run the provided
`runcmd`:
module "landscape-client" {
source = "jansdhillon/landscape-client/lxd"
pro_token = "xxxxx" # replace with real pro token
account_name = "onward"
landscape_root_url = "10.1.77.207"
registration_key = "key"
image_alias = "jammy"
instances = [
{
client_config = {
computer_title = "jammy-lp2031036-proposed-validator"
ping_interval = 10
exchange_interval = 10
urgent_exchange_interval = 10
}
landscape_client_package = "landscape-
client=23.02-0ubuntu1~22.04.6"
files = [
{
content = <<EOT
Package: landscape-client landscape-common
Pin: release a=jammy-proposed
Pin-Priority: 600
EOT
target_path = "/etc/apt/preferences.d/proposed"
}
]
additional_cloud_init = <<EOT
#cloud-config
apt:
sources:
jammy-proposed:
source: "deb http://archive.ubuntu.com/ubuntu
jammy-proposed main restricted universe multiverse"
package-upgrades: true
packages:
- lsb-core
runcmd:
- mkdir -p /tmp/landscape
- 'sleep 60 && grep "ValueError: too many values to unpack"
/var/log/landscape/package-reporter.log > /tmp/landscape/value-error-result.txt'
EOT
},
{
client_config = {
computer_title = "jammy-lp2031036-control-validator"
ping_interval = 10
exchange_interval = 10
urgent_exchange_interval = 10
}
landscape_client_package = "landscape-
client=23.02-0ubuntu1~22.04.4"
additional_cloud_init = <<EOT
#cloud-config
package-upgrades: true
packages:
- lsb-core
runcmd:
- mkdir -p /tmp/landscape
- 'sleep 60 && grep "ValueError: too many values to unpack"
/var/log/landscape/package-reporter.log > /tmp/landscape/value-error-result.txt'
EOT
},
]
}
Initialize and apply the terraform plan:
terraform init && terraform apply -auto-approve
After registering, the following command is run via the cloud-init to
check if the error mentioned in the original bug is in the package
reporter logs:
sleep 60 && grep "ValueError: too many values to unpack"
/var/log/landscape/package-reporter.log > /tmp/landscape/value-error-
result.txt
We can check the output of this error file on both the proposed and current
versions:
printf "\njammy-lp2031036-proposed-validator: \n"
lxc exec jammy-lp2031036-proposed-validator -- sh -c '\
if [ -s /tmp/landscape/value-error-result.txt ]; then \
cat /tmp/landscape/value-error-result.txt; \
else \
echo "No errors!"; \
fi'
printf "\njammy-lp2031036-control-validator (currently in archives): \n"
lxc exec jammy-lp2031036-control-validator -- sh -c '\
if [ -s /tmp/landscape/value-error-result.txt ]; then \
cat /tmp/landscape/value-error-result.txt; \
else \
echo "No errors!"; \
fi'
We should see this output:
jammy-lp2031036-proposed-validator:
No errors!
jammy-lp2031036-control-validator (currently in archives):
ValueError: too many values to unpack (expected 5)
This confirms that `landscape-client=23.02-0ubuntu1~22.04.6` fixes this
issue on jammy. The computer titled `jammy-lp2031036-proposed-validator`
should continue reporting its package information to Landscape Server,
and, eventually, report `lsb-core` as being installed.
Additionally, install a package, remove a package and upgrade all
packages on the proposed version, through Landscape Server. All should
work without error and complete within a reasonable amount of time.
Distribution info should be displayed as usual.
Cleanup:
terraform destroy -auto-approve
TF module used: https://github.com/jansdhillon/terraform-lxd-landscape-
client/tree/main/examples/fix_lsb
** Tags removed: verification-needed-jammy
** Tags added: verification-done-jammy
** Tags removed: verification-needed
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2031036
Title:
[SRU] Error when parsing lsb_release, landscape-package-reporter
unable to report package list to server
To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/2031036/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs