summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Łukasz Stelmach [Wed, 31 May 2017 11:26:39 +0000 (13:26 +0200)]
wip
Change-Id: I44da8f5ff2419e1555c7451404e6fb4f0a3d0f2d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Mon, 22 May 2017 10:04:18 +0000 (12:04 +0200)]
Update TODO
Change-Id: I3a214eff08193ca313e66a5f4f3e1be89abf06c4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Thu, 8 Jun 2017 12:59:50 +0000 (14:59 +0200)]
Implement deserialisation of resource_violation_event
Change-Id: Iac3cee29e78a1099443e29481a603ef624e5159f
Łukasz Stelmach [Fri, 2 Jun 2017 14:45:35 +0000 (16:45 +0200)]
Implement deserialisation of service_failed_event
Allocate service_failed_event and fill it with data loaded from the
database.
Change-Id: Ib3d82e92e6e3c21cc37859aaef443b9b991c06e5
Łukasz Stelmach [Thu, 25 May 2017 15:38:45 +0000 (17:38 +0200)]
database: implement database_load()
Change-Id: Ieb99efe60e1de90ee2103843dcae0ff14ea96104
Krzysztof Opasiak [Wed, 31 May 2017 17:38:38 +0000 (19:38 +0200)]
Use bson instead of void * for passing action data
Change-Id: I43de8f7d1162a5f6824ca404add341b201bbf2e5
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 5 Jun 2017 17:01:12 +0000 (19:01 +0200)]
Add helpers to fill bson with data required for given action
Change-Id: I9ffd9ff03afa054398b571b18e3694d1f3a093a8
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Wed, 31 May 2017 10:32:10 +0000 (12:32 +0200)]
Add helpers for bson manipulation
Change-Id: Iad2cefd42c3322a7d7d9a4fd66f3f939e88d87c7
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Fri, 26 May 2017 15:04:37 +0000 (17:04 +0200)]
Add decision maker to handle all standard services
For now we always cleanup and restart service.
In future we should check the history and reboot platform
after 3 failures of some service.
Change-Id: I76562af73d65ec350f8bd34a8b96545a11e5e1ac
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 5 Jun 2017 16:43:11 +0000 (16:43 +0000)]
Merge "Serialise events to bson format" into tizen
Krzysztof Opasiak [Mon, 5 Jun 2017 16:40:13 +0000 (16:40 +0000)]
Merge "core: Create database adapter module" into tizen
Krzysztof Opasiak [Mon, 22 May 2017 16:49:25 +0000 (18:49 +0200)]
Add VIP service decision maker
Add a decision maker which will reboot the system if VIP
service has entered a failed state
Change-Id: I05bc657bb48b7ba826da922b8d8f6cc1a72a2846
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Fri, 19 May 2017 17:27:36 +0000 (19:27 +0200)]
dm: rv_dm: Request platform reboot if VIP service has a resource leak
Change-Id: Ia6608b7939eadea4a5991f21af5b556277aff0d0
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Fri, 19 May 2017 17:25:25 +0000 (19:25 +0200)]
Add some helper for service type checking
Change-Id: If11034bedd999d52f0dd0f96627c96109b0d66d8
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 22 May 2017 08:54:24 +0000 (10:54 +0200)]
Add faultd config files for test services
Change-Id: Id5def3bed1bdb8804ffebdfd5f942246663319c7
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Fri, 19 May 2017 15:00:16 +0000 (17:00 +0200)]
Serialise events to bson format
Change-Id: Iebe856156ce6e65e3edcaf79952a633d25a1ea6d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Mon, 22 May 2017 10:57:32 +0000 (12:57 +0200)]
core: Create database adapter module
Change-Id: I5a77674ae87defab22a8925b49f4db7f54d97241
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Paweł Szewczyk [Thu, 25 May 2017 13:47:45 +0000 (15:47 +0200)]
Add configuration for currently customized services
Change-Id: I1bee7131990570dd7dc446c9f86072448b5788b0
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Tue, 23 May 2017 12:16:47 +0000 (14:16 +0200)]
Fix copyright notices
Change-Id: I4b38c66de2d478015b5256294d55ab36cbaf9595
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Tue, 23 May 2017 12:03:25 +0000 (14:03 +0200)]
Define _GNU_SOURCE globally in CFLAGS
Change-Id: I0147ac08c961987e9d1ce49b87091955a5e8a35c
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Paweł Szewczyk [Fri, 19 May 2017 09:04:25 +0000 (11:04 +0200)]
service: Add service-related configuration parsing
Introduce service configuration files stored in /etc/faultd/config.d.
Config files are stored in json format, so this adds dependency on
json-c library.
Change-Id: Ibec741d67a563e8a1fb4037459e3acc00081c62c
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
[Fix memory mngnt and split to smaller functions]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Mon, 15 May 2017 08:44:58 +0000 (10:44 +0200)]
Provide serialising function for struct timespec
Provide serialising function for struct timespec as well as macro for
generating such functions.
Change-Id: Ib27477b2be0ab9e6f38f5d1fede477426acb7e80
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Mon, 22 May 2017 10:04:10 +0000 (12:04 +0200)]
Zero allocated event structures
Change-Id: Ic85cf158cb4187400b5ef0a203c36e147ef88de2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 17 May 2017 13:25:07 +0000 (15:25 +0200)]
tests: update db test programme
Change-Id: I66d7dda70e037651f5edd299c3f108f684ab1021
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[Rebase onto current head]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Wed, 17 May 2017 13:16:55 +0000 (15:16 +0200)]
tests: Install the failing test service
Rename also leaker test service to faultd-leaker.
Change-Id: I32bb0502e390d5f555d2695ac539cb444e4c9dae
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[Rebase onto current head]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Wed, 17 May 2017 13:22:27 +0000 (15:22 +0200)]
Report only failed services in the systemd listener
Change-Id: Iec50c0c94e8896eec07cd280bd0cf68c147f6815
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[Rebase onto current head]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Thu, 18 May 2017 14:14:32 +0000 (16:14 +0200)]
module: Add parameter to pass configuration to modules
Change-Id: I728ff341d16bfce9af0b3b3293c8dd1ec6603137
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[Rebase onto current head]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Paweł Szewczyk [Thu, 18 May 2017 12:03:43 +0000 (14:03 +0200)]
service: Change service.name to service.dbus_path
What we called 'name' was actually a dbus path, so 'dbus_path' is a better
name for it.
Change-Id: If85c82e6f9dde703e6c2946e01cdc68e0db5ca7b
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Krzysztof Opasiak [Thu, 18 May 2017 17:22:25 +0000 (19:22 +0200)]
core: service: Use defines instead of hard coded strings
Change-Id: I5f0726b6d6aa71c17d66dd663819e44e7ddbe807
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Thu, 18 May 2017 17:21:53 +0000 (19:21 +0200)]
listeners: systemd: fix: unreference bus and error when it's not needed
Change-Id: Ia88f074aa935745f06af695e08c1586a21751b1b
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Wed, 17 May 2017 20:49:22 +0000 (22:49 +0200)]
Add default implementation of reboot to recovery action
For now it just adds some dummy parameter which has to be
substituted with real parameter name.
Change-Id: Id85abecc785234bac3e916d6139b224ca49e6def
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Wed, 17 May 2017 20:48:45 +0000 (22:48 +0200)]
Add default implementation of system reboot action
Change-Id: Ib6c0f18dc7037bf1b0bc5259bfad023ec00ea330
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Wed, 17 May 2017 20:48:19 +0000 (22:48 +0200)]
Add service recovery action
For now it's only copy-paste of service restart.
Has to be updated in a future.
Change-Id: I5f13b4f6b1b2c9e62752bb598b51bb1d39826055
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 15:36:43 +0000 (17:36 +0200)]
Make tests/leaker a valid systemd service
Change-Id: I572e206454a92ff9bcd828f2f9977b5458b2c5c3
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 11:08:44 +0000 (13:08 +0200)]
Add service restart action implementation
Change-Id: If82d9d6e4083504493f945a7bc5c309e49cbfac4
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 11:07:17 +0000 (13:07 +0200)]
Add helpers and defines for action implementation
Change-Id: Ie0fdc5a965ca9973acff67ac6c6db01604d88aa3
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 15 May 2017 18:56:02 +0000 (20:56 +0200)]
Add action execution framework
This framework is implemented as event handler which handles all
decision made events. Currently it just iterates through the list of
registered builtin action looking for a suitable action to execute.
If action has not been found it just simply fails with error log
and drops the event.
Change-Id: Ib7f36b4b5ce523a78f72ad388611ebfdaba6a2ee
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 15 May 2017 18:53:40 +0000 (20:53 +0200)]
Add dedicated module type for action implementations
Action implementations has to be initialized after action
executor but before decision makers. To acheve this let's
add a new module type in between.
Change-Id: I786f88e3bd24c739ee3f8d6b3a32ddb903854346
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 17:08:13 +0000 (19:08 +0200)]
core: event_processor: Add missing break in list iteration
When we find handler for particular event we should stop list
iteration. Otherwise we may get a NULL pointer dereference.
Change-Id: I33022ea84d8e9e5b0a71cf53f9ad4adb006afb3e
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 19:26:46 +0000 (21:26 +0200)]
util: nqueue: Set fd to -1 after closing eventfd
Unexpected closing of eventfd may be very hard to debug as kernel may
reuse just closed fd number. To avoid queuing new element to queue
with closed eventfd let's invalidate fd in nqueue_cleanup().
Change-Id: I3e9328dfd713fc29d2adbed68dd1a1b35770e6a9
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 18:21:00 +0000 (20:21 +0200)]
util: queue: use list_del_init() instead of list_del() for pop()
Let's use list_del_init() instead of list_del() for queue_pop()
to avoid putting queue element in inconsistent state.
Change-Id: I68f78d6d22315e9f3e716589e70175b471672ebc
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 17:36:35 +0000 (19:36 +0200)]
util: log: fflush() stderr after each log line
Change-Id: Ifaff8c9718edaa54db2a5c051404f0b6bc1490b1
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 16 May 2017 11:08:04 +0000 (13:08 +0200)]
listeners: systemd: Fix typo in log message
Change-Id: Ic5cc188d158bc6ef2d967debef8e7cb5b6874efb
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 15 May 2017 19:18:30 +0000 (21:18 +0200)]
listeners: systemd: Fix printf() format for uint64_t
Change-Id: I7a9ae8e51ef6a97632bdf43790475c18586b3a7a
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Tue, 9 May 2017 10:57:04 +0000 (12:57 +0200)]
Use bson as the event serialisation format
As of this commit faultd depends on ejdb package.
Krzysztof Opasiak [Wed, 10 May 2017 18:37:44 +0000 (20:37 +0200)]
Add dummy serialization function for events
Krzysztof Opasiak [Wed, 10 May 2017 18:34:36 +0000 (20:34 +0200)]
Record boot_id in events
Krzysztof Opasiak [Wed, 10 May 2017 18:33:38 +0000 (20:33 +0200)]
Change naming convention of internal event function
Change the naming convention by adding "_internal" suffix to functions
called by subclasses.
Łukasz Stelmach [Tue, 9 May 2017 09:50:15 +0000 (11:50 +0200)]
Add program to compare ejdb and sqlite performance
Łukasz Stelmach [Tue, 9 May 2017 09:49:46 +0000 (11:49 +0200)]
Add listener to collect events propagated by systemd via dbus
This listener subscribes to DBUS signals generated by systemd
to catch services which entered a failed state.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 09:44:02 +0000 (11:44 +0200)]
Add entity to represent service failure
This type of event should be generated by a listener
when it detects that some service entered a failed state.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 09:42:17 +0000 (11:42 +0200)]
Add a decision maker to restart a service when it leaks resources
This is a very simple decision maker which always restarts
a service if it's leaking resources.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 11:33:48 +0000 (13:33 +0200)]
Add decision made event
This event is generated when some decision maker
made a decision that some action should be executed.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Paweł Szewczyk [Tue, 9 May 2017 09:41:09 +0000 (11:41 +0200)]
Add a simple program to test audit listener
This is just a process which leaks file descriptors.
To test audit listener just run faultd and then this
program.
Krzysztof Opasiak [Tue, 9 May 2017 11:32:52 +0000 (13:32 +0200)]
Add audit listener to catch resource violation events
Krzysztof Opasiak [Tue, 9 May 2017 11:31:47 +0000 (13:31 +0200)]
Add entity to represent resource violation event
Resource violation means that some process is using
more resources than it should.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 09:25:25 +0000 (11:25 +0200)]
Add IDs of predefined faultd actions
Action which can be executed when event arrived is identified
by a string in reverse domain name convention.
faultd will provide implementation of 4 predefined actions.
All other actions can be provided by a plugin mechanism
(to be implemented later)
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 11:29:39 +0000 (13:29 +0200)]
Add system service abstraction
Internally this entity talks with systemd via DBUS to
translate PID to systemd service name.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 11:28:34 +0000 (13:28 +0200)]
Add framework for processing faultd events
For now it's just a simple framework which has a list of
available event handlers each time when event arrives it
iterates through the list to find a volunteer to handle
this event.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Tue, 9 May 2017 11:24:13 +0000 (13:24 +0200)]
Add faultd event entity
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Mon, 8 May 2017 21:04:28 +0000 (23:04 +0200)]
Add tizen packaging
Łukasz Stelmach [Mon, 8 May 2017 21:02:59 +0000 (23:02 +0200)]
Make faultd build
Łukasz Stelmach [Mon, 8 May 2017 21:00:53 +0000 (23:00 +0200)]
Add main faultd file
Krzysztof Opasiak [Mon, 8 May 2017 20:58:22 +0000 (22:58 +0200)]
Add modules infrastructure
Add some infrastructure to make faultd a modular daemon.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 8 May 2017 20:54:07 +0000 (22:54 +0200)]
Add queue with fd notification
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 8 May 2017 20:51:24 +0000 (22:51 +0200)]
Add simple queue implementation
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 8 May 2017 20:50:25 +0000 (22:50 +0200)]
Add simple list implementation based on linux kernel
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Krzysztof Opasiak [Mon, 8 May 2017 20:39:28 +0000 (22:39 +0200)]
Add reference counting helper
Add a helper structure based on kref to simplify memory management.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Mon, 8 May 2017 20:56:21 +0000 (22:56 +0200)]
Add logging infrastructure
Krzysztof Opasiak [Mon, 8 May 2017 20:46:32 +0000 (22:46 +0200)]
Add common macros which can be useful in faultd
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Mon, 8 May 2017 20:48:18 +0000 (22:48 +0200)]
Add codding-style configuration for emacs
Łukasz Stelmach [Mon, 8 May 2017 20:49:16 +0000 (22:49 +0200)]
Add .gitignore
[Add also .orig files as ignored]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Łukasz Stelmach [Mon, 8 May 2017 20:37:02 +0000 (22:37 +0200)]
Add license file
Tizen Infrastructure [Mon, 3 Apr 2017 06:23:29 +0000 (23:23 -0700)]
Initial empty repository