diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2023-03-27 21:42:57 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-04-24 22:34:56 +0200 |
commit | a73b0206ba6f3991ac1550c7c07f11fa4237a898 (patch) | |
tree | 18855c652f75aad299b9d32abce058728f43133a /ovsdb/transaction.h | |
parent | 5575539f6c98cbec91f955805ae079899396f521 (diff) | |
download | openvswitch-a73b0206ba6f3991ac1550c7c07f11fa4237a898.tar.gz |
ovsdb: Check for ephemeral columns before writing a new schema.
Clustered databases do not support ephemeral columns, but ovsdb-server
checks for them after the conversion result is read from the storage.
It's much easier to recover if this constraint is checked before writing
to the storage instead.
It's not a big problem, because the check is always performed by the
native ovsdb clients before sending a conversion request. But the
server, in general, should not trust clients to do the right thing.
Check in the update_schema() remains, because we shouldn't blindly
trust the storage.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ovsdb/transaction.h')
-rw-r--r-- | ovsdb/transaction.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ovsdb/transaction.h b/ovsdb/transaction.h index 6b5bb7f24..9991f34d2 100644 --- a/ovsdb/transaction.h +++ b/ovsdb/transaction.h @@ -21,6 +21,7 @@ struct json; struct ovsdb; +struct ovsdb_schema; struct ovsdb_table; struct uuid; @@ -41,7 +42,7 @@ struct ovsdb_error *ovsdb_txn_propose_commit_block(struct ovsdb_txn *, void ovsdb_txn_complete(struct ovsdb_txn *); struct ovsdb_txn_progress *ovsdb_txn_propose_schema_change( - struct ovsdb *, const struct json *schema, const struct json *data); + struct ovsdb *, const struct ovsdb_schema *, const struct json *data); bool ovsdb_txn_progress_is_complete(const struct ovsdb_txn_progress *); const struct ovsdb_error *ovsdb_txn_progress_get_error( |