Antoni Segura Puimedon has uploaded a new change for review.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
make vlan speed reporting show the vlan underlying device speed
vdsm was reporting speed 0 for the vlan devices and letting the engine put a default value of 1000mbps for them. This patch increases the level of information that reaches the engine by making the vlan reported speed be its maximum theoretical speed, i.e., the speed of the device which provides link to it.
Change-Id: Iee7f1ea72c77bb628640c1b2b27aac51811c8b0d Bug-Url: https://bugzilla.redhat.com/1062617 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M lib/vdsm/netinfo.py M vdsm/sampling.py 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/24990/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py index 421d11b..4c7803b 100644 --- a/lib/vdsm/netinfo.py +++ b/lib/vdsm/netinfo.py @@ -249,6 +249,18 @@ return operstateFile.read().strip()
+def vlanSpeed(vlanName): + """Returns the vlan's underlying device speed.""" + vlanDevice = getLink(getVlanDevice(vlanName)) + if vlanDevice.isNIC(): + speed = nicSpeed(vlanDevice) + elif vlanDevice.isBOND(): + speed = bondSpeed(vlanDevice) + else: + speed = 0 + return speed + + def nicSpeed(nicName): """Returns the nic speed if it is a legal value and nicName refers to a nic, 0 otherwise.""" diff --git a/vdsm/sampling.py b/vdsm/sampling.py index 6b55f87..35a6616 100644 --- a/vdsm/sampling.py +++ b/vdsm/sampling.py @@ -393,6 +393,8 @@ speed = netinfo.nicSpeed(dev.name) elif dev.isBOND(): speed = netinfo.bondSpeed(dev.name) + elif dev.isVLAN(): + speed = netinfo.vlanSpeed(dev.name) else: speed = 0 self._ifrates.append(speed)
oVirt Jenkins CI Server has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6491/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7275/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7393/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6494/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7278/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7396/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6495/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7279/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7397/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 3: Verified+1
bond5 and bond5.27 have the same speed that is the sum of ens10 and ens11. network = {'bond5': {'name': 'bond5', 'rxDropped': '0', 'rxErrors': '0', 'rxRate': '0.0', 'speed': '200', 'state': 'up', 'txDropped': '0', 'txErrors': '0', 'txRate': '0.0'}, 'bond5.27': {'name': 'bond5.27', 'rxDropped': '0', 'rxErrors': '0', 'rxRate': '0.0', 'speed': '200', 'state': 'up', 'txDropped': '0', 'txErrors': '0', 'txRate': '0.0'}, 'ens10': {'name': 'ens10', 'rxDropped': '0', 'rxErrors': '0', 'rxRate': '0.0', 'speed': '100', 'state': 'up', 'txDropped': '0', 'txErrors': '0', 'txRate': '0.0'}, 'ens11': {'name': 'ens11', 'rxDropped': '0', 'rxErrors': '0', 'rxRate': '0.0', 'speed': '100', 'state': 'up', 'txDropped': '0', 'txErrors': '0', 'txRate': '0.0'},
Dan Kenigsberg has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 3:
(2 comments)
http://gerrit.ovirt.org/#/c/24990/3//COMMIT_MSG Commit Message:
Line 3: AuthorDate: 2014-02-25 10:16:28 +0100 Line 4: Commit: Antoni S. Puimedon asegurap@redhat.com Line 5: CommitDate: 2014-02-25 10:41:30 +0100 Line 6: Line 7: make vlan speed reporting show the vlan underlying device speed suggested text:
netinfo: report "speed" of underlying device as that of vlan device Line 8: Line 9: vdsm was reporting speed 0 for the vlan devices and letting the Line 10: engine put a default value of 1000mbps for them. This patch Line 11: increases the level of information that reaches the engine by
Line 7: make vlan speed reporting show the vlan underlying device speed Line 8: Line 9: vdsm was reporting speed 0 for the vlan devices and letting the Line 10: engine put a default value of 1000mbps for them. This patch Line 11: increases the level of information that reaches the engine by there's no added information at Engine side: engine could do the same copying itself. Line 12: making the vlan reported speed be its maximum theoretical speed, Line 13: i.e., the speed of the device which provides link to it. Line 14: Line 15: Change-Id: Iee7f1ea72c77bb628640c1b2b27aac51811c8b0d
Dan Kenigsberg has posted comments on this change.
Change subject: make vlan speed reporting show the vlan underlying device speed ......................................................................
Patch Set 3: Code-Review-1
(1 comment)
I find the commit message a bit misleading.
http://gerrit.ovirt.org/#/c/24990/3//COMMIT_MSG Commit Message:
Line 6: Line 7: make vlan speed reporting show the vlan underlying device speed Line 8: Line 9: vdsm was reporting speed 0 for the vlan devices and letting the Line 10: engine put a default value of 1000mbps for them. This patch afaict Engine does not have this logic. it is sampling.py that assumes speed=1000 if speed is undefined. Line 11: increases the level of information that reaches the engine by Line 12: making the vlan reported speed be its maximum theoretical speed, Line 13: i.e., the speed of the device which provides link to it. Line 14:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netinfo: report "speed" of underlying device as that of vlan device ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6533/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7317/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7435/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netinfo: report "speed" of underlying device as that of vlan device ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6534/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7318/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7436/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: report "speed" of underlying device as that of vlan device ......................................................................
Patch Set 5: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: netinfo: report "speed" of underlying device as that of vlan device ......................................................................
netinfo: report "speed" of underlying device as that of vlan device
netinfo.py was reporting speed 0 for the vlan devices in the system This patch makes that vlan devices, just like nics and bonds, will have a speed reported, that one of their underlying device.
Change-Id: Iee7f1ea72c77bb628640c1b2b27aac51811c8b0d Bug-Url: https://bugzilla.redhat.com/1062617 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com Reviewed-on: http://gerrit.ovirt.org/24990 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/netinfo.py M vdsm/sampling.py 2 files changed, 15 insertions(+), 0 deletions(-)
Approvals: Antoni Segura Puimedon: Verified Dan Kenigsberg: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org