1182.1.29
by Scott James Remnant
Bump copyright years |
1 |
Merge 1216.1.1 from Ubuntu (reload command), add test case. |
2 |
||
3 |
__abort_msg should be weak or changed |
|
4 |
||
5 |
||
6 |
||
1163
by Scott James Remnant
* README: Update requirements. |
7 |
0.6.x series: |
1024
by Scott James Remnant
* TODO: Update. |
8 |
|
9 |
* going into runlevel S from !S, need to stty console |
|
10 |
* going into 6, 0 or 1, need to stty console |
|
11 |
* reset console before S process |
|
12 |
||
1182.1.7
by Scott James Remnant
* TODO: Update |
13 |
* we should mark fds and sockets close-on-exec when we create them, rather |
14 |
than later |
|
15 |
* the fork() pipe should be close-on-exec rather than closing it in the |
|
16 |
child
|
|
17 |
||
1163
by Scott James Remnant
* README: Update requirements. |
18 |
* init needs to grow "utmp XXX", which maintains INIT_PROCESS and |
19 |
DEAD_PROCESS entries for the given ut_id (3 chars max), used for getty |
|
20 |
||
21 |
For that we'll probably need to support ${..#...} so that we can do |
|
22 |
utmp ${TTY#tty} |
|
1012
by Scott James Remnant
* TODO: Update. |
23 |
|
24 |
* There's a lot of complicated code that's pretty much duplicated between |
|
25 |
event_pending_handle_jobs(), job_class_start(), job_class_stop(), |
|
1016
by Scott James Remnant
* dbus/com.ubuntu.Upstart.Job.xml (GetInstance): Add method to get |
26 |
job_class_restart(), job_class_get_instance() and to a lesser extent, |
27 |
job_start(), job_stop() and job_restart(). We should make an effort to |
|
28 |
reduce this to common functions, which may become easier as we rationalise |
|
29 |
the behaviour anyway. |
|
1012
by Scott James Remnant
* TODO: Update. |
30 |
|
31 |
* It may be useful to not just have failed=TRUE/FALSE for job_finished() but a |
|
32 |
more detailed reason about why the job is being unblocked, so the command |
|
33 |
could exit saying "ok", "failed", "stopped by event", etc. |
|
34 |
||
35 |
* It would also be nice, in the case of a job having failed, to be able |
|
36 |
to include the event-like information in the error. This should be |
|
37 |
possible, it just needs a marshalling function? (Maybe we should be able |
|
38 |
to generate those) |
|
39 |
||
1163
by Scott James Remnant
* README: Update requirements. |
40 |
* Information about what caused a job to stop (failed information or event) |
41 |
should be available to other jobs, and to the job's post-stop script. |
|
42 |
||
1012
by Scott James Remnant
* TODO: Update. |
43 |
* I'm still not convinced that just clearing blocking is the right approach, |
44 |
and still think we need some kind of next_blocking list of things that |
|
45 |
will still be blocked next time around. Restores some of the older |
|
46 |
behaviour in that "start" will block until stopped, and fail with the |
|
47 |
fact it was stopped. |
|
48 |
||
938
by Scott James Remnant
* TODO: Update. |
49 |
* Need to add dependencies to jobs, which are files that must exist before |
50 |
the job can be started (because Debian/Ubuntu like to litter config files |
|
51 |
like jobs) |
|
52 |
||
53 |
* Resources, "uses cpu 1.0" -- where cpu has a defined max (default 1.0); |
|
54 |
which state do we keep it in while it's waiting? |
|
55 |
||
56 |
||
57 |
Later: |
|
58 |
||
991
by Scott James Remnant
* TODO: Update. |
59 |
* Restore serialisation of state between upstart processes, I guess we'll |
60 |
use a D-Bus API to do this. Most sense would be a peer-to-peer D-Bus |
|
61 |
connection so don't need the bus (think initramfs), but we also need |
|
62 |
to pass over the bus connection so we don't drop that. |
|
63 |
||
64 |
- Pass the Event queue first since Jobs refer to it |
|
65 |
- Register each ConfSource, ConfFile, JobClass and Job, setting |
|
66 |
the status of each |
|
67 |
- Join up the Event queue and Job structures |
|
68 |
||
69 |
- What about commends blocked on event emissions or jobs? |
|
70 |
||
938
by Scott James Remnant
* TODO: Update. |
71 |
|
72 |
Anytime: |
|
73 |
||
611
by Scott James Remnant
* TODO: Update. |
74 |
* Iterating through every Job's start and stop events is messy; we should |
75 |
have some kind of match lookup table to make it easier. |
|
76 |
||
77 |
* Likewise iterating through all the Jobs to find a pid is messy; we |
|
938
by Scott James Remnant
* TODO: Update. |
78 |
should have a lookup table for these too. Ideally we'd have a JobProcess |
79 |
structure combining type, pid and a link to the job -- then all the |
|
80 |
job_process_* functions would just accept those |
|
611
by Scott James Remnant
* TODO: Update. |
81 |
|
938
by Scott James Remnant
* TODO: Update. |
82 |
* system_setup_console is due for an overhaul as well; especially if |
571
by Scott James Remnant
* TODO: Big update. |
83 |
we want to be able to pass file descriptors in. Am somewhat tempted |
84 |
to add a magic CONSOLE_DEFAULT option which tries fd, logging, null, |
|
1012
by Scott James Remnant
* TODO: Update. |
85 |
etc. |
571
by Scott James Remnant
* TODO: Big update. |
86 |
|
87 |
* We always want /dev/fd/NNN to be /dev/fd/3, we should have some way |
|
88 |
to instruct process_spawn to do that. |
|
89 |
||
611
by Scott James Remnant
* TODO: Update. |
90 |
* We may need to KILL scripts, e.g. post-start; especially when the goal |
91 |
changes. Or perhaps just after a timeout? |
|
92 |
||
93 |
* May need a way to force ignoring of the KILL signal, and assuming that |
|
94 |
a job that won't die really has. |
|
95 |
||
133
by Scott James Remnant
* TODO: Update. |
96 |
* Get the LANG environment variable somehow. |
97 |
||
98 |
||
99 |
Future Features: |
|
100 |
||
869
by Scott James Remnant
* TODO: Update. |
101 |
* Roles; services define roles that they can perform ("web server") and |
102 |
can be found by their role. Other jobs could require that a role be |
|
103 |
performed for them to start (creeping into deps here). Use affinity |
|
104 |
tags to work out which of many services to start. |
|
717
by Scott James Remnant
* TODO: Update. |
105 |
|
133
by Scott James Remnant
* TODO: Update. |
106 |
* Per-user services; will need to use PAM to set up the session. |
107 |
We want to do this for "root-user services" but not for jobs/tasks |
|
108 |
||
869
by Scott James Remnant
* TODO: Update. |
109 |
* Passing of file descriptors from event over control socket. |
133
by Scott James Remnant
* TODO: Update. |
110 |
|
731
by Scott James Remnant
* TODO: Update. |
111 |
* Register jobs over the control socket, ideal way is to register some kind |
112 |
of automatic source and attach them to that. |
|
133
by Scott James Remnant
* TODO: Update. |
113 |
|
114 |
* Temporal events ("15m after startup") |
|
115 |
||
116 |
* Scheduled times ("every day at 3:00") |
|
117 |
||
118 |
* Load average checking, maybe have separate CPU, Network and I/O |
|
869
by Scott James Remnant
* TODO: Update. |
119 |
stats? See also resources. |
133
by Scott James Remnant
* TODO: Update. |
120 |
|
391
by Scott James Remnant
* TODO: Big update; strip anything we have a spec for. |
121 |
* Actions: "reload" and optional replacements for "stop", "start", etc. |
640
by Scott James Remnant
* TODO: Update. |
122 |
|
123 |
This is mostly just a matter of deciding policy for when they can be run, |
|
124 |
and adding "user processes" onto the end of the job->process array. |
|
125 |
||
126 |
* Alternative script interpreters; "start script python". |
|
127 |
||
128 |
Would be done by making script a char *, and putting the interpreter into |
|
129 |
command? |
|
662
by Scott James Remnant
* TODO: Update. |
130 |
|
681
by Scott James Remnant
* TODO: Update. |
131 |
* Watershed jobs (this actually might apply to events, since you might |
132 |
want to try starting again if a particular event has come in since you |
|
133 |
were last started) |