Petr Horáček has uploaded a new change for review.
Change subject: qos: fix invalid dictionary iteration ......................................................................
qos: fix invalid dictionary iteration
`for x, y in dictionary` is not valid dictionary iteration. This bug was here for some time, but unexposed.
Change-Id: Icfdb43838cf34384d47e7b447ab8e1c1d685a16a Signed-off-by: Petr Horáček phoracek@redhat.com --- M lib/vdsm/network/configurators/qos.py 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/60333/1
diff --git a/lib/vdsm/network/configurators/qos.py b/lib/vdsm/network/configurators/qos.py index b95761a..e9caa86 100644 --- a/lib/vdsm/network/configurators/qos.py +++ b/lib/vdsm/network/configurators/qos.py @@ -21,6 +21,8 @@ import os from distutils.version import StrictVersion
+import six + from vdsm.network import tc from vdsm.network.netinfo import qos as netinfo_qos from vdsm.network.netinfo.cache import ifaceUsed, NetInfo, get as cache_get @@ -203,7 +205,7 @@ definitions. """ netinfo = NetInfo(cache_get()) - for _, attrs in netinfo.networks: + for attrs in six.itervalues(netinfo.networks): if 'vlan' not in attrs and 'hostQos' in attrs and ( attrs['iface'] == dev): return True
gerrit-hooks has posted comments on this change.
Change subject: qos: fix invalid dictionary iteration ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Petr Horáček has posted comments on this change.
Change subject: qos: fix invalid dictionary iteration ......................................................................
Patch Set 1: Verified+1
Fails on master with 'too many values to unpack', it is OK with this patch:
NETSETUP = { 'case11_net1': { 'ipv6autoconf': False, 'hostQos': { 'out': { 'ls': { 'm2': 10 } } }, 'nic': 'ens3', 'vlan': 15, 'mtu': 1500, 'dhcpv6': False, 'STP': 'no', 'bridged': True }, 'case11_net_2': { 'ipv6autoconf': False, 'hostQos': { 'out': { 'ls': { 'm2': 10 } } }, 'nic': 'ens3', 'vlan': 16, 'mtu': 1500, 'dhcpv6': False, 'STP': 'no', 'bridged': True } }
Dan Kenigsberg has posted comments on this change.
Change subject: qos: fix invalid dictionary iteration ......................................................................
Patch Set 1: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: qos: fix invalid dictionary iteration ......................................................................
qos: fix invalid dictionary iteration
`for x, y in dictionary` is not valid dictionary iteration. This bug was here for some time, but unexposed.
Change-Id: Icfdb43838cf34384d47e7b447ab8e1c1d685a16a Signed-off-by: Petr Horáček phoracek@redhat.com Reviewed-on: https://gerrit.ovirt.org/60333 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/network/configurators/qos.py 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: Jenkins CI: Passed CI tests Petr Horáček: Verified Dan Kenigsberg: Looks good to me, approved
gerrit-hooks has posted comments on this change.
Change subject: qos: fix invalid dictionary iteration ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
vdsm-patches@lists.fedorahosted.org