BUILD: explain the USE_UTMPX option a little better
[oweals/dinit.git] / TODO
1 For version 0.8.0:
2 ------------------
3 * provide a way to check configuration for errors (dinitcheck command) [DONE]
4 * Easy way to reload service description (including if service is running, where possible). [DONE]
5
6 For version 0.9.+:
7 ------------------
8 * for non-system init, fail if the control socket exists, with option to override this and re-
9   create the socket instead (as system init does).
10 * Check that desired_state is getting set correctly. (Currently we don't decide whether a service
11   will restart until it stops...)
12 * report process launch failure reason (stage & errno) via dinitctl.
13 * "chain-to" can result in an unbreakable loop if the chain is circular. Chained services should not be
14   started during shutdown to prevent this (also avoids a race condition where the chained service is left
15   running when everything else has shutdown).
16 * Show "activated" state in "dinitctl list" output
17 * Service description sanity checks:
18   - Service type not specified
19     - maybe default to 'internal' if command not specified
20     - if command specified but type not, report an error
21     - other checks?
22   - errors should also be reported by dinitcheck
23
24 For version 1.0 (i.e. longer-term plans):
25 -----------------------------------------
26 * Service description parse errors should report line number
27 * dinitcheck should perform lint checks - do named files exist? etc
28 * Limit memory use by control connections. Currently clients can queue commands without limit.
29 * Consider using mlockall (if system process).
30 * Dinitctl command to get full status of a service.
31 * "triggered" service type: external process notifies Dinit when the service
32   has started. (maybe?)
33   - key thing is we want some way to eg mount filesystem once the disk comes up,
34     configure network when device comes up, etc, potentially relying an an external
35     tool/daemon.
36 * on shutdown, after repeated intervals with no activity, display information
37   about services we are waiting on (or, do this when prompted via ^C or C-A-D).
38 * Documentation must be complete (see section below).
39 * Proper support for socket activation?
40 * Chaining of service process input/output?
41 * Be able to boot and shutdown Linux and FreeBSD (or OpenBSD).
42
43 For later (post 1.0):
44 ---------------------
45 * On linux when running with PID != 1, write PID to /proc/sys/kernel/cad_pid so
46   that we still receive SIGINT from ctrl+alt+del (must be done after /proc is
47   mounted, possibly could be left to a service script)
48 * Perhaps need a way to prevent script services from re-starting.
49   (eg there's no need to mount filesystems twice; there might be various other
50    system initialisations that can't or shouldn't really be "undone" and so do
51    not need to be re-done).
52 * Internationalisation
53 * A service can prevent shutdown/reboot by failing to stop. Maybe make
54   multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
55   immediate shutdown (or launch a simple control interface).
56 * When we take down a service or tty session, it would be ideal if we could kill
57   the whole process tree, not just the leader process (need cgroups or pid
58   namespace or other mechanism).
59 * Allow logging tasks to memory (growing or circular buffer) and later
60   switching to disk logging (allows for filesystem mounted readonly on boot).
61   But perhaps this really the responsibility of another daemon.
62 * Allow running services with different resource limits, chroot, cgroups,
63   namespaces (pid/fs/uid), etc
64 * Support chaining service output to another process (logger) input; if the
65   service dies the file descriptor of its stdout isn't closed and is reassigned
66   when the service is restarted, so that minimal output is lost.
67   - even more, it would be nice if a single logger process could be responsible
68     for receiving output from multiple services. This would require some kind of
69     protocol for passing new output descriptors to the logger (for when a
70     service starts).
71
72 Even later / Maybe never:
73 -------------------------
74 * Support recognising /etc/init.d services automatically (as script services, with
75   no dependency management - or upstart compatible dependency management)
76   Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
77 * Place some reasonable, soft limit on the number of services to be started
78   simultaneously, to prevent thrashing. Services that are taking a long time
79   to start don't count to the limit. Maybe use CPU/IO usage as a controlling
80   factor.
81 * Cron-like tasks (if started, they run a sub-task periodically. Stopping the
82   task will wait until the sub-task is complete). 
83 * Allow to run services attached to virtual tty, allow connection to that tty (ala "screen").
84 * SystemD-like handling of filesystem mounts (see autofs documentation in kernel)
85   i.e. a mount point gets an autofs attached, and lazily gets mounted when accessed
86   (or is mounted in parallel). Probably put the functionality in a separate daemon.
87
88
89 Documentation:
90 --------------
91 * Design philosophy/rationale document
92 * More system integration documentation?