Change in vdsm[master]: add and use hypervisor autodetection in bootstrap.
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: add and use hypervisor autodetection in bootstrap.
......................................................................
Patch Set 4: (1 inline comment)
....................................................
Commit Message
Line 19: Modified the vds_bootstrap to use the autodetection code.
Line 20: The setting based on the `fake_kvm_support' is left as last
Line 21: fallback.
Line 22:
Line 23: Address all the comments made in the reviews.
(yes, but when I said "here", I meant "in the commit message". Future git-loggers may want to understand why you're doing this)
I think that a WARN during bootstrap is necessary, beyond other precautions.
Line 24:
Line 25: Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
--
To view, visit http://gerrit.ovirt.org/7657
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 8 months
Change in vdsm[master]: report idle time for multiple vcpus
by lhornyak@redhat.com
Laszlo Hornyak has uploaded a new change for review.
Change subject: report idle time for multiple vcpus
......................................................................
report idle time for multiple vcpus
The idle time is now on a 0-100 scale. If the VM has multiple vcpus and
the load goes over 100%, the cpuIdle will report no further increase in
load. This patch fixes this behavior and changes the returned value to
0-(vcpus*100) scale.
Change-Id: I3308858f5c27c3dd193cd981c43721fa1cd023d9
Signed-off-by: Laszlo Hornyak <lhornyak(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/7892/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 3306cc2..8ff3f5a 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -164,6 +164,7 @@
return netSamples
def _getCpuStats(self, stats):
+ nrOfCpus = self._vm._dom._dom.info()[3]
stats['cpuSys'] = 0.0
sInfo, eInfo, sampleInterval = self.sampleCpu.getStats()
@@ -173,7 +174,7 @@
self._log.debug("CPU stats not available")
stats['cpuUser'] = 0.0
- stats['cpuIdle'] = max(0.0, 100.0 - stats['cpuUser'])
+ stats['cpuIdle'] = max(0.0, (100.0 * nrOfCpus) - stats['cpuUser'])
def _getNetworkStats(self, stats):
stats['network'] = {}
--
To view, visit http://gerrit.ovirt.org/7892
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3308858f5c27c3dd193cd981c43721fa1cd023d9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak(a)redhat.com>
11 years, 8 months
Change in vdsm[master]: add and use hypervisor autodetection in bootstrap.
by fromani@gmail.com
Francesco Romani has posted comments on this change.
Change subject: add and use hypervisor autodetection in bootstrap.
......................................................................
Patch Set 4: (2 inline comments)
....................................................
Commit Message
Line 19: Modified the vds_bootstrap to use the autodetection code.
Line 20: The setting based on the `fake_kvm_support' is left as last
Line 21: fallback.
Line 22:
Line 23: Address all the comments made in the reviews.
(sidenote: are my replies actually viewable?)
The use case I have in mind is exactly the installation in a virtualized guest for testing purposes. As far as I know that is less or more the point of fake_kvm_support variable which I'm trying to eliminate with this and the other patchset of mine.
As for reporting to the engine I started to address this issue with the other patchset (http://gerrit.ovirt.org/#/c/7884/) which is probably even more in need of review.
Is it preferrable to report directly this peculiar situation in vds_bootstrap itself or it is acceptable to report through vdsm, maybe using a different approach?
Line 24:
Line 25: Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
....................................................
File vdsm_reg/deployUtil.py.in
Line 1354: elif hid == 'XenVMMXenVMM':
Line 1355: name = 'xen'
Line 1356: elif hid == 'KVMKVMKVM':
Line 1357: name = 'kvm'
Line 1358: elif 'QEMU' in cpuModelName():
The cpuid call seems to return nothing meaningful, I haven't investigated yet if it's a qemu bug. Other hypervisor detection code (e.g. virt-what) uses the same fallback code path so I'm quite confident that this behaviour is not just a misconfiguration of my test box.
Line 1359: name = 'qemu'
Line 1360: logging.debug('detected hypervisor: %s', name)
Line 1361: return name
Line 1362:
--
To view, visit http://gerrit.ovirt.org/7657
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 8 months
Change in vdsm[master]: add vdsm-tool/load_needed_modules.py to .gitigore
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: add vdsm-tool/load_needed_modules.py to .gitigore
......................................................................
add vdsm-tool/load_needed_modules.py to .gitigore
It is generated from vdsm-tool/load_needed_modules.py.in .
Change-Id: Ibfef240233377290fa1262e98092c3ea55b895a5
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/8017/1
diff --git a/.gitignore b/.gitignore
index d7a3472..49a78ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@
vdsm/vdsm.rwtab
vdsm/vdsmd.8
vdsm/vdsmd.init
+vdsm-tool/load_needed_modules.py
vdsm-tool/validate_ovirt_certs.py
vdsm_cli/vdsClient
vdsm_cli/vdscli.py
--
To view, visit http://gerrit.ovirt.org/8017
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfef240233377290fa1262e98092c3ea55b895a5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
11 years, 8 months
Change in vdsm[master]: vdsm.spec.in: Requires: python-libguestfs
by apahim@redhat.com
Amador Pahim has uploaded a new change for review.
Change subject: vdsm.spec.in: Requires: python-libguestfs
......................................................................
vdsm.spec.in: Requires: python-libguestfs
Solving vdsm_hooks/fileinject/before_vm_start.py
"import guestfs" dependency.
Change-Id: Ib0a98614b4220747e4dfbaf3c58e756b44e7e280
Signed-off-by: Amador Pahim <apahim(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/8004/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 7323252..521760c 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -91,6 +91,7 @@
Requires: sed >= 4.2.1-10
%endif
+Requires: python-libguestfs
Requires: psmisc >= 22.6-15
Requires: fence-agents
Requires: bridge-utils
--
To view, visit http://gerrit.ovirt.org/8004
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0a98614b4220747e4dfbaf3c58e756b44e7e280
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim(a)redhat.com>
11 years, 8 months
Change in vdsm[master]: vdsm bootstrap changes for kvm on ppc64 support
by Pradipta Kumar Banerjee
Pradipta Banerjee has uploaded a new change for review.
Change subject: vdsm bootstrap changes for kvm on ppc64 support
......................................................................
vdsm bootstrap changes for kvm on ppc64 support
Following patchset makes changes to vdsm bootstrap code to support
ppc64 by making it architectural neutral.
Explicit usage of x86_64 have been removed.
This change makes it possible to use ovirt for managing KVM on
IBM POWER (ppc64) host.
More details on KVM on POWER (ppc64) can be found here
http://www.linux-kvm.org/wiki/images/5/5d/2011-forum-KVM_on_the_IBM_POWER...
Change-Id: I06ca5dc3adba6183657afed778f999715ee332e0
Signed-off-by: Pradipta Kr. Banerjee <bpradip(a)in.ibm.com>
---
M vds_bootstrap/vds_bootstrap.py
M vdsm.spec.in
M vdsm_reg/deployUtil.py.in
3 files changed, 97 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/7072/1
--
To view, visit http://gerrit.ovirt.org/7072
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06ca5dc3adba6183657afed778f999715ee332e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Pradipta Banerjee <bpradip(a)in.ibm.com>
11 years, 8 months
Change in vdsm[master]: Make netinfo.py PEP8 clean
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Make netinfo.py PEP8 clean
......................................................................
Make netinfo.py PEP8 clean
Change-Id: Ib3ee6348a0a9eb4366b1571ab5883deba9b40d0a
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/netinfo.py
1 file changed, 59 insertions(+), 26 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/7922/1
diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py
index caf82de..fb013fe 100644
--- a/vdsm/netinfo.py
+++ b/vdsm/netinfo.py
@@ -42,23 +42,28 @@
LIBVIRT_NET_PREFIX = 'vdsm-'
+
def nics():
res = []
for b in glob.glob('/sys/class/net/*/device'):
nic = b.split('/')[-2]
if not any(map(lambda p: fnmatch(nic, p),
- config.get('vars', 'hidden_nics').split(',')) ):
+ config.get('vars', 'hidden_nics').split(','))):
res.append(nic)
return res
+
def bondings():
- return [ b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bonding')]
+ return [b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bonding')]
+
def vlans():
- return [ b.split('/')[-1] for b in glob.glob('/sys/class/net/*.*')]
+ return [b.split('/')[-1] for b in glob.glob('/sys/class/net/*.*')]
+
def bridges():
- return [ b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bridge')]
+ return [b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bridge')]
+
def networks():
"""
@@ -83,20 +88,25 @@
nets[netname]['iface'] = interfaces[0].getAttribute('dev')
nets[netname]['bridged'] = False
else:
- nets[netname]['bridge'] = xml.getElementsByTagName('bridge')[0].getAttribute('name')
+ nets[netname]['bridge'] = \
+ xml.getElementsByTagName('bridge')[0].getAttribute('name')
nets[netname]['bridged'] = True
return nets
+
def slaves(bonding):
- return [ b.split('/')[-1].split('_', 1)[-1] for b in
+ return [b.split('/')[-1].split('_', 1)[-1] for b in
glob.glob('/sys/class/net/' + bonding + '/slave_*')]
+
def ports(bridge):
return os.listdir('/sys/class/net/' + bridge + '/brif')
+
def getMtu(iface):
mtu = file('/sys/class/net/%s/mtu' % iface).readline().rstrip()
return mtu
+
def bridge_stp_state(bridge):
stp = file('/sys/class/net/%s/bridge/stp_state' % bridge).readline()
@@ -105,14 +115,18 @@
else:
return 'off'
+
def isvirtio(dev):
return 'virtio' in os.readlink('/sys/class/net/%s/device' % dev)
+
def isbonding(dev):
return os.path.exists('/sys/class/net/%s/bonding' % dev)
+
def operstate(dev):
return file('/sys/class/net/%s/operstate' % dev).read().strip()
+
def speed(dev):
# return the speed of devices that are capable of replying
@@ -131,6 +145,7 @@
logging.error('cannot read %s speed', dev, exc_info=True)
return 0
+
def getaddr(dev):
dev_info_list = ethtool.get_interfaces_info(dev.encode('utf8'))
addr = dev_info_list[0].ipv4_address
@@ -138,9 +153,12 @@
addr = ''
return addr
+
def bitmask_to_address(bitmask):
- binary = ~((1L << (32-bitmask)) - 1)
- return ".".join(map(lambda x: str(binary>>(x<<3) & 0xff), [3, 2, 1, 0]))
+ binary = ~((1L << (32 - bitmask)) - 1)
+ return ".".join(map(lambda x: str(binary >> (x << 3) & 0xff),
+ [3, 2, 1, 0]))
+
def getnetmask(dev):
dev_info_list = ethtool.get_interfaces_info(dev.encode('utf8'))
@@ -149,8 +167,10 @@
return ''
return bitmask_to_address(netmask)
+
def gethwaddr(dev):
return file('/sys/class/net/%s/address' % dev).read().strip()
+
def graph():
for bridge in bridges():
@@ -162,6 +182,7 @@
if iface in bondings():
for slave in slaves(iface):
print '\t\t' + slave
+
def getVlanBondingNic(bridge):
"""Return the (vlan, bonding, nics) tupple that belongs to bridge."""
@@ -180,6 +201,7 @@
nics = [iface]
return vlan, bonding, nics
+
def intToAddress(ip_num):
"Convert an integer to the corresponding ip address in the dot-notation"
ip_address = []
@@ -190,13 +212,14 @@
return '.'.join(ip_address)
+
def getRoutes():
"""Return the interface default gateway or None if not found."""
gateways = dict()
with open("/proc/net/route") as route_file:
- route_file.readline() # skip header line
+ route_file.readline() # skip header line
for route_line in route_file.xreadlines():
route_parm = route_line.rstrip().split('\t')
@@ -207,12 +230,14 @@
return gateways
+
def getIfaceCfg(iface):
d = {}
try:
for line in open(NET_CONF_PREF + iface).readlines():
line = line.strip()
- if line.startswith('#'): continue
+ if line.startswith('#'):
+ continue
try:
k, v = line.split('=', 1)
d[k] = ''.join(shlex.split(v))
@@ -221,6 +246,7 @@
except:
pass
return d
+
def permAddr():
paddr = {}
@@ -234,6 +260,7 @@
paddr[slave] = addr.upper()
return paddr
+
def get():
d = {}
routes = getRoutes()
@@ -244,7 +271,7 @@
if nets[netname]['bridged']:
devname = netname
try:
- d['networks'][netname] = { 'ports': ports(devname),
+ d['networks'][netname] = {'ports': ports(devname),
'stp': bridge_stp_state(devname),
'cfg': getIfaceCfg(devname), }
except OSError, e:
@@ -262,8 +289,8 @@
d['networks'][netname] = {}
# ovirt-engine-3.1 expects to see "interface" iff the network is
- # bridgeless. Please remove this line when that Engine version is no
- # longer supported
+ # bridgeless. Please remove this line when that Engine version is
+ # no longer supported
d['networks'][netname]['interface'] = devname
d['networks'][netname].update({
@@ -284,33 +311,34 @@
})
for bridge in bridges()])
- d['nics'] = dict([ (nic, {'speed': speed(nic),
+ d['nics'] = dict([(nic, {'speed': speed(nic),
'addr': getaddr(nic),
'netmask': getnetmask(nic),
'hwaddr': gethwaddr(nic),
'mtu': getMtu(nic),
'cfg': getIfaceCfg(nic),
})
- for nic in nics() ])
+ for nic in nics()])
paddr = permAddr()
for nic, nd in d['nics'].iteritems():
if paddr.get(nic):
nd['permhwaddr'] = paddr[nic]
- d['bondings'] = dict([ (bond, {'slaves': slaves(bond),
+ d['bondings'] = dict([(bond, {'slaves': slaves(bond),
'addr': getaddr(bond),
'netmask': getnetmask(bond),
'hwaddr': gethwaddr(bond),
'cfg': getIfaceCfg(bond),
'mtu': getMtu(bond)})
- for bond in bondings() ])
- d['vlans'] = dict([ (vlan, {'iface': vlan.split('.')[0],
+ for bond in bondings()])
+ d['vlans'] = dict([(vlan, {'iface': vlan.split('.')[0],
'addr': getaddr(vlan),
'netmask': getnetmask(vlan),
'mtu': getMtu(vlan),
'cfg': getIfaceCfg(vlan),
})
- for vlan in vlans() ])
+ for vlan in vlans()])
return d
+
def getVlanDevice(vlan):
""" Return the device of the given VLAN. """
@@ -324,6 +352,7 @@
return dev
+
def getVlanID(vlan):
""" Return the ID of the given VLAN. """
id = None
@@ -336,9 +365,11 @@
return id
+
def getIpAddresses():
"Return a list of the host's IP addresses"
- return filter(None, [ getaddr(i) for i in ethtool.get_active_devices() ])
+ return filter(None, [getaddr(i) for i in ethtool.get_active_devices()])
+
class NetInfo(object):
def __init__(self, _netinfo=None):
@@ -363,7 +394,7 @@
if iface == interface:
yield (network, None)
elif interface.startswith(iface + '.'):
- yield (network, interface.split('.',1)[1])
+ yield (network, interface.split('.', 1)[1])
def getBridgelessNetworksAndVlansForIface(self, iface):
""" Returns tuples of (network, vlan) connected to nic/bond """
@@ -372,7 +403,7 @@
if iface == netdict['iface']:
yield (network, None)
elif netdict['iface'].startswith(iface + '.'):
- yield (network, netdict['iface'].split('.',1)[1])
+ yield (network, netdict['iface'].split('.', 1)[1])
def getVlansForIface(self, iface):
for v, vdict in self.vlans.iteritems():
@@ -408,7 +439,8 @@
def getBondingForNic(self, nic):
bondings = list(self.getBondingsForNic(nic))
if bondings:
- assert len(bondings) == 1, "Unexpected configuration: More than one bonding per nic"
+ assert len(bondings) == 1, "Unexpected configuration: \
+ More than one bonding per nic"
return bondings[0]
return None
@@ -418,7 +450,7 @@
lnics = []
if self.networks[network]['bridged']:
- ports = self.networks[network]['ports']
+ ports = self.networks[network]['ports']
else:
ports = []
interface = self.networks[network]['iface']
@@ -427,7 +459,7 @@
for port in ports:
if port in self.vlans:
assert vlan is None
- nic, vlan = port.split('.',1)
+ nic, vlan = port.split('.', 1)
assert self.vlans[port]['iface'] == nic
port = nic
if port in self.bondings:
@@ -446,4 +478,5 @@
:returns: list of networks name
:rtype: List
"""
- return [ netname for (netname, net) in networks().iteritems() if not 'bridge' in net ]
+ return [netname for (netname, net) in networks().iteritems()
+ if not 'bridge' in net]
--
To view, visit http://gerrit.ovirt.org/7922
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3ee6348a0a9eb4366b1571ab5883deba9b40d0a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
11 years, 8 months
Change in vdsm[master]: add and use hypervisor autodetection in bootstrap.
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: add and use hypervisor autodetection in bootstrap.
......................................................................
Patch Set 4: I would prefer that you didn't submit this
(2 inline comments)
....................................................
Commit Message
Line 19: Modified the vds_bootstrap to use the autodetection code.
Line 20: The setting based on the `fake_kvm_support' is left as last
Line 21: fallback.
Line 22:
Line 23: Address all the comments made in the reviews.
Could you explain here why we want to allow installation within guests, even if the guest does not have nested virt?
even if we do want to succeed in installing on such hosts (for testing etc), we should better report a WARNING to Engine, or else nasty surprises may occur when it tries to start a VM on the host.
Line 24:
Line 25: Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
....................................................
File vdsm_reg/deployUtil.py.in
Line 1354: elif hid == 'XenVMMXenVMM':
Line 1355: name = 'xen'
Line 1356: elif hid == 'KVMKVMKVM':
Line 1357: name = 'kvm'
Line 1358: elif 'QEMU' in cpuModelName():
qemu does not set the cpuHypervisorID? Isn't it a qemu bug? (I really do not know)
Line 1359: name = 'qemu'
Line 1360: logging.debug('detected hypervisor: %s', name)
Line 1361: return name
Line 1362:
--
To view, visit http://gerrit.ovirt.org/7657
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 8 months
Change in vdsm[master]: add and use hypervisor autodetection in bootstrap.
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: add and use hypervisor autodetection in bootstrap.
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm_reg/deployUtil.py.in
Line 1332: with open('/dev/cpu/0/cpuid') as f:
Line 1333: f.seek(HYPERVISOR_CPUID_LEAF)
Line 1334: c = struct.unpack('I12s', f.read(16))
Line 1335: return c[1].strip('\x00')
Line 1336: return ''
what is the point of this second "return"?
Line 1337:
Line 1338: def cpuModelName():
Line 1339: with open('/proc/cpuinfo') as f:
Line 1340: for line in f:
Line 1359: name = 'kvm'
Line 1360: elif 'QEMU' in cpuModelName():
Line 1361: name = 'qemu'
Line 1362: logging.debug('detected hypervisor: %s', name)
Line 1363: except:
catch-all "except:" is prevalent in this module, but it is evil.
is there ANY exception we would like to survive here?
I can think only of a missing or unreadable /dev/cpu/0/cpuid, which should be considered fatal imo.
Line 1364: logging.error(traceback.format_exc())
Line 1365: return name
Line 1366:
Line 1367: def virtEnabledInCpuAndBios():
--
To view, visit http://gerrit.ovirt.org/7657
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I79f4ab08b838bd75af5d4c26f98923fca0d65d8e
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)gmail.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years, 8 months
Change in vdsm[master]: BZ#840300: setNetworking() return bridge status
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: BZ#840300: setNetworking() return bridge status
......................................................................
BZ#840300: setNetworking() return bridge status
if the bridge is not created we should stop the bootstrap and
report to users the real status in the oVirt Engine. Otherwise,
it will continue and complete the bootstrap, reboot the Host and
oVirt Engine will report the Node as Non Responsive
without any additional info.
Change-Id: Idfea98ed31b536699e9d3d6485f5cb62791adcd5
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vds_bootstrap/vds_bootstrap.py
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/6875/1
--
To view, visit http://gerrit.ovirt.org/6875
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfea98ed31b536699e9d3d6485f5cb62791adcd5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
11 years, 8 months