[ovs-dev] [PATCH 1/2] debian: Create the config database if it doesn't exist on startup

Ben Pfaff blp at nicira.com
Mon Jan 11 23:54:07 UTC 2010


On Mon, Jan 11, 2010 at 03:51:37PM -0800, Justin Pettit wrote:
> On Jan 11, 2010, at 3:50 PM, Ben Pfaff wrote:
> 
> >> +            # Initialize configuration database.
> >> +            ovsdb-tool -vANY:console:emer \
> >> +                transact /etc/openvswitch-switch/conf \
> >> +                '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' \
> >> +                > /dev/null
> > 
> > I'd rather avoid hard-coding this initialization here, instead adding a
> > call to "ovs-vsctl --no-wait init" after we start the ovsdb-server.
> > (That's how it's done in xenserver/etc_init.d/vswitch.)  Then if we
> > later change the minimal configuration of the database, we only have to
> > change ovs-vsctl, not multiple places.
> 
> I think that makes sense.  I basically just ripped this from openvswitch-switch.postinst.  I assume you'd like the same change there, as well.

I think we can just delete the code that's there in the postinst now,
since starting the switch will do what we need.

We can't just blindly change the postinst to use "ovs-vsctl init",
though, because that only works if ovsdb-server is running.




More information about the dev mailing list