Convert system_error to service_load_exc in load_service.
[oweals/dinit.git] / TODO
diff --git a/TODO b/TODO
index a1b0d8b20e9151d7dcf898ae7f3100cdc28cb25e..ce8feb93cfef00cc9b21464162baaac68f79672d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,25 +1,37 @@
-* shutdown command presently hangs if terminal output blocked (scroll lock
-  via ^S). Should use a buffer as dinit does, and pipe output from subcommands
-  via the buffer too.
-
-* Document utilities (particularly dinitctl) in the README
+For version 0.7.0:
+------------------
+* dinitctl: Warn when stopping a service would cause a dependent to stop. Require a force flag to
+  proceed [done]
+* dinitctl: implement "restart" command [done]
+* Get rid of "floating" service state [done]
 
+For version 0.8.0:
+------------------
+* Easy way to reload service description (including if service is running, where possible).
+* provide a way to check configuration for errors (maybe a dinitctl command)
+  - eg. check a service and all dependencies.
+* report process launch failure reason (stage & errno) via dinitctl.
+* "chain-to" can result in an unbreakable loop if the chain is circular. Chained services should not be
+  started during shutdown to prevent this (also avoids a race condition where the chained service is left
+  running when everything else has shutdown).
+* Show "activated" state in "dinitctl list" output
 
 For version 1.0:
 ----------------
-* Documentation including sample service definitions
-  - Man pages
-* Better error handling, logging of errors (largely done, still some patches
-  of code where it may be missing - check TODO's in code).
-* Write wtmp entry on startup (see simpleinit)
-* Allow running services as a different UID
-* Must be able to specify kill timeout (after which kill -9!)
-* Must rate-limit restart of services. Trying to start at a greater rate
-  should trigger failed-to-start notification.
+* Limit memory use by control connections. Currently clients can queue commands without limit.
+* Consider using mlockall (if system process).
+* Dinitctl command to get full status of a service.
 * "triggered" service type: external process notifies Dinit when the service
-  has started.
-* Ability to reload stopped services (reload service description)
-
+  has started. (maybe?)
+  - key thing is we want some way to eg mount filesystem once the disk comes up,
+    configure network when device comes up, etc, potentially relying an an external
+    tool/daemon.
+* on shutdown, after repeated intervals with no activity, display information
+  about services we are waiting on (or, do this when prompted via ^C or C-A-D).
+* Documentation must be complete (see section below).
+* Proper support for socket activation?
+* Chaining of service process input/output?
+* Be able to boot and shutdown Linux and FreeBSD (or OpenBSD).
 
 For later:
 ----------
@@ -31,34 +43,27 @@ For later:
    system initialisations that can't or shouldn't really be "undone" and so do
    not need to be re-done).
 * Internationalisation
-* More logging options. Can currently log to syslog only (well, with the
-  syslog protocol, to /dev/log). Possibly should be able to log directly
-  to a file, or input stream of another process.
 * A service can prevent shutdown/reboot by failing to stop. Maybe make
   multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
   immediate shutdown (or launch a simple control interface).
-* Interruptible scripted services - where it's ok to terminate the start
-  script with a signal (and return the service to the STOPPED state). So a long-
-  running filesystem check, for instance, need not hold up shutdown.
 * When we take down a service or tty session, it would be ideal if we could kill
-  the whole process tree, not just the leader process.
-* Investigate using cn_proc netlink connector (cn_proc.h) to receive process
-  termination events even when running with PID != 1 (Linux only).
-  Also, there is the possibility of having a small, simple PID-1 init which
-  sends terminated process IDs over a pipe to Dinit. Finally, it may be possible
-  to run dinit (and subprocesses) in a new PID namespace (again linux-only).
+  the whole process tree, not just the leader process (need cgroups or pid
+  namespace or other mechanism).
 * Allow logging tasks to memory (growing or circular buffer) and later
   switching to disk logging (allows for filesystem mounted readonly on boot).
   But perhaps this really the responsibility of another daemon.
 * Allow running services with different resource limits, chroot, cgroups,
   namespaces (pid/fs/uid), etc
-* Make default control socket location build-time configurable
-* Allow specifying a timeout for killing services; if they don't die within
-  the timeout (after a TERM) then hit them with a KILL.
-* A (perhaps limited) way(s) to modify a service description after it is loaded -
-  eg add/remove dependencies, change properties.
+* Support chaining service output to another process (logger) input; if the
+  service dies the file descriptor of its stdout isn't closed and is reassigned
+  when the service is restarted, so that minimal output is lost.
+  - even more, it would be nice if a single logger process could be responsible
+    for receiving output from multiple services. This would require some kind of
+    protocol for passing new output descriptors to the logger (for when a
+    service starts).
 
 Even later / Maybe never:
+-------------------------
 * Support recognising /etc/init.d services automatically (as script services, with
   no dependency management - or upstart compatible dependency management)
   Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
@@ -75,20 +80,6 @@ Even later / Maybe never:
 
 
 Documentation:
+--------------
 * Design philosophy/rationale document
-* Coding style guidelines
-
-* What's the best TERM setting? gogetty gives me "linux" but I think other variants may be
-  better (eg "linux-c").
-
-* Figure out the ConsoleKit/logind / PolicyKit mess & how dinit needs to fit into it.
-  * Consolekit/logind tracks "sessions". Provides a mechanism to mark a session starting,
-    associates processes with sessions, provides calls to terminate sessions etc (why?!!)
-    Can use environment variable or cgroups to track processes in a session.
-    A PAM module exists to create/destroy sessions.
-  * Consolekit/logind also allows for requesting shutdown, reboot, and inhibiting reboot
-    (via dbus API).
-  * "seats" are a set of input/output hardware (mouse/keyboard/monitor) on which a session
-    can be run. You can have multiple sessions on a seat - one is in the foreground
-    (eg linux virtual ttys implement multiple sessions on a single seat).
-    Sessions can run without a seat (eg ssh session).
+* More system integration documentation?