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/storage.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/storage.h')
-rw-r--r-- | ovsdb/storage.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/storage.h b/ovsdb/storage.h index a1fdaa564..05f40ce93 100644 --- a/ovsdb/storage.h +++ b/ovsdb/storage.h @@ -85,7 +85,7 @@ struct ovsdb_error *ovsdb_storage_store_snapshot(struct ovsdb_storage *storage, struct ovsdb_write *ovsdb_storage_write_schema_change( struct ovsdb_storage *, - const struct json *schema, const struct json *data, + const struct ovsdb_schema *, const struct json *data, const struct uuid *prereq, struct uuid *result) OVS_WARN_UNUSED_RESULT; |