On Thursday, August 4, 2011 at 1:36 AM, Ethan Jackson wrote: > > Why doesn't it work? Whenever the configuration needs to set (either > > for a new device or to change the config), parse needs to be called. > > If it returns an error at that point, the operation will fail, as it > > should, and the previous state will remain. This is different from > > the current situation where we allow an invalid config initially and > > then later fail to handle the exact same config. > > It works in the majority of cases, there is one specific race > (possibly rare) in which it doesn't work. Perhaps we can ignore this > case altogether: > > 1) vport is create with proper configuration. > 2) ovs-vswitchd dies for some reason > 3) an unsupported configuration option is added to the vport in the database > 4) vswitchd comes back up > > Simply returning EINVAL in parse_tunnel_config won't fix the problem > in this case, because netdev_dev_args_equal() is going to fail before > netdev_dev->netdev_class->open() has a chance to call > parse_tunnel_config(). That said, this is pretty edge case-ish, > perhaps it's not worth all the extra code to catch it.
It makes no difference whether the config is invalid or not - this will always fail in the current setup. That's the generic problem that I was describing. Besides, checking to see whether the config parses correctly just returns EINVAL sooner but the end result is the same either way. That's fine though, because it's supposed to fail in this case. The only thing to be done is to tear down the existing port. It doesn't look like that happens either though. I agree with Ben's point that netdev_open() is using the config changing as a proxy for something else but I also think that some of the issues here (like the one above) exist regardless. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
