You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
load topology at startup and save each modification to memory and file
This feature allows to load a topology from file at daemon startup,
either from the default folder or from a user selected file, like
polycubed --cubes-dump-enable --cubes-dump-file ~/Desktop/cubes.yaml
keeping the whole configuration in memory.
To enable this feature we need to use the flag --cubes-dump-enable.
After each modification in any of the topology of the cube,
the configuration in memory is updated and another thread saves it
to file updating it too.
It is possible to start the daemon with an empty topology
by using the flag --cubes-dump-clean-init: if the file contains a topology,
at the first update it is overwritten.
--cubes-dump-enable is required when using one of the other two related flags.
Signed-off-by: Riccardo Marchi <riccardo.marchi4@gmail.com>
Copy file name to clipboardExpand all lines: Documentation/polycubed/polycubed.rst
+30-1Lines changed: 30 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,36 @@ If the same parameter is specified in both, the configuration file and the comma
78
78
daemon: true
79
79
#p: 6000 <-- this is NOT supported, only long options are
80
80
81
+
82
+
83
+
Persistency
84
+
^^^^^^^^^^^
85
+
86
+
Polycubed has persistent capabilities which means that (1) it can automatically load the configuration that was present when the daemon was shut down, (2) each time a configuration command is issued, it is automatically dumped on disk.
87
+
This allows polycubed also to recover from failures, such as rebooting the machine.
88
+
To enable this feature we need to start polycubed with the ``--cubes-dump-enable`` flag.
89
+
The daemon keeps in memory an instance of all the topology, including the configuration of each individual service.
90
+
Topology and configuration are automatically updated at each new command; the configuration is also dumped to disk, on file ``/etc/polycube/cubes.yaml``.
91
+
The standard behavior of the daemon at startup is to load, if present, the latest topology that was active at the end of the previous execution.
92
+
Users can load a different topology file by using the ``--cubes-dump-file`` flag followed by the path to the file.
93
+
In case we want to start polycubed with an empty topology, avoiding any possible load at startup, we can launch polycubed with the ``--cubes-dump-clean-init`` flag. Beware that in this case any existing configuration in the default file will be overwritten.
94
+
``--cubes-dump-enable`` is required if we want to use any of the other two related flags.
95
+
There are some limitations: (1) YANG actions, such as "append" for firewall and nat rules, are not supported, (2) some services fail to load the full configuration at once and (3) transparent services attached to netdevs are not saved in the cubes dump file.
96
+
97
+
::
98
+
99
+
# start daemon with topology saving functionalities
0 commit comments