diff options
author | Andy Zhou <azhou@ovn.org> | 2017-02-06 12:43:35 -0800 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2017-02-13 12:07:44 -0800 |
commit | 64fada26016c0d7ad8376d11c2cf653616d0db21 (patch) | |
tree | 88422ddf7af7ca40b0a0e83e675fc5e128ee3318 /ovsdb/server.h | |
parent | ac5d315cd83a1b6a3610c0ddf2ffc847250b783d (diff) | |
download | openvswitch-64fada26016c0d7ad8376d11c2cf653616d0db21.tar.gz |
ovsdb: Add OVSDB server per instance UUID.
Currently, there is no way for an OVSDB server to ID itself. This patch
adds a UUID field that is populated every time OVSDB server runs.
Later patch will make use this UUID to detect and stop and OVSDB server
from replicating itself.
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb/server.h')
-rw-r--r-- | ovsdb/server.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ovsdb/server.h b/ovsdb/server.h index c0bbb69ce..21bf1adde 100644 --- a/ovsdb/server.h +++ b/ovsdb/server.h @@ -19,6 +19,7 @@ #include "openvswitch/hmap.h" #include "openvswitch/list.h" #include "openvswitch/shash.h" +#include "openvswitch/uuid.h" struct ovsdb; struct ovsdb_server; @@ -79,6 +80,8 @@ bool ovsdb_lock_waiter_is_owner(const struct ovsdb_lock_waiter *); struct ovsdb_server { struct shash dbs; /* Maps from a db name to a "struct ovsdb *". */ struct hmap locks; /* Contains "struct ovsdb_lock"s indexed by name. */ + struct uuid uuid; /* Server ID. Generated every time a server is + launched. */ }; void ovsdb_server_init(struct ovsdb_server *); |