[Bug 1665160] Re: MachineSuite.TestMachineWorkers timed out waiting for workers zesty because dbus is in interactive mode
James Henstridge
james.henstridge at canonical.com
Thu Apr 20 02:00:43 UTC 2017
Anastasia asked me to take a look at this. I'm still not sure what the
underlying cause is, but here is some of what I've discovered so far.
1. There has been a change in policykit-1 that sounds like it might be
relevant. Namely:
[ Martin Pitt ]
* Use PAM's common-session-noninteractive modules for pkexec instead of
common-session. The latter also runs pam_systemd (the only difference
normally) which is a no-op under the classic session-centric
D-BUS/graphical login model (as it won't start a new one if it is already
running within a logind session), but very expensive when using
dbus-user-session and being called from a service that runs outside the
PAM session. This causes long delays in e. g. gnome-settings-daemon's
backlight helpers. (LP: #1626651)
So if something is being run by pkexec, it is no longer executing
pam_systemd.so. That module is responsible for registering with logind,
setting up the user bus, etc.
So it seems possible that there is some code in the test suite that
looked like it was running under an interactive user session on Xenial,
but doesn't any more on Zesty.
2. The default policies for systemd1.manage-units haven't changed
between versions. In both cases, it reads:
<action id="org.freedesktop.systemd1.manage-units">
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
So it is possible that the test works on previous versions by piggy
backing off a previous authorisation via auth_admin_keep. If we look
like a non-interactive invocation on Zesty, we may need authentication
every time now.
3. Maybe we can bypass all of this by configuring the polkit local
authority to allow the test process to manage units unconditionally.
This would work for all versions irrespective of whether we look like an
interactive session.
This would involve placing a policy file under
/etc/polkit-1/localauthority/50-local.d before running the tests.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1665160
Title:
MachineSuite.TestMachineWorkers timed out waiting for workers zesty
because dbus is in interactive mode
Status in juju:
Incomplete
Status in juju 2.1 series:
Won't Fix
Status in dbus package in Ubuntu:
New
Bug description:
As seen at
http://reports.vapour.ws/releases/issue/5768c750749a563f2d7daa6e
A unit test is exclusively failing on our new zesty machine. the
previous issues is not related to the zesty falures
machine-0: has workers [agent api-address-updater api-caller api-config-watcher disk-manager log-forwarder log-sender logging-config-updater machine-action-runner machiner migration-fortress migration-inactive-flag migration-minion proxy-config-updater reboot-executor ssh-authkeys-updater state-config-watcher storage-provisioner termination-signal-handler unconverted-api-workers upgrade-check-flag upgrade-check-gate upgrade-steps-flag upgrade-steps-gate upgrader]
machine-0: waiting for [unit-agent-deployer]
machine-0: unexpected []
machine-0: report:
{}
machine_test.go:1272:
WaitMatch(c, matcher.Check, coretesting.LongWait, s.BackingState.StartSync)
engine_test.go:234:
c.Fatalf("timed out waiting for workers")
... Error: timed out waiting for workers
To manage notifications about this bug go to:
https://bugs.launchpad.net/juju/+bug/1665160/+subscriptions
More information about the foundations-bugs
mailing list