summaryrefslogtreecommitdiffstats
path: root/src/utils-systemd.h
AgeCommit message (Collapse)AuthorFilesLines
2020-07-22Add wait for start jobsScott Murray1-0/+6
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
2020-05-19Improve use of systemd's statesJosé Bollo1-7/+12
A better handling of systemd state is need to treat correctly transient states. That change includes: - Management of states with numeric identifiers instead of names - Handling of the state "inactive" as a stable state. Most of previous seen problems were coming from that miss. - Returning no error but also no info on the process if it falled to "inactive" meaning that it stopped quickly. Bug-AGL: SPEC-3323 Change-Id: Ibf35eb6257c5583596d675cad0bec2869f5fd5f7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2020-01-08Update copyrightJosé Bollo1-1/+1
Change-Id: I1d68e07563d9f0f139d1bc8128e09a5da0a648af Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2019-02-07Update date in copyrightssandbox/scottrif29/scottdocsJosé Bollo1-1/+1
Change-Id: Ie2ff321f78c59913373e2ffb2820297fd423d6f4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2018-02-28Update date of copyright noticesJosé Bollo1-1/+1
Change-Id: Ia4ef2a6e3c07616ccd756933a82f0806844c4faf Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-11-24utils-systemd: Offer way to set systemd's busesJosé Bollo1-0/+4
Change-Id: I8035c10e8f769b7912046b432d43f97297c039b2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-06-23Fix socket (de)activation at (de)installJosé Bollo1-0/+2
When installing or deinstalling, it is needed to issue a "systemctl (--user) restart sockets.target" This patch implement it on user side. To be improved. Change-Id: I152eb6a1cf5df50b1fe3143837d6d42ee6619349 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: implement start/stop of unitsx-first-with-systemdJosé Bollo1-0/+20
This implementation is very basic and must be improved. Change-Id: Id1540e646c83285c61849092bbd8fb645c0954ed Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: provide enumeration of unitsJosé Bollo1-0/+4
This enumeration is based on the filesystem, units are listed from the configured directory. This is necessarily because not all units can be loaded by systemd but all can be started. Change-Id: Ic4d1331c8c54f5bbaa747ff8084da2b0c5a65c55 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17Emits reload to systemd when neededJosé Bollo1-0/+1
The current implementation enforce the reload when a 'wants' target is created or deleted. This should work well for system units. However, for system units, this behaviour isn't enought when more that a user is active because only the user that installs the application will be updated. For this reason, a paralelle mechanism has to be defined. Also note that systemd is henceforth required for tools because wgtpkg-installer needs it now. Change-Id: I4fc03a44dbc58c2374ea21dbf6b436f646d04e00 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
2017-03-17utils-systemd: introduction of systemd interfaceJosé Bollo1-0/+24
Isolate the interface to systemd. Change-Id: I03ea654da9fab2df0e6eec980b0e5623487d1b73 Signed-off-by: José Bollo <jose.bollo@iot.bzh>