2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00
ovs/ovsdb/automake.mk

175 lines
5.0 KiB
Makefile
Raw Normal View History

2009-11-04 15:11:44 -08:00
# libovsdb
lib_LTLIBRARIES += ovsdb/libovsdb.la
ovsdb_libovsdb_la_LDFLAGS = \
$(OVS_LTINFO) \
-Wl,--version-script=$(top_builddir)/ovsdb/libovsdb.sym \
$(AM_LDFLAGS)
ovsdb_libovsdb_la_SOURCES = \
2009-11-04 15:11:44 -08:00
ovsdb/column.c \
ovsdb/column.h \
ovsdb/condition.c \
ovsdb/condition.h \
ovsdb/execution.c \
ovsdb/file.c \
ovsdb/file.h \
2009-11-04 15:11:44 -08:00
ovsdb/jsonrpc-server.c \
ovsdb/jsonrpc-server.h \
ovsdb/log.c \
ovsdb/log.h \
ovsdb/mutation.c \
ovsdb/mutation.h \
2009-11-04 15:11:44 -08:00
ovsdb/ovsdb.c \
ovsdb/ovsdb.h \
ovsdb/monitor.c \
ovsdb/monitor.h \
2009-11-04 15:11:44 -08:00
ovsdb/query.c \
ovsdb/query.h \
ovsdb/raft.c \
ovsdb/raft.h \
ovsdb/raft-private.c \
ovsdb/raft-private.h \
ovsdb/raft-rpc.c \
ovsdb/raft-rpc.h \
ovsdb/rbac.c \
ovsdb/rbac.h \
ovsdb/replication.c \
ovsdb/replication.h \
ovsdb: New ovsdb 'relay' service model. New database service model 'relay' that is needed to scale out read-mostly database access, e.g. ovn-controller connections to OVN_Southbound. In this service model ovsdb-server connects to existing OVSDB server and maintains in-memory copy of the database. It serves read-only transactions and monitor requests by its own, but forwards write transactions to the relay source. Key differences from the active-backup replication: - support for "write" transactions (next commit). - no on-disk storage. (probably, faster operation) - support for multiple remotes (connect to the clustered db). - doesn't try to keep connection as long as possible, but faster reconnects to other remotes to avoid missing updates. - No need to know the complete database schema beforehand, only the schema name. - can be used along with other standalone and clustered databases by the same ovsdb-server process. (doesn't turn the whole jsonrpc server to read-only mode) - supports modern version of monitors (monitor_cond_since), because based on ovsdb-cs. - could be chained, i.e. multiple relays could be connected one to another in a row or in a tree-like form. - doesn't increase availability. - cannot be converted to other service models or become a main active server. Some performance test results can be found here: https://mail.openvswitch.org/pipermail/ovs-dev/2021-July/385825.html Acked-by: Mark D. Gray <mark.d.gray@redhat.com> Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2021-06-01 23:27:36 +02:00
ovsdb/relay.c \
ovsdb/relay.h \
2009-11-04 15:11:44 -08:00
ovsdb/row.c \
ovsdb/row.h \
ovsdb/server.c \
ovsdb/server.h \
ovsdb/storage.c \
ovsdb/storage.h \
2009-11-04 15:11:44 -08:00
ovsdb/table.c \
ovsdb/table.h \
ovsdb/trigger.c \
ovsdb/trigger.h \
ovsdb/transaction.c \
ovsdb/transaction.h \
ovsdb: relay: Add support for transaction forwarding. Current version of ovsdb relay allows to scale out read-only access to the primary database. However, many clients are not read-only but read-mostly. For example, ovn-controller. In order to scale out database access for this case ovsdb-server need to process transactions that are not read-only. Relay is not allowed to do that, i.e. not allowed to modify the database, but it can act like a proxy and forward transactions that includes database modifications to the primary server and forward replies back to a client. At the same time it may serve read-only transactions and monitor requests by itself greatly reducing the load on primary server. This configuration will slightly increase transaction latency, but it's not very important for read-mostly use cases. Implementation details: With this change instead of creating a trigger to commit the transaction, ovsdb-server will create a trigger for transaction forwarding. Later, ovsdb_relay_run() will send all new transactions to the relay source. Once transaction reply received from the relay source, ovsdb-relay module will update the state of the transaction forwarding with the reply. After that, trigger_run() will complete the trigger and jsonrpc_server_run() will send the reply back to the client. Since transaction reply from the relay source will be received after all the updates, client will receive all the updates before receiving the transaction reply as it is in a normal scenario with other database models. Acked-by: Mark D. Gray <mark.d.gray@redhat.com> Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
2021-04-15 19:05:40 +02:00
ovsdb/transaction-forward.c \
ovsdb/transaction-forward.h \
ovsdb/ovsdb-util.c \
ovsdb/ovsdb-util.h
ovsdb_libovsdb_la_CFLAGS = $(AM_CFLAGS)
ovsdb_libovsdb_la_CPPFLAGS = $(AM_CPPFLAGS)
pkgconfig_DATA += \
ovsdb/libovsdb.pc
MAN_FRAGMENTS += ovsdb/ovsdb-schemas.man
2009-11-04 15:11:44 -08:00
# ovsdb-tool
bin_PROGRAMS += ovsdb/ovsdb-tool
ovsdb_ovsdb_tool_SOURCES = ovsdb/ovsdb-tool.c
ovsdb_ovsdb_tool_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
# ovsdb-tool.1
man_MANS += ovsdb/ovsdb-tool.1
CLEANFILES += ovsdb/ovsdb-tool.1
MAN_ROOTS += ovsdb/ovsdb-tool.1.in
2009-11-04 15:11:44 -08:00
2009-11-06 15:35:34 -08:00
# ovsdb-client
bin_PROGRAMS += ovsdb/ovsdb-client
ovsdb_ovsdb_client_SOURCES = ovsdb/ovsdb-client.c
ovsdb_ovsdb_client_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
2009-11-06 15:35:34 -08:00
# ovsdb-client.1
man_MANS += ovsdb/ovsdb-client.1
CLEANFILES += ovsdb/ovsdb-client.1
MAN_ROOTS += ovsdb/ovsdb-client.1.in
2009-11-06 15:35:34 -08:00
2009-11-04 15:11:44 -08:00
# ovsdb-server
sbin_PROGRAMS += ovsdb/ovsdb-server
ovsdb_ovsdb_server_SOURCES = ovsdb/ovsdb-server.c
ovsdb_ovsdb_server_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la
# ovsdb-server.1
man_MANS += ovsdb/ovsdb-server.1
CLEANFILES += ovsdb/ovsdb-server.1
MAN_ROOTS += ovsdb/ovsdb-server.1.in
# ovsdb-idlc
noinst_SCRIPTS += ovsdb/ovsdb-idlc
EXTRA_DIST += ovsdb/ovsdb-idlc.in
MAN_ROOTS += ovsdb/ovsdb-idlc.1
CLEANFILES += ovsdb/ovsdb-idlc
SUFFIXES += .ovsidl .ovsschema
OVSDB_IDLC = $(run_python) $(srcdir)/ovsdb/ovsdb-idlc.in
2009-12-02 11:26:15 -08:00
.ovsidl.c:
$(AM_V_GEN)$(OVSDB_IDLC) c-idl-source $< > $@.tmp && mv $@.tmp $@
2009-12-02 11:26:15 -08:00
.ovsidl.h:
$(AM_V_GEN)$(OVSDB_IDLC) c-idl-header $< > $@.tmp && mv $@.tmp $@
BUILT_SOURCES += $(OVSIDL_BUILT)
CLEANFILES += $(OVSIDL_BUILT)
# This must be done late: macros in targets are expanded when the
# target line is read, so if this file were to be included before some
# other file that added to OVSIDL_BUILT, then those files wouldn't get
# the dependency.
#
# However, current versions of Automake seem to output all variable
# assignments before any targets, so it doesn't seem to be a problem,
# at least for now.
$(OVSIDL_BUILT): ovsdb/ovsdb-idlc.in python/ovs/dirs.py
# ovsdb-doc
EXTRA_DIST += ovsdb/ovsdb-doc
FLAKE8_PYFILES += ovsdb/ovsdb-doc
OVSDB_DOC = $(run_python) $(srcdir)/ovsdb/ovsdb-doc
ovsdb/ovsdb-doc: python/ovs/dirs.py
# ovsdb-dot
EXTRA_DIST += ovsdb/ovsdb-dot.in ovsdb/dot2pic
FLAKE8_PYFILES += ovsdb/ovsdb-dot.in ovsdb/dot2pic
noinst_SCRIPTS += ovsdb/ovsdb-dot
CLEANFILES += ovsdb/ovsdb-dot
OVSDB_DOT = $(run_python) $(srcdir)/ovsdb/ovsdb-dot.in
EXTRA_DIST += ovsdb/_server.ovsschema
CLEANFILES += ovsdb/_server.ovsschema.inc
ovsdb/ovsdb-server.$(OBJEXT): ovsdb/_server.ovsschema.inc
ovsdb/_server.ovsschema.inc: ovsdb/_server.ovsschema $(srcdir)/build-aux/text2c
$(AM_V_GEN)$(run_python) $(srcdir)/build-aux/text2c < $< > $@.tmp
$(AM_V_at)mv $@.tmp $@
# Version checking for _server.ovsschema.
ALL_LOCAL += ovsdb/_server.ovsschema.stamp
ovsdb/_server.ovsschema.stamp: ovsdb/_server.ovsschema
$(srcdir)/build-aux/cksum-schema-check $? $@
CLEANFILES += ovsdb/_server.ovsschema.stamp
# _Server schema documentation
EXTRA_DIST += ovsdb/_server.xml
CLEANFILES += ovsdb/ovsdb-server.5
man_MANS += ovsdb/ovsdb-server.5
ovsdb/ovsdb-server.5: \
ovsdb/ovsdb-doc ovsdb/_server.xml ovsdb/_server.ovsschema
$(AM_V_GEN)$(OVSDB_DOC) \
--version=$(VERSION) \
$(srcdir)/ovsdb/_server.ovsschema \
$(srcdir)/ovsdb/_server.xml > $@.tmp && \
mv $@.tmp $@
EXTRA_DIST += ovsdb/local-config.ovsschema
pkgdata_DATA += ovsdb/local-config.ovsschema
# Version checking for local-config.ovsschema.
ALL_LOCAL += ovsdb/local-config.ovsschema.stamp
ovsdb/local-config.ovsschema.stamp: ovsdb/local-config.ovsschema
$(srcdir)/build-aux/cksum-schema-check $? $@
CLEANFILES += ovsdb/local-config.ovsschema.stamp
# Local_Config schema documentation
EXTRA_DIST += ovsdb/local-config.xml
CLEANFILES += ovsdb/ovsdb.local-config.5
man_MANS += ovsdb/ovsdb.local-config.5
ovsdb/ovsdb.local-config.5: \
ovsdb/ovsdb-doc ovsdb/local-config.xml ovsdb/local-config.ovsschema
$(AM_V_GEN)$(OVSDB_DOC) \
--version=$(VERSION) \
$(srcdir)/ovsdb/local-config.ovsschema \
$(srcdir)/ovsdb/local-config.xml > $@.tmp && \
mv $@.tmp $@
EXTRA_DIST += ovsdb/TODO.rst