TODO 5.0 KB

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