If ovs-vswitchd.conf is locally modified, but ovs-vswitchd is not told
to reload it, updates from the controller will be refused. This is
because we attempt to lock the file with SHA-1 snapshot of the config
file. Since the hashes will not match, we will never be able to lock
the file, and all remote updates will fail. There is not much that can
be done about this, since we don't want to presume the current state of
the file is correct, since it could be in the process of being updated.
With this commit, we attempt to detect this problem and log a message
describing how to rectify it.
Bug #1516
/* xxx cfg_lock can fail for other reasons, such as being
* xxx locked... */
VLOG_WARN_RL(&rl, "config update failed due to bad cookie\n");
+
+ /* Check if our local view matches the controller, in which
+ * case, it is likely that there were local modifications
+ * without our being told to reread the config file. */
+ if (!memcmp(cfg_cookie, ofmpcu->cookie, sizeof cfg_cookie)) {
+ VLOG_WARN_RL(&rl, "config appears to have been locally modified "
+ "without having told ovs-vswitchd to reload");
+ }
send_config_update_ack(xid, false);
return 0;
}