[ovs-discuss] Possible bug in OVS during controller role change

Ben Pfaff blp at nicira.com
Tue Jul 22 22:59:01 UTC 2014


On Mon, Jul 21, 2014 at 02:00:31PM -0400, Anup Khadka wrote:
> According to OpenFlow spec v.1.3.3 - "When a controller changes its role to
> OFPCR_ROLE_MASTER, the switch changes all other controllers with the role
> OFPCR_ROLE_MASTER to have the role OFPCR_ROLE_SLAVE, but does not affect
> controllers with role OFPCR_ROLE_EQUAL. When the switch performs such role
> changes, no message is generated to the controller whose role is changed"
> 
> The OpenFlow spec v.1.4.0 however adds - "When the switch performs such
> role changes, if a controller role is changed from OFPCR_ROLE_MASTER to
> OFPCR_ROLE_SLAVE, the switch must generate a controller role status event
> for this controller informing it of its new state"
> 
> So, it does look like, the "Role Status" message is more of an OpenFlow
> 1.4+ feature than OpenFlow 1.3.
> 
> The problem though is, even if the switch is configured to run in only 1.3
> mode, the OVS code tries to encode and send role status message.
> File = connmgr.c, function = ofconn_set_role, line =
> ofconn_send_role_status(other, OFPCR12_ROLE_SLAVE, OFPCRR_MASTER_REQUEST);
> 
> Somewhere down the call graph, in file: ofp-msgs.c, function:
> raw_instance_get, the code fails an assertion because the version parameter
> = 4 (running in OpenFlow 1.3 mode),
> is less than info->min_version = 5, because the python build scripts
> construct a raw_instance for OFPRAW_OFPT14_ROLE_STATUS with both a
> min_version and max_version of 5.
> 
> I don't think this assertion failure is a desirable behavior, and there
> should be some check for version before trying to encode+send a role status
> message if running in < OpenFlow 1.4 mode.

You're right.  It's a bug.

I've sent out a series of fixes:
        http://openvswitch.org/pipermail/dev/2014-July/042975.html
        http://openvswitch.org/pipermail/dev/2014-July/042976.html
        http://openvswitch.org/pipermail/dev/2014-July/042977.html

Will you test them?

Thanks,

Ben.



More information about the discuss mailing list