← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2103695] Re: autopkgtest runner does not run a systemd user instance

 

It looks like other virt servers log you in again after installing the
dependencies, because there I find pulseaudio already started, or at
least socket-activatable, while I do not in Ubuntu infra (even after
exporting XDG_RUNTIME_DIR with the right location). Testing locally in a
container, `pulseaudio.service` and `pulseaudio.socket` get auto-enabled
on apt install but not auto-started, which is why I believe there is a
second log-in happening after installing.

-- 
You received this bug notification because you are a member of
Canonical's Ubuntu QA, which is subscribed to Auto Package Testing.
https://bugs.launchpad.net/bugs/2103695

Title:
  autopkgtest runner does not run a systemd user instance

Status in Auto Package Testing:
  Won't Fix

Bug description:
  Both autopkgtest-virt-lxd and autopkgtest-virt-qemu, as well as
  debian's infra autopkgtest runners, have a systemd user session
  instance running during the test; this is evidenced by the fact that
  `$XDG_RUNTIME_DIR` is set, and you can talk to it with `systemctl
  --user` commands.

  Ubuntu's infrastructure instead does not have a systemd user instance
  running, creating a divergence in the test environment.

  Here's the most minimal reproducer:

     dget https://launchpad.net/~aleasto/+archive/ubuntu/tests/+sourcefiles/empty/1.0/empty_1.0.dsc
     autopkgtest ./empty_1.0.dsc -- qemu autopkgtest-plucky-amd64.img

  where autopkgtest-plucky-amd64.img is generated by autopkgtest-
  buildvm-ubuntu-cloud.

  The test runs the following script:

     echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR"
     systemctl --user status

  The test passes locally, but not on ubuntu's infrastructure. Here's a log from my ppa:
  https://autopkgtest.ubuntu.com/results/autopkgtest-plucky-aleasto-tests/plucky/amd64/e/empty/20250319_161854_94e24@/log.gz

  Expected result:

  autopkgtest [10:03:00]: test test-systemd-user: [-----------------------
  XDG_RUNTIME_DIR=/run/user/1000
  ● autopkgtest
      State: running
      Units: 133 loaded (incl. loaded aliases)
       Jobs: 0 queued
     Failed: 0 units
      Since: Thu 2025-03-20 10:03:01 CET; 136ms ago
    systemd: 257.4-1ubuntu1
    Tainted: unmerged-bin
     CGroup: /user.slice/user-1000.slice/user@1000.service
             └─init.scope
               ├─15648 /usr/lib/systemd/systemd --user
               └─15650 "(sd-pam)"

  Actual result:

  autopkgtest [16:18:34]: test test-systemd-user: [-----------------------
  XDG_RUNTIME_DIR=
  Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

To manage notifications about this bug go to:
https://bugs.launchpad.net/auto-package-testing/+bug/2103695/+subscriptions



References