TODO 4.4 KB

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