Comment 9 for bug 1665160

Revision history for this message
James Henstridge (jamesh) wrote :

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.