Skip to content

Commit d540d4d

Browse files
committed
Update Mirror documentation with --propagate option
Re GH#353
1 parent 4e58e99 commit d540d4d

4 files changed

Lines changed: 44 additions & 2 deletions

File tree

docs/glossary.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ Glossary
16891689
as this may lead to undesired behaviour, including deadlocks.
16901690

16911691
`Only one mirror attribute is allowed per node`, and each attribute is
1692-
defined by the following properties:
1692+
defined by the following options:
16931693

16941694
- :code:`name`, an identifier
16951695
- :code:`remote_path`, the path of the node on the remote ecFlow server
@@ -1698,6 +1698,7 @@ Glossary
16981698
- :code:`ssl`, to connect to the ecFlow server using SSL
16991699
- :code:`polling`, the value (in seconds) used to periodically contact the remote ecFlow server
17001700
- :code:`auth`, the location to the Mirror authentication credentials file
1701+
- :code:`propagate`, to enable the propagation of the remote node state up the tree of local nodes
17011702

17021703
.. warning::
17031704

docs/python_api/reference/MirrorAttr.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ Returns the name of the Mirror attribute
5555
Returns the polling interval used to contact the remove ecFlow server
5656

5757

58+
.. py:method:: MirrorAttr.propagate(self: ecflow.MirrorAttr) -> bool
59+
:module: ecflow
60+
61+
Returns a boolean, where true means the Node state is propagated up the Node tree
62+
63+
5864
.. py:method:: MirrorAttr.remote_host(self: ecflow.MirrorAttr) -> str
5965
:module: ecflow
6066

docs/ug/cookbook/how_to_mirror_a_remote_task.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ at :term:`suite` level:
6868
Variables that are referred in trigger expressions *must* be defined, as a placeholder
6969
for variables that eventually get synchronised.
7070

71+
.. note::
72+
73+
By default, only the mirrored task's own state is updated; parent families and triggers
74+
are unaffected. To propagate the mirrored state up the local node tree and cause dependent
75+
triggers to fire, add the ``--propagate`` option::
76+
77+
mirror --name A --remote_path /s1/f1/t1 ... --ssl --propagate
78+
79+
Use ``--propagate`` only when you explicitly want state changes on the mirrored task to
80+
drive the evaluation of triggers on its parent families.
81+
7182
Deploy the Suite with a `mirrored` Task
7283
=======================================
7384

docs/ug/user_manual/text_based_suite_definition/external/mirror.rst

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ This defines a :term:`mirror` attribute, which synchronizes the status of a
77
:term:`node` between a local and a remote ecFlow server. The options defining
88
the attribute can be provided in any order.
99

10+
The :term:`mirror` attribute is defined by the coordinates to the remote :term:`node` to be mirrored, including the
11+
remote :term:`node` path, the remote host name, the remote port number; and the polling interval in seconds.
12+
Furthermore, the option :code:`--ssl` enables the use of a Secure connection and the option :code:`--auth` can be used
13+
to provide the authentication credentials for the remote ecFlow server.
14+
1015
.. code-block:: shell
1116
1217
task t1
13-
mirror --name A --remote_path /s/f/tA --remote_host host --remote_port 3141 --polling 20 --ssl --auth /path/to/auth.json
18+
mirror --name A --remote_path /s/f/tA --remote_host host --remote_port 3141 --polling 300 --ssl --auth /path/to/auth.json
1419
1520
task t2
1621
aviso --name B --remote_path /s/f/tB
@@ -20,6 +25,25 @@ the attribute can be provided in any order.
2025
# --polling %ECF_MIRROR_POLLING%
2126
# --auth %ECF_MIRROR_AUTH%
2227
28+
29+
By default, the :term:`mirror` attribute will not propagate the state of the remote :term:`node` to the local node tree,
30+
and only the actual associated local :term:`node` will see its state updated.
31+
The option :code:`--propagate` can be used to enable the propagation of the remote :term:`node` state to the local node
32+
tree.
33+
34+
.. code-block:: shell
35+
36+
task t1
37+
mirror --name A --remote_path /s/f/tA --remote_host host --remote_port 3141 --polling 300 --propagate
38+
39+
40+
.. note::
41+
The ``--polling`` value (in seconds) controls how often the local ecFlow
42+
server contacts the remote server. Lower values reduce latency but
43+
have impact on the remote server as the network traffic increases.
44+
A value of 300 seconds is considered suitable for most cases, and a minimum
45+
of 60 seconds being imposed to avoid overloading the remote server.
46+
2347
The Authentication credentials, provided via option :code:`--auth`, are
2448
provided in a `JSON` file with the following content:
2549

0 commit comments

Comments
 (0)