+static void
+ovsdb_server_compact(struct unixctl_conn *conn, const char *args OVS_UNUSED,
+ void *file_)
+{
+ struct ovsdb_file *file = file_;
+ struct ovsdb_error *error;
+
+ VLOG_INFO("compacting database by user request");
+ error = ovsdb_file_compact(file);
+ if (!error) {
+ unixctl_command_reply(conn, 200, NULL);
+ } else {
+ char *s = ovsdb_error_to_string(error);
+ ovsdb_error_destroy(error);
+ unixctl_command_reply(conn, 503, s);
+ free(s);
+ }
+}
+
+/* "ovsdb-server/reconnect": makes ovsdb-server drop all of its JSON-RPC
+ * connections and reconnect. */
+static void
+ovsdb_server_reconnect(struct unixctl_conn *conn, const char *args OVS_UNUSED,
+ void *jsonrpc_)
+{
+ struct ovsdb_jsonrpc_server *jsonrpc = jsonrpc_;
+
+ ovsdb_jsonrpc_server_reconnect(jsonrpc);
+ unixctl_command_reply(conn, 200, NULL);
+}
+