lxd-installer wait message confuses version checkers

Bug #2069754 reported by Simon Déziel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd-installer (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The fact that lxd-installer echoes "Installing LXD snap, please be patient." to stdout while it `snap install lxd` behind the scene can confuse version checkers like `snapcraft`:

$ lxc launch ubuntu-minimal-daily:24.10 o1
$ lxc exec o1 -- apt-get update -qq
$ lxc exec o1 -- apt-get install --no-install-recommends -y git
$ lxc exec o1 -- git clone https://github.com/canonical/lxd-pkg-snap.git

$ lxc exec o1 -- snap wait system seed
$ lxc exec o1 -- snap install --classic snapcraft

$ lxc exec o1 -- sh -c 'cd /root/lxd-pkg-snap && snapcraft'
craft-providers error: Failed to parse LXD version.
Version data returned: 'Installing'
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20240618-151045.662527.log'

In the above, we see that `snapcraft` tried to interpret the first word on stdout ("Installing") as the LXD version but that's failing for obvious reasons.

lxd-installer should not output anything to stdout as that should be left to the real `lxd` and `lxc` commands.

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxd-installer - 7

---------------
lxd-installer (7) oracular; urgency=medium

  * scripts/lxc: output to stderr only (LP: #2069754)
    - d/tests/install-on-demand: check user notification on stderr
  * Makefile: make `lxd` a symlink to /usr/sbin/lxc
  * d/control: bump standards-version to 4.7.0 (no change required)

 -- Simon Deziel <email address hidden> Tue, 18 Jun 2024 11:17:33 -0400

Changed in lxd-installer (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.