Add wait for start jobs 37/25037/4
authorScott Murray <scott.murray@konsulko.com>
Tue, 21 Jul 2020 02:04:11 +0000 (22:04 -0400)
committerScott Murray <scott.murray@konsulko.com>
Thu, 23 Jul 2020 01:55:35 +0000 (21:55 -0400)
The systemd job to start an application unit may remain queued long
enough after a call into the systemd D-Bus API that the subsequent
state check sees the unit as still inactive.  This results in the
application start being incorrectly reported as having failed, when
it will still actually proceed once the job is dequeued and run in
systemd.

To fix this, checking of the state of the job object returned by the
start D-Bus calls has been added in the various wrapper functions in
src/utils-systemd.c.  The timeout mechanism used in the new job_wait
helper function is based on the existing state checking logic of the
wait_state_stable function in src/afm-urun.c.

Bug-AGL: SPEC-3365, SPEC-3427, SPEC-3457

Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I01077a4213944233506518869c3dc604bd40f693


No differences found