Hi ,

I have been recently using OVSDB for some of my project work and I have
some doubts with respect to the way ovsdb-server works .

1) DB file - I was running the ovsdb-server and then I ran "ovsdb-client
dump" command. This dumped the information stored in the DB on stdout.
   Now , I went ahead and deleted the conf.db file from
/usr/local/etc/openvswitch/conf.db. I expected that ovsdb-client commands
should fail now ,
   however  the dump command still successfully dumped the DB contents.

   So the query is - does ovsdb-server maintain an in-memory cache of the
DB information , and what is the reason for this ( performance optimization
etc ) .


2) Restore feature - Let's say we run a command that actually fails during
the processing of vswitchd. For example , "ovs-vsctl add-port br0 ethx"
command is
   executed and the ethX is not available on the system.
   ovs-vsctl immediately gives an error on stdout for this failure ,
however an entry pertaining to ethX is added into the conf.db , I can see
that
   in "ovsdb-client dump" command.

   Our requirement is to make sure that to a northbound management user we
only expose the exact system view , which in this particular would
implicitly mean
   that the entry pertaining to ethX should not be available in the DB.

   For this solution , we are thinking that -
     i) We will track each JSON transaction that we do with ovsdb-server (
using the idl transactions ) .
    ii) Wait till vswitchd is done with its processing ( using next_cfg and
cur_cfg - the way ovs-vsctl does).
   iii) Once the above is done , ensure that there are no errors and if
there are any errors revert the data with whatever information was tracked
as part
        of step i) above.

   The question here is that when we revert ( which is initiating JSON
transaction towards ovsdb ) , ovsdb-server is going to generate notification
   towards vswitchd. We are assuming that this should be fine.

 Is there any better way in which we can do a rollback in the ovsdb without
the above steps. We have tried to update the conf.db file with an older
version of it while ovsdb-server was running however , that did not solve
the problem since it seems that ovsdb-server maintains in memory cache of
the running db and to do something like this ovsdb-server needs a restart.

Thanks and regards,
Rishi Raj
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to