Skip to content

Commit f47d3bc

Browse files
committed
add persistency documentation
Signed-off-by: Riccardo Marchi <riccardo.marchi4@gmail.com>
2 parents 55e639d + 69d888d commit f47d3bc

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Documentation/polycubed/polycubed.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,33 @@ If the same parameter is specified in both, the configuration file and the comma
5454
daemon: true
5555
#p: 6000 <-- this is NOT supported, only long options are
5656

57+
58+
59+
Persistency
60+
^^^^^^^^^^^
61+
62+
To add stateful capabilities and improve its reliability, polycubed has some functionalities that allow the user to recover from failures without losing data.
63+
By default, while running the daemon keeps in memory an instance of all the topology, that is updated each time the user modifies it.
64+
To avoid loss of data, after every change the cubes configuration is dumped to file too. The default path is ``/etc/polycube/cubes.yaml``.
65+
The standard behavior of the daemon at startup is to load the latest topology that have been dumped in that file the previous time.
66+
It is possible to define a different topology file by using the ``--cubes-dump`` flag followed by the path to the file.
67+
In the case we want to start polycubed with an empty topology, avoiding any possible load at startup, we can add the ``--cubes-init`` flag.
68+
Beware of the fact that any previous configuration in the file will be overwritten after the first modification.
69+
If not necessary, it is also possible to disable this functionality by using the ``--cubes-nodump`` flag and we would avoid any penalty it could produce.
70+
71+
::
72+
73+
# start polycubed with custom cubes configuration
74+
polycubed --cubes-dump ~/Desktop/myCubes.yaml
75+
76+
# start polycubed with an empty topology
77+
polycubed --cubes-init
78+
79+
# start daemon without topology saving functionalities
80+
polycubed --cubes-nodump
81+
82+
83+
5784
Rest API
5885
^^^^^^^^
5986

0 commit comments

Comments
 (0)