xenserver: Upgrade and compact database on system boot.
authorBen Pfaff <blp@nicira.com>
Fri, 12 Feb 2010 19:26:32 +0000 (11:26 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 15 Feb 2010 20:54:55 +0000 (12:54 -0800)
This should take care of many of the OVSDB-related upgrade and downgrade
problems reported by Nicira internal testers.

Bug #2388.

xenserver/etc_init.d_vswitch

index 95c6b80bc819c1efd12306125d1c33484c2e9140..480f9a9c42f84d8b1dda96e3d2f6a5707e380707 100755 (executable)
@@ -337,6 +337,9 @@ function start {
 
         action "Creating empty database $OVSDB_SERVER_DB" true
         $ovsdb_tool -vANY:console:emer create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA"
+    else
+        # Upgrade or downgrade schema and compact database.
+        $ovsdb_tool -vANY:console:emer convert "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA"
     fi
 
     start_ovsdb_server