Petr Horáček has uploaded a new change for review.

Change subject: `tc qdisc del device x ingress` changed err code
......................................................................

`tc qdisc del device x ingress` changed err code

In new kernel, operation `tc qdisc del device dummy_x ingress`
changed error code of 'no ingress exists' from EINVAL to ENODEV.

CentOS 6.5
$ ip link add dummy_ni type dummy
$ tc qdisc del device dummy_ni ingress
Unknown qdisc "device", hence option "dummy_ni" is unparsable

Fedora 20
$ ip link add dummy_ni type dummy
$ tc qdisc del dev dummy_ni ingress
RTNETLINK answers: No such file or directory

Now qos.py:_fresh_qdisc_conf_out() ignores ENODEV too.

Change-Id: Ic40d7bdd34212cbd63850142211e544cfe1bc97b
Signed-off-by: Petr Horáček <[email protected]>
---
M vdsm/network/configurators/qos.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/33973/1

diff --git a/vdsm/network/configurators/qos.py 
b/vdsm/network/configurators/qos.py
index 076733c..d9ec461 100644
--- a/vdsm/network/configurators/qos.py
+++ b/vdsm/network/configurators/qos.py
@@ -102,7 +102,8 @@
     try:
         tc.qdisc.delete(dev, kind='ingress')  # Deletes the ingress qdisc
     except tc.TrafficControlException as tce:
-        if tce.errCode != errno.EINVAL:  # No ingress exists
+        if tce.errCode not in (errno.EINVAL,
+                               errno.ENOENT):  # No ingress exists
             raise
 
     tc.qdisc.add(dev, _SHAPING_QDISC_KIND, handle='0x' + _ROOT_QDISC_HANDLE,


-- 
To view, visit http://gerrit.ovirt.org/33973
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic40d7bdd34212cbd63850142211e544cfe1bc97b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to