Message ID | 20231214010431.1664005-6-i.maximets@ovn.org |
---|---|
State | Accepted |
Commit | 94371c0996b4fb92133ebdda847ad279265a2803 |
Delegated to: | Ilya Maximets |
Headers | show |
Series | [ovs-dev,01/22] ovsdb-server.at: Enbale debug logs in active-backup tests. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/intel-ovs-compilation | success | test: success |
On Wed, Dec 13, 2023 at 8:05 PM Ilya Maximets <i.maximets@ovn.org> wrote: > > It's not a big problem, but it would be nice to ensure that > the backup database cannot be locally converted. > > Fixes: e51879e99b3e ("ovsdb: Make OVSDB backup sever read only") > Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Acked-by: Mike Pattrick <mkp@redhat.com>
On 1/2/24 16:54, Mike Pattrick wrote: > On Wed, Dec 13, 2023 at 8:05 PM Ilya Maximets <i.maximets@ovn.org> wrote: >> >> It's not a big problem, but it would be nice to ensure that >> the backup database cannot be locally converted. >> >> Fixes: e51879e99b3e ("ovsdb: Make OVSDB backup sever read only") >> Signed-off-by: Ilya Maximets <i.maximets@ovn.org> > > Acked-by: Mike Pattrick <mkp@redhat.com> > Thanks! I applied all the bug and test fixes (first 5 patches) to appropriate branches. I'll work on v2 of the rest of the set addressing the accumulated comments. Best regards, Ilya Maximets.
diff --git a/ovsdb/trigger.c b/ovsdb/trigger.c index 0edcdd89c..2a48ccc64 100644 --- a/ovsdb/trigger.c +++ b/ovsdb/trigger.c @@ -278,6 +278,14 @@ ovsdb_trigger_try(struct ovsdb_trigger *t, long long int now) return false; } + if (t->read_only) { + trigger_convert_error( + t, ovsdb_error("not allowed", "conversion is not allowed " + "for read-only database %s", + t->db->schema->name)); + return false; + } + /* Validate parameters. */ const struct json *params = t->request->params; if (params->type != JSON_ARRAY || params->array.n != 2) {
It's not a big problem, but it would be nice to ensure that the backup database cannot be locally converted. Fixes: e51879e99b3e ("ovsdb: Make OVSDB backup sever read only") Signed-off-by: Ilya Maximets <i.maximets@ovn.org> --- ovsdb/trigger.c | 8 ++++++++ 1 file changed, 8 insertions(+)