summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-07-07 12:31:58 -0700
committerBen Pfaff <blp@nicira.com>2011-07-26 09:04:10 -0700
commit65420cc6d4ec08b89994cfc92e8d82868b32f405 (patch)
tree52d4108cb0f2f124ed4be72092837a6daadc0bb9
parentcbaa4ffe9b72904a7dad8ba23fa13cf2783b26c9 (diff)
downloadopenvswitch-65420cc6d4ec08b89994cfc92e8d82868b32f405.tar.gz
ovs-ctl: Log messages about database upgrade process.
This should make problems easier to debug. Bug #6280.
-rwxr-xr-xutilities/ovs-ctl.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index c783f3da8..a5ef56ad9 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -71,7 +71,8 @@ upgrade_db () {
# Back up the old version.
version=`ovsdb_tool db-version "$DB_FILE"`
cksum=`ovsdb_tool db-cksum "$DB_FILE" | awk '{print $1}'`
- cp "$DB_FILE" "$DB_FILE.backup$version-$cksum"
+ backup=$DB_FILE.backup$version-$cksum
+ action "Backing up database to $backup" cp "$DB_FILE" "$backup"
# Compact database. This is important if the old schema did not enable
# garbage collection (i.e. if it did not have any tables with "isRoot":
@@ -82,10 +83,10 @@ upgrade_db () {
# does) would cause the record to be dropped by the first transaction,
# then the second transaction would cause a referential integrity
# failure (for a strong reference).
- ovsdb_tool compact "$DB_FILE"
+ action "Compacting database" ovsdb_tool compact "$DB_FILE"
# Upgrade or downgrade schema.
- ovsdb_tool convert "$DB_FILE" "$DB_SCHEMA"
+ action "Converting database schema" ovsdb_tool convert "$DB_FILE" "$DB_SCHEMA"
fi
}