sbuild-launchpad-chroot shouldn't emit errors when non-LP chroots are used

Bug #1637898 reported by Jeremy Bícha
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Undecided
Unassigned
sbuild-launchpad-chroot (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Trying to run autopkgtest using my Debian schroot created with mk-sbuild fails:

$ autopkgtest -- schroot unstable-amd64
autopkgtest [21:20:07]: version 4.1
autopkgtest [21:20:07]: host Lenovo-ideapad-FLEX-4; command line: /usr/bin/autopkgtest -- schroot unstable-amd64
<VirtSubproc>: failure: ['schroot', '--quiet', '--begin-session', '--chroot', 'unstable-amd64'] unexpectedly produced stderr output `I: 01launchpad-chroot: [sid-amd64] Processing config
I: 01launchpad-chroot: [sid-amd64] Doesn't exist.
'
autopkgtest [21:20:09]: ERROR: testbed failure: cannot send to testbed: ['BrokenPipeError: [Errno 32] Broken pipe\n']

Workaround
==========
The command works if I comment out the last 2 lines in /etc/schroot/setup.d/01launchpad-chroot

For compatibility with autopkgtest, those scripts shouldn't use stderr.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: sbuild-launchpad-chroot 0.13
ProcVersionSignature: Ubuntu 4.8.0-26.28-generic 4.8.0
Uname: Linux 4.8.0-26-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Oct 30 21:23:33 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-08-11 (80 days ago)
InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Alpha amd64 (20160811)
PackageArchitecture: all
SourcePackage: sbuild-launchpad-chroot
UpgradeStatus: Upgraded to yakkety on 2016-10-27 (3 days ago)

Revision history for this message
Jeremy Bícha (jbicha) wrote :
Revision history for this message
Jeremy Bícha (jbicha) wrote :

So the first issue is it's looking for a file that isn't the way mk-sbuild names it by default so…

sudo mv /etc/schroot/chroot.d/sbuild-sid-amd64 sudo mv /etc/schroot/chroot.d/sid-amd64

but then I get this error:

<VirtSubproc>: failure: ['schroot', '--quiet', '--begin-session', '--chroot', 'sid-amd64'] unexpectedly produced stderr output `I: 01launchpad-chroot: [sid-amd64] Processing config
I: 01launchpad-chroot: [sid-amd64] Skipping (missing launchpad.* options).

Revision history for this message
Martin Pitt (pitti) wrote :

While that's a bug in sbuild-launchpad-chroot (it should use "info()", not some custom code to print to stderr), it's easy to make autopkgtest resilient against that. Fix pushed to git.

Changed in autopkgtest (Ubuntu):
status: New → Fix Committed
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Martin, thanks, the new autopkgtest fixes my problem.

summary: - sbuild-launchpad-chroot incompatible with running autopkgtest with non-
- LP chroots
+ sbuild-launchpad-chroot shouldn't emit errors when non-LP chroots are
+ used
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 4.2

---------------
autopkgtest (4.2) unstable; urgency=medium

  [ Martin Pitt ]
  * ssh: Fix result of tests that break the testbed. (LP: #1630578)
  * qemu: Fix user/password login mode without a ttyS1 root shell.
     - Concatenate bytes with each other, not a str to a byte.
     - Sync/flush console after sending password and ttyS1 shell command, wait
       until login is complete before continuing.
     - Send password to sudo for ttyS1 shell command, to also work with
       password-requiring sudo. (LP: #1630963)
  * qemu: Fix reboot in user/password login mode.
  * ssh: Add --capability option.
    This is useful to run tests which require an isolation level or have
    breaks-testbed without a setup script.
  * autopkgtest-build-lxd: Ask "lxc profile" for default bridge instead of
    /etc/default/lxd-bridge. The latter went away in recent LXD versions, and
    "lxc profile show default" also works in earlier versions.
  * Make --apt-upgrade consider a "404" error as test failure.
    Previously all errors from "apt-get update" were considered temporary
    failures, i. e. the setup command always exited with 1. But if we specify
    e. g. a nonexisting release from a distro or a PPA, this won't just go
    away by itself -- we want the test to actually fail instead of getting
    stuck in an eternal "retry on temporary failures" loop.
  * schroot: Don't fail on stderr of schroot as long as it succeeds.
    (LP: #1637898)
  * qemu: Hide detected udev file system properties on /dev/baseimage.
    (Closes: #842299)

  [ Simon McVittie ]
  * VirtSubproc: open arbitrary files in binary mode.
  * VirtSubproc: if check_exec status is nonzero, include stderr in message.
  * qemu: put the shared directory in /run. If the virtual machine's root
    filesystem is read-only, we won't be able to create /autopkgtest.
  * qemu: Move eofcat into /tmp. This avoids having to write it to /bin, which
    might be read-only. Re-create eofcat on every boot for this.
  * source_rules_command: log the result we got if it is not as expected
    (Closes: #842302)
  * Add 'needs-reboot' restriction. This allows tests to be explicit about
    needing to reboot the machine, rather than assuming that
    'isolation-machine' is enough. It is plumbed into the existing 'reboot'
    capability, which is distinct from 'isolation-machine'.
    (Closes: #842300)
  * Add --setup-commands-boot for commands that must be run at every boot.
    This can be used for doing "mount -o remount,rw /" before any dpkg
    operation, or transient setup like writing files into /run/.
    (Closes: #842091)

 -- Martin Pitt <email address hidden> Tue, 01 Nov 2016 23:12:55 +0200

Changed in autopkgtest (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote :

I just checked sbuild-launchpad-chroot and those messages aren't errors, they are merely normal schroot log messages.

When a chroot file isn't found, we print the "doesn't exist" message to stdout and exit 0 which seems absolutely appropriate behavior.

Changed in sbuild-launchpad-chroot (Ubuntu):
status: New → Invalid
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.