Update version number, TODO.
[oweals/dinit.git] / TODO
diff --git a/TODO b/TODO
index 05ecf03d92c5776628d13d93b51ee3f908cec63f..97babb0fd42b426bd5c8f1f6e65905ee0863cd6b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,41 +1,21 @@
-* service "active" state is currently a combination of explicit marking and
-  state of dependents. I.e. a service is "active" if it has a running
-  dependent. This means it may restart automatically if it dies for some
-  reason (via normal restart or smooth recovery).
-      However, this is not always ideal. Sometimes the dependent is only
-  running because it is waiting for its own dependents to stop; that is,
-  there is no dependent further down the hierarchy that is explicitly
-  marked active. In that case, we don't really want to restart the service
-  that happened to die (unless and until a dependent becomes active).
-      The key here is to set the desired state to STOPPED earlier. When a
-  service is stopping all its dependencies which aren't otherwise required
-  should also go into STOPPING state (but should not actually start stopping
-  until the dependent is stopped). The means counting the two types of
-  require - require from running service vs require from stopping service -
-  separately.
-
-* 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.5.0:
+------------------
+* Man pages for all programs (done for dinit and dinitctl, not for shutdown/halt etc).
+* The DINIT_ROLLBACK_COMPLETED acknowledgement is never sent, since
+  control_conn_t::rollback_complete() is not currently called. Fix.
+* Write wtmp entry on startup (see simpleinit). Investigate.
+* Support S6-style startup notification (write to fd).
 
 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.
 * "triggered" service type: external process notifies Dinit when the service
-  has started.
-* Ability to reload stopped services (reload service description)
-
+  has started. (maybe?)
+* 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?
+* Be able to boot and shutdown Linux and FreeBSD.
+* Refuse to start new services during shutdown.
 
 For later:
 ----------
@@ -47,34 +27,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).
@@ -91,6 +64,7 @@ Even later / Maybe never:
 
 
 Documentation:
+--------------
 * Design philosophy/rationale document
 * Coding style guidelines