Merge lp:~clint-fewbar/upstart-cookbook/clarify-complex-start-stop into lp:upstart-cookbook

Proposed by Clint Byrum
Status: Merged
Merged at revision: 129
Proposed branch: lp:~clint-fewbar/upstart-cookbook/clarify-complex-start-stop
Merge into: lp:upstart-cookbook
Diff against target: 32 lines (+10/-8)
1 file modified
upstart_cookbook.rst (+10/-8)
To merge this branch: bzr merge lp:~clint-fewbar/upstart-cookbook/clarify-complex-start-stop
Reviewer Review Type Date Requested Status
Upstart Documenters Pending
Review via email: mp+90379@code.launchpad.net

Description of the change

This rewrites the section to be more comprehensible and better reflect the way that complex conditions are handled.

To post a comment you must log in.
130. By Clint Byrum

bolding important phrase

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'upstart_cookbook.rst'
2--- upstart_cookbook.rst 2012-01-19 18:36:17 +0000
3+++ upstart_cookbook.rst 2012-01-27 07:15:29 +0000
4@@ -7172,18 +7172,20 @@
5 ---------------------------------------
6
7
8-The ``and`` and ``or`` operators allowed with ``start on`` and ``stop on`` do
9-not work intuitively: operands to the right of either operator are only
10-evaluated once and state information is then discarded. This can lead to jobs
11-with complex ``start on`` or ``stop on`` conditions not behaving as expected
12+The ``and`` and ``or`` operators allowed with ``start on`` and ``stop on``
13+do not work intuitively: operands to the right of either operator are only
14+evaluated when the specified event is emitted. This can lead to jobs with
15+complex ``start on`` or ``stop on`` conditions not behaving as expected
16 when restarted. For example, if a job specifies the following condition::
17
18 start on A and (B or C)
19
20-When "``A``" and "``B``" become true, the condition is satisfied so the job
21-will be run. However, if the job ends and subsequently "``A``" and "``C``"
22-become true, the job will *not* be re-run even though the condition is
23-satisfied.
24+When the events "``A``" and "``B``" are processed, the condition is
25+satisfied so the job will be run. If the job fails to start, or is stopped
26+later, there is no guarantee that "``A``" will be emitted again, and the
27+fact that it happened before **is not known to upstart**. Meanwhile,
28+"``C``" or "``B``" may ocurr, and the job will *not* be transitioned
29+back to a start goal, until "``A``" is emitted again.
30
31 Advice
32 ~~~~~~

Subscribers

People subscribed via source and target branches