[ovs-dev] [PATCH] ovn: Log chassis claiming lport only when changes occur
Ben Pfaff
blp at ovn.org
Wed Dec 21 05:43:16 UTC 2016
On Tue, Dec 20, 2016 at 01:23:46PM -0800, Mickey Spiegel wrote:
> With recent OVN commits, the logic for a chassis to claim
> or release a logical port was consolidated. This is a
> good thing. However, there was a logic change that
> resulted in VLOG_INFO being generated every time on the
> ovn-controller. This patch changes the logic so that
> VLOG_INFO is only generated when there is a change, for
> example when the chassis claims an lport the first time.
>
> Signed-off-by: Mickey Spiegel <mickeys.dev at gmail.com>
Thanks a lot, I applied this.
I don't think the first clause of the "if" here is necessary, so I
removed it:
> + if (!binding_rec->chassis
> + || (binding_rec->chassis != chassis_rec)) {
> + if (binding_rec->chassis) {
> + VLOG_INFO("Changing chassis for lport %s from %s to %s.",
> + binding_rec->logical_port,
> + binding_rec->chassis->name,
> + chassis_rec->name);
> + } else {
> + VLOG_INFO("Claiming lport %s for this chassis.",
> + binding_rec->logical_port);
> + }
> + for (int i = 0; i < binding_rec->n_mac; i++) {
> + VLOG_INFO("%s: Claiming %s",
> + binding_rec->logical_port, binding_rec->mac[i]);
> + }
> + sbrec_port_binding_set_chassis(binding_rec, chassis_rec);
> }
> - sbrec_port_binding_set_chassis(binding_rec, chassis_rec);
More information about the dev
mailing list