Change in vdsm[master]: vdsm: Missing hostId parameter on reconstructMaster verb
by smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: vdsm: Missing hostId parameter on reconstructMaster verb
......................................................................
Patch Set 4: Code-Review+2
Giving a +2 since I trust nsoffer checked that and this is a storage API
--
To view, visit http://gerrit.ovirt.org/29510
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0695a21601b8f0765bc24c3cf273f1ba161a40a9
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 10 months
Change in vdsm[master]: vdsm: Shuting down protocol detector fails
by smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: vdsm: Shuting down protocol detector fails
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.ovirt.org/29556
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I82119a61835fe335f2aa5da29fb8d3f2b8ae33fc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 10 months
Change in vdsm[master]: jsonrpc: Accept all stomp commands
by smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: jsonrpc: Accept all stomp commands
......................................................................
Patch Set 1:
If the connection is lost the engine needs to renegotiate a connect.
--
To view, visit http://gerrit.ovirt.org/29652
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63029e43bfd5f06bb8f25958b78f75850d45b6df
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 10 months
Change in vdsm[master]: vdsm: verifyingTransport testing
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: vdsm: verifyingTransport testing
......................................................................
Patch Set 13:
Stop this dependency craziness!
There is no reason this patch should depend on anything - it should be rebase on last master and never change until we finish the review.
The way it is works now is all your reviewers are getting mail whenever you change the dependent patch and post all the chain back to gerrit.
--
To view, visit http://gerrit.ovirt.org/28858
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1a706d4d90fdf446b06530288d947d96934e45f2
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 10 months
Change in vdsm[master]: vdsm: Shuting down protocol detector fails
by Nir Soffer
Nir Soffer has posted comments on this change.
Change subject: vdsm: Shuting down protocol detector fails
......................................................................
Patch Set 2:
Please do not send patches without any changes. I guess this is because other patches are depending on this patch - are they really related and must depend on this?
--
To view, visit http://gerrit.ovirt.org/29556
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I82119a61835fe335f2aa5da29fb8d3f2b8ae33fc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
9 years, 10 months
Change in vdsm[ovirt-3.5]: HostStats: stop storing list of host ifids and speeds
by Dan Kenigsberg
Hello Antoni Segura Puimedon,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/29645
to review the following change.
Change subject: HostStats: stop storing list of host ifids and speeds
......................................................................
HostStats: stop storing list of host ifids and speeds
Current code keeps an almost-up-to-date list of host interface names as
a data member of the HostStatsThread. This information is redundant,
since host ifids are already available in HostSample.interfaces.
With the list of ifids, this patch removes a list of their respective
speed. Each speed is stored, instead with its respective
InterfaceSample.
Change-Id: Iad0605c910564a8a7072484301c51b4b8a325751
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/29470
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 25 insertions(+), 29 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/29645/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 38490c3..e6a5646 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008-2013 Red Hat, Inc.
+# Copyright 2008-2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -100,7 +100,8 @@
return '0'
return 'up' if flags & ethtool.IFF_RUNNING else 'down'
- def __init__(self, ifid):
+ def __init__(self, link):
+ ifid = link.name
self.rx = self.readIfaceStat(ifid, 'rx_bytes')
self.tx = self.readIfaceStat(ifid, 'tx_bytes')
self.rxDropped = self.readIfaceStat(ifid, 'rx_dropped')
@@ -108,6 +109,7 @@
self.rxErrors = self.readIfaceStat(ifid, 'rx_errors')
self.txErrors = self.readIfaceStat(ifid, 'tx_errors')
self.operstate = self.readIfaceOperstate(ifid)
+ self.speed = _getLinkSpeed(link)
class TotalCpuSample:
@@ -229,19 +231,16 @@
d[p] = {'free': str(free)}
return d
- def __init__(self, pid, ifids):
+ def __init__(self, pid):
"""
Initialize a HostSample.
:param pid: The PID of this vdsm host.
:type pid: int
- :param ifids: The IDs of the interfaces you want to sample.
- :type: list
"""
TimedSample.__init__(self)
- self.interfaces = {}
- for ifid in ifids:
- self.interfaces[ifid] = InterfaceSample(ifid)
+ self.interfaces = dict(
+ (link.name, InterfaceSample(link)) for link in getLinks())
self.pidcpu = PidCpuSample(pid)
self.totcpu = TotalCpuSample()
meminfo = utils.readMemInfo()
@@ -441,7 +440,6 @@
self._log = log
self._stopEvent = threading.Event()
self._samples = []
- self._updateIfidsIfrates()
self._lastSampleTime = time.time()
self._pid = os.getpid()
@@ -450,24 +448,8 @@
def stop(self):
self._stopEvent.set()
- def _updateIfidsIfrates(self):
- devices = getLinks()
- self._ifids = [dev.name for dev in devices]
- self._ifrates = []
- for dev in devices:
- if dev.isNIC():
- 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)
-
def sample(self):
- self._updateIfidsIfrates()
- hs = HostSample(self._pid, self._ifids)
+ hs = HostSample(self._pid)
return hs
def run(self):
@@ -585,12 +567,13 @@
rx = tx = rxDropped = txDropped = 0
stats['network'] = {}
- for ifid, ifrate in zip(self._ifids, self._ifrates):
+ total_rate = 0
+ for ifid in hs1.interfaces:
# it skips hot-plugged devices if we haven't enough information
# to count stats from it
if ifid not in hs0.interfaces:
continue
- ifrate = ifrate or 1000
+ ifrate = hs1.interfaces[ifid].speed or 1000
Mbps2Bps = (10 ** 6) / 8
thisRx = (hs1.interfaces[ifid].rx - hs0.interfaces[ifid].rx) % \
(2 ** 32)
@@ -621,8 +604,9 @@
tx += thisTx
rxDropped += hs1.interfaces[ifid].rxDropped
txDropped += hs1.interfaces[ifid].txDropped
+ total_rate += ifrate
- total_bytes_per_sec = (sum(self._ifrates) or 1000) * (10 ** 6) / 8
+ total_bytes_per_sec = (total_rate or 1000) * (10 ** 6) / 8
stats['rxRate'] = 100.0 * rx / interval / total_bytes_per_sec
stats['txRate'] = 100.0 * tx / interval / total_bytes_per_sec
if stats['txRate'] > 100 or stats['rxRate'] > 100:
@@ -633,3 +617,15 @@
stats['txDropped'] = txDropped
return stats
+
+
+def _getLinkSpeed(dev):
+ if dev.isNIC():
+ speed = netinfo.nicSpeed(dev.name)
+ elif dev.isBOND():
+ speed = netinfo.bondSpeed(dev.name)
+ elif dev.isVLAN():
+ speed = netinfo.vlanSpeed(dev.name)
+ else:
+ speed = 0
+ return speed
--
To view, visit http://gerrit.ovirt.org/29645
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad0605c910564a8a7072484301c51b4b8a325751
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 10 months
Change in vdsm[master]: netinfo: drop unused intToAddress
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netinfo: drop unused intToAddress
......................................................................
netinfo: drop unused intToAddress
Back when we introduced ipwrapper's Route class (commit
9903861228c4b16fa5636f626e7548f8f0d0f41f), we dropped the only
usage of netinfo's intToAddress. Since it had a very specific
usage, it is safe to drop it.
Change-Id: I29bc8467cd25c298221d68d10379a123b2d735e7
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M lib/vdsm/netinfo.py
M tests/netinfoTests.py
2 files changed, 0 insertions(+), 18 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/29604/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 72e0745..82d4a6d 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -390,17 +390,6 @@
return vlan, bonding, nics
-def intToAddress(ip_num):
- "Convert an integer to the corresponding ip address in the dot-notation"
- ip_address = []
-
- for i in xrange(4):
- ip_num, ip_val = divmod(ip_num, 256)
- ip_address.append(str(ip_val))
-
- return '.'.join(ip_address)
-
-
def getIfaceCfg(iface):
ifaceCfg = {}
try:
diff --git a/tests/netinfoTests.py b/tests/netinfoTests.py
index e8a7399..020ef68 100644
--- a/tests/netinfoTests.py
+++ b/tests/netinfoTests.py
@@ -69,13 +69,6 @@
self.assertFalse(s < 0)
self.assertTrue(s in ETHTOOL_SPEEDS or s == 0)
- def testIntToAddress(self):
- num = [0, 1, 16777344, 16777408, 4294967295]
- ip = ["0.0.0.0", "1.0.0.0", "128.0.0.1",
- "192.0.0.1", "255.255.255.255"]
- for n, addr in zip(num, ip):
- self.assertEqual(addr, netinfo.intToAddress(n))
-
@MonkeyPatch(ipwrapper.Link, '_detectType',
partial(_fakeTypeDetection, ipwrapper.Link))
@MonkeyPatch(netinfo, 'networks', lambda: {'fake': {'bridged': True}})
--
To view, visit http://gerrit.ovirt.org/29604
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29bc8467cd25c298221d68d10379a123b2d735e7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 10 months
Change in vdsm[master]: netinfo: drop unused NetInfo.getBridgelessNetworkForIface
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netinfo: drop unused NetInfo.getBridgelessNetworkForIface
......................................................................
netinfo: drop unused NetInfo.getBridgelessNetworkForIface
Commit fb443166d483dbff199f7e35313304f849b98470 not only changed the
method so that it would return only a single network, but also
removed its only usage. It is time to drop it.
Change-Id: Ic0287b2a899dbb5c3568851172da9415963c3324
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 0 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/29603/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 9deec88..72e0745 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -918,12 +918,6 @@
if not netdict['bridged']:
yield network
- def getBridgelessNetworkForIface(self, iface):
- """ Return the bridgeless network attached to nic/bond """
- for network, netdict in self.networks.iteritems():
- if not netdict['bridged'] and iface == netdict['iface']:
- return network
-
def getBridgedNetworkForIface(self, iface):
""" Return all bridged networks attached to nic/bond """
for bridge, netdict in self.networks.iteritems():
--
To view, visit http://gerrit.ovirt.org/29603
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0287b2a899dbb5c3568851172da9415963c3324
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 10 months
Change in vdsm[master]: netinfo: drop generally unused NetInfo.getNicBondings
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netinfo: drop generally unused NetInfo.getNicBondings
......................................................................
netinfo: drop generally unused NetInfo.getNicBondings
getNicBondings was only used as a rather verbose convenience method
for getNicBonding. It is better to just have a simplified version
inside getNicBonding.
Change-Id: I8dc5c975dfab2917fe637012e31b3a83456f3c24
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M lib/vdsm/netinfo.py
1 file changed, 2 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/29602/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index a204f72..9deec88 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -930,17 +930,13 @@
if netdict['bridged'] and iface in netdict['ports']:
return bridge
- def getBondingsForNic(self, nic):
- for b, bdict in self.bondings.iteritems():
- if nic in bdict['slaves']:
- yield b
-
def getNicsForBonding(self, bond):
bondAttrs = self.bondings[bond]
return bondAttrs['slaves']
def getBondingForNic(self, nic):
- bondings = list(self.getBondingsForNic(nic))
+ bondings = [b for (b, attrs) in self.bondings.iteritems() if
+ nic in attrs['slaves']]
if bondings:
assert len(bondings) == 1, \
"Unexpected configuration: More than one bonding per nic"
--
To view, visit http://gerrit.ovirt.org/29602
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dc5c975dfab2917fe637012e31b3a83456f3c24
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 10 months
Change in vdsm[ovirt-3.5]: HostStats: recalculate total line rate every time
by Dan Kenigsberg
Hello Antoni Segura Puimedon, Francesco Romani,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/29643
to review the following change.
Change subject: HostStats: recalculate total line rate every time
......................................................................
HostStats: recalculate total line rate every time
This should have been done when we started supporting host plugging in
commit b7b29e6.
Change-Id: Iad7f7eb1922967e2e8174b2b2a25f06fbf4c7d50
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/29469
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/29643/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 3b91cee..4ef9890 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -450,8 +450,6 @@
self._stopEvent = threading.Event()
self._samples = []
self._updateIfidsIfrates()
- # in bytes-per-second
- self._lineRate = (sum(self._ifrates) or 1000) * (10 ** 6) / 8
self._lastSampleTime = time.time()
self._pid = os.getpid()
@@ -631,8 +629,10 @@
tx += thisTx
rxDropped += hs1.interfaces[ifid].rxDropped
txDropped += hs1.interfaces[ifid].txDropped
- stats['rxRate'] = 100.0 * rx / interval / self._lineRate
- stats['txRate'] = 100.0 * tx / interval / self._lineRate
+
+ total_bytes_per_sec = (sum(self._ifrates) or 1000) * (10 ** 6) / 8
+ stats['rxRate'] = 100.0 * rx / interval / total_bytes_per_sec
+ stats['txRate'] = 100.0 * tx / interval / total_bytes_per_sec
if stats['txRate'] > 100 or stats['rxRate'] > 100:
stats['txRate'] = min(stats['txRate'], 100.0)
stats['rxRate'] = min(stats['rxRate'], 100.0)
--
To view, visit http://gerrit.ovirt.org/29643
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad7f7eb1922967e2e8174b2b2a25f06fbf4c7d50
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
9 years, 10 months