提交 36a01c2a 编写于 作者: E Erik Skultety

Revert "network: Check for QOS before blindly using it"

This reverts commit f4db846c.

This patch results in the following error when trying to start
essentially any VM with default network:

unsupported configuration: QOS must be defined for network 'default'

Coverity didn't see that the bandwidth == NULL it complained about in
virNetDevBandwidthPlug was already checked properly in
networkCheckBandwidth, thus causing networkPlugBandwidth to return 0
and finish before a call to virNetDevBandwidthPlug would have been even
made.
Signed-off-by: NErik Skultety <eskultet@redhat.com>
Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 bc7e7291
......@@ -4567,13 +4567,6 @@ networkAllocatePort(virNetworkObjPtr obj,
return -1;
}
if (!port->bandwidth) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("QOS must be defined for network '%s'"),
netdef->name);
return -1;
}
if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0)
return -1;
break;
......@@ -4640,13 +4633,6 @@ networkAllocatePort(virNetworkObjPtr obj,
}
}
if (!port->bandwidth) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("QOS must be defined for network '%s'"),
netdef->name);
return -1;
}
if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0)
return -1;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册