With Chris's help we got the tests to get past the D-Bus errors on Zesty
by creating a file /etc/polkit-1/localauthority/50-local.d/manage-
units.pkla on the test system with the following contents:

    # Allow the "ubuntu" user to manage systemd units unconditionally
for testing

    [Allow manage-units]
    Identity=unix-user:ubuntu
    
Action=org.freedesktop.systemd1.manage-units;org.freedesktop.systemd1.manage-unit-files
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes

(It turned out that manage-unit-files was also needed to enable/disable
services).  This basically instructs polkitd to tell systemd that it is
okay for the "ubuntu" user to manage system services without having to
re-enter their password.  Assuming that's what you expect while running
the tests, the CI scripts should be updated to add this file to the
container.

There shouldn't be any need to special case this for Zesty: it should be
fine to create the .pkla file on older releases too.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1665160

Title:
  MachineSuite.TestMachineWorkers timed out waiting for workers zesty
  because dbus is in interactive mode

To manage notifications about this bug go to:
https://bugs.launchpad.net/juju/+bug/1665160/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to