Dan Kenigsberg has posted comments on this change.
Change subject: caps: Collect numa information
......................................................................
Patch Set 5: Code-Review-1
(5 comments)
Welcome, Xiaolei Shi. I believe that your suggested API needs more discussion.
http://gerrit.ovirt.org/#/c/23703/5//COMMIT_MSG
Commit Message:
Line 17: Take the first item above to explain the meaning of each field:
Line 18: 0 - The index of numa node
Line 19: 0,1 - The index of cpus(core) which belong to this numa node
Line 20: 10240 - The total memory of this numa node
Line 21: 9500 - The free memory of this numa node
Who is going to consume this information? I suppose that any client would have to parse the string you have described. Wouldn't it be nicer (albeit inefficient) to return a parsed structure such as a dictionary
{ numaNodeIndex : {'cpus': [0,1], totmem: 10240, freemem: 9500} }
if you opt for a squashed, serialized api as the one you have proposed, please explain why a structured API is not preferable.
Besides that, reporting the free memory in getCaps seems wrong - it may be free on Vdsm startup, but quickly used when VM starts to run.
A third point worth considering is the extendibility of your API. libvirt provides more information - allocation of cpus to cores and sockets. I do not know if this is going to be useful to us, but it deserves thinking. In general, sticking to libvirt's modeling is better than inventing a completely new one.
Please include the motivation for your chosen API in the commit message.
Line 22:
Line 23: Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Line 24: Bug-Url: https://bugzilla.redhat.com/1010059
Line 20: 10240 - The total memory of this numa node
Line 21: 9500 - The free memory of this numa node
Line 22:
Line 23: Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Line 24: Bug-Url: https://bugzilla.redhat.com/1010059
This bug is currently private. Can you open it to the public?
http://gerrit.ovirt.org/#/c/23703/5/vdsm/caps.py
File vdsm/caps.py:
Line 178: for cpu in cell.getElementsByTagName('cpu'):
Line 179: cpus.append(cpu.getAttribute('id'))
Line 180: cellInfo.append(','.join(cpus))
Line 181: memInfo = _getMemoryStatsByNumaCell(int(cellInfo[0]), 0, memStats)
Line 182: cellInfo.append(str(memInfo['total']/1024))
I do not know why pep8 did not cry, but please separate operator with spaces.
Line 183: cellInfo.append(str(memInfo['free']/1024))
Line 184: cellsInfo.append(':'.join(cellInfo))
Line 185: return ';'.join(cellsInfo)
Line 186:
Line 181: memInfo = _getMemoryStatsByNumaCell(int(cellInfo[0]), 0, memStats)
Line 182: cellInfo.append(str(memInfo['total']/1024))
Line 183: cellInfo.append(str(memInfo['free']/1024))
Line 184: cellsInfo.append(':'.join(cellInfo))
Line 185: return ';'.join(cellsInfo)
> I feel this can be improved somehow but I don't have any suggestion here. O
I share Francesco's feeling: the serialization of the data into a string is better left as a task for the transport. Typical clients would like to have direct access to the data fields.
Line 186:
Line 187:
Line 188: def _getMemoryStatsByNumaCell(cell, flags=0, memStats=None):
Line 189: if memStats is None:
Line 184: cellsInfo.append(':'.join(cellInfo))
Line 185: return ';'.join(cellsInfo)
Line 186:
Line 187:
Line 188: def _getMemoryStatsByNumaCell(cell, flags=0, memStats=None):
typically, memory usage is a volatile measure. As such, freemem does not fit well into getCaps, which is polled very seldom.
Line 189: if memStats is None:
Line 190: memStats = libvirtconnection.get().getMemoryStats(int(cell), flags)
Line 191: return memStats
Line 192:
--
To view, visit http://gerrit.ovirt.org/23703
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.lima(a)eldorado.org.br>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
Hello Antoni Segura Puimedon, Assaf Muller,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24677
to review the following change.
Change subject: Fix defaultRoute handling
......................................................................
Fix defaultRoute handling
defaultRoute wasn't being past correctly to objectivizeNetwork,
so that defaultRoute was always None inside the function,
no matter what was past to it.
This meant that DEFROUTE=yes/no was never written to ifcfg files,
and 'ip route add default...' never applied by the iproute2
configurator.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015009
Change-Id: I643c5fe9dab39833d73541b7a1bfaae9ae3e749d
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/24631
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Tested-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/24677/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 2be811c..78b5012 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -279,7 +279,7 @@
netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding,
bondingOptions, nics, mtu, ipaddr, netmask,
gateway, bootproto, ipv6addr, ipv6gateway,
- defaultRoute, _netinfo=_netinfo,
+ defaultRoute=defaultRoute, _netinfo=_netinfo,
configurator=configurator, **options)
netEnt.configure(**options)
--
To view, visit http://gerrit.ovirt.org/24677
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I643c5fe9dab39833d73541b7a1bfaae9ae3e749d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Nir Soffer has posted comments on this change.
Change subject: test: unstable jsonrpc tests
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/24624/2/tests/jsonRpcTests.py
File tests/jsonRpcTests.py:
Line 103: except Exception as e:
Line 104: self.log.error("Reactor died unexpectedly", exc_info=True)
Line 105: self.fail("Reactor died: (%s) %s" % (type(e), e))
Line 106:
Line 107: with constructReactor(rt, ssl) as \
How this can create rare random failures?
Line 108: (reactor, clientReactor, laddr):
Line 109:
Line 110: t = threading.Thread(target=echosrv.serve)
Line 111: t.setDaemon(True)
--
To view, visit http://gerrit.ovirt.org/24624
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb6dfa4d6324baa0b7091ad6713854d146ec999d
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: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
Assaf Muller has uploaded a new change for review.
Change subject: Fix defaultRoute handling
......................................................................
Fix defaultRoute handling
defaultRoute wasn't being past correctly to objectivizeNetwork,
so that defaultRoute was always None inside the function,
no matter what was past to it.
This meant that DEFROUTE=yes/no was never written to ifcfg files,
and 'ip route add default...' never applied by the iproute2
configurator.
Change-Id: I643c5fe9dab39833d73541b7a1bfaae9ae3e749d
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/24631/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 7a2206a..5bf9838 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -279,7 +279,7 @@
netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding,
bondingOptions, nics, mtu, ipaddr, netmask,
gateway, bootproto, ipv6addr, ipv6gateway,
- defaultRoute, _netinfo=_netinfo,
+ defaultRoute=defaultRoute, _netinfo=_netinfo,
configurator=configurator, **options)
netEnt.configure(**options)
--
To view, visit http://gerrit.ovirt.org/24631
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I643c5fe9dab39833d73541b7a1bfaae9ae3e749d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller(a)redhat.com>
Itamar Heim has abandoned this change.
Change subject: Add functions getNetworkList and getNetworkInfo to API
......................................................................
Abandoned
no activity - revive if still relevant
--
To view, visit http://gerrit.ovirt.org/2664
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon
Gerrit-Change-Id: I6689b31541fc98ff7a7951eedbb99270c60a0738
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Lei Li <lilei(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server