Change in vdsm[master]: pep8 clean vdsm/storage/hba.py
by xiawenc@linux.vnet.ibm.com
Wenchao Xia has uploaded a new change for review.
Change subject: pep8 clean vdsm/storage/hba.py
......................................................................
pep8 clean vdsm/storage/hba.py
Change-Id: I5afe01d5cf3a6018f6d513a04b3b0e37335c5675
Signed-off-by: wenchao xia <xiawenc(a)linux.vnet.ibm.com>
---
M Makefile.am
M vdsm/storage/hba.py
2 files changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/4382/1
--
To view, visit http://gerrit.ovirt.org/4382
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5afe01d5cf3a6018f6d513a04b3b0e37335c5675
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
10 years, 7 months
Change in vdsm[master]: hypervisor autodetection for the vdsm capabilities
by fromani@gmail.com
Francesco Romani has uploaded a new change for review.
Change subject: hypervisor autodetection for the vdsm capabilities
......................................................................
hypervisor autodetection for the vdsm capabilities
This is a follow up and an extension of the
Change I79f4ab08: add and use hypervisor autodetection in bootstrap.
(see http://gerrit.ovirt.org/#/c/7657 )
The vdsm capability reporting code is enhanced to autonomously
autodetect and report if the vdsm is running under an hypervisor,
thus if the virtualization support has to be emulated.
The hypervisor detection code is the same as the patch mentioned
above, updated following the comment received so far.
The autodetection code is moved in a separate little module
(`cpu_utils.py') which can be shared both by the vdsm and the
vds_bootstrap code.
So far, the two patches are independent and so they use independent
(duplicated) detection code, but a further patch (or an extension
of the current one, if preferred) is planned in order to share
the same module, minimizing the duplication to the point which I believe
is the minimum possible.
With this change and the one mentioned above both applied, there
is no longer need of the `fake_kvm_support' configuration variable.
In the proposed patch it is left as last resort/fallback option,
but it can be removed with a further patch, planned as well.
Change-Id: I565ef639e1f74bdbaef93060f4f25c75085d361b
Signed-off-by: Francesco Romani <fromani(a)gmail.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/caps.py
A vdsm/cpu_utils.py
4 files changed, 82 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/7884/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index bb6730e..fb8bb01 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -559,6 +559,7 @@
%{_datadir}/%{vdsm_name}/blkid.py*
%{_datadir}/%{vdsm_name}/caps.py*
%{_datadir}/%{vdsm_name}/clientIF.py*
+%{_datadir}/%{vdsm_name}/cpu_utils.py*
%{_datadir}/%{vdsm_name}/API.py*
%{_datadir}/%{vdsm_name}/hooking.py*
%{_datadir}/%{vdsm_name}/hooks.py*
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 96c8a56..662190d 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -31,6 +31,7 @@
caps.py \
clientIF.py \
configNetwork.py \
+ cpu_utils.py \
debugPluginClient.py \
guestIF.py \
hooking.py \
diff --git a/vdsm/caps.py b/vdsm/caps.py
index f1641ff..afc88dd 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -41,6 +41,7 @@
from vdsm import utils
from vdsm import constants
import storage.hba
+import cpu_utils
# For debian systems we can use python-apt if available
try:
@@ -228,11 +229,18 @@
return __osversion
+(a)utils.memoized
+def _getHypervisorName():
+ return cpu_utils.findHypervisor()
+
+
def get():
caps = {}
+ fake_kvm = bool(_getHypervisorName()) or \
+ config.getboolean('vars', 'fake_kvm_support')
caps['kvmEnabled'] = \
- str(config.getboolean('vars', 'fake_kvm_support') or
+ (str(fake_kvm) or
os.path.exists('/dev/kvm')).lower()
cpuInfo = CpuInfo()
@@ -243,7 +251,7 @@
caps['cpuSockets'] = str(cpuInfo.sockets())
caps['cpuSpeed'] = cpuInfo.mhz()
- if config.getboolean('vars', 'fake_kvm_support'):
+ if fake_kvm:
caps['cpuModel'] = 'Intel(Fake) CPU'
flags = set(cpuInfo.flags() + ['vmx', 'sse2', 'nx'])
caps['cpuFlags'] = ','.join(flags) + 'model_486,model_pentium,' \
@@ -276,6 +284,7 @@
config.getint('vars', 'host_mem_reserve') +
config.getint('vars', 'extra_mem_reserve'))
caps['guestOverhead'] = config.get('vars', 'guest_ram_overhead')
+ caps['hypervisorName'] = _getHypervisorName()
return caps
diff --git a/vdsm/cpu_utils.py b/vdsm/cpu_utils.py
new file mode 100644
index 0000000..c3f402e
--- /dev/null
+++ b/vdsm/cpu_utils.py
@@ -0,0 +1,69 @@
+#
+# Copyright 2008-2012 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+"""
+A module containing miscellaneous cpu detection functions
+used by various vdsm components.
+"""
+
+import struct
+import logging
+import traceback
+
+
+def cpuHypervisorID():
+ # we cannot (yet) use _cpuid because of the different
+ # unpack format.
+ HYPERVISOR_CPUID_LEAF = 0x40000000
+ with open('/dev/cpu/0/cpuid') as f:
+ f.seek(HYPERVISOR_CPUID_LEAF)
+ c = struct.unpack('I12s', f.read(16))
+ return c[1].strip('\x00')
+ return ''
+
+def cpuModelName():
+ with open('/proc/cpuinfo') as f:
+ for line in f:
+ if ':' in line:
+ k, v = line.split(':', 1)
+ k = k.strip()
+ if k == 'model name':
+ return v.strip()
+ return ''
+
+def findHypervisor():
+ name = ''
+ try:
+ hid = cpuHypervisorID()
+ if hid == 'VMwareVMware':
+ name = 'vmware'
+ elif hid == 'Microsoft Hv':
+ name = 'hyperv'
+ elif hid == 'XenVMMXenVMM':
+ name = 'xen'
+ elif hid == 'KVMKVMKVM':
+ name = 'kvm'
+ elif 'QEMU' in cpuModelName():
+ name = 'qemu'
+ logging.debug('detected hypervisor: %s', name)
+ except:
+ logging.error(traceback.format_exc())
+ return name
+
--
To view, visit http://gerrit.ovirt.org/7884
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I565ef639e1f74bdbaef93060f4f25c75085d361b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)gmail.com>
10 years, 7 months
Change in vdsm[master]: Integrate deathSignal with execCmd
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: Integrate deathSignal with execCmd
......................................................................
Integrate deathSignal with execCmd
Change-Id: Ice79d10ae6bfb0dbb61633fe8a3fce1e26943f14
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M vdsm/storage/misc.py
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/6242/1
--
To view, visit http://gerrit.ovirt.org/6242
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice79d10ae6bfb0dbb61633fe8a3fce1e26943f14
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
10 years, 7 months
Change in vdsm[master]: Avoid race condition with vdsm-reg during firstboot
by fgranha@linux.vnet.ibm.com
Fernando Granha Jeronimo has uploaded a new change for review.
Change subject: Avoid race condition with vdsm-reg during firstboot
......................................................................
Avoid race condition with vdsm-reg during firstboot
In the vdsm-config script, the vdsm-reg service is disabled to
avoid race conditions, once it is intended to be executed just
before the node is rebooted and the registration process should
take place only after reboot.
Change-Id: I2a215bbe6c467d10cf414b09cdaee5340092198e
Signed-off-by: Fernando Granha Jeronimo <fgranha(a)linux.vnet.ibm.com>
---
M vdsm_reg/vdsm-config
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/8200/1
diff --git a/vdsm_reg/vdsm-config b/vdsm_reg/vdsm-config
index 968d78c..0a030d1 100755
--- a/vdsm_reg/vdsm-config
+++ b/vdsm_reg/vdsm-config
@@ -14,6 +14,16 @@
echo "vdsm-config: starting" | tee $LOG
+ # Disable vdsm-reg service to avoid race condition
+ # when parameters are written to config file and the
+ # service is running. This is necessary, because the
+ # registration process can take place only after reboot.
+ if [ -x /bin/systemctl ] ; then
+ /bin/systemctl stop vdsm-reg.service > /dev/null 2>&1
+ elif [ -x /sbin/service ] ; then
+ /sbin/service vdsm-reg stop > /dev/null 2>&1
+ fi
+
set_vars() {
echo "[vars]" >> $VDSM_CONFIG #Adding ts for the coming scripts.
echo "trust_store_path = " `$GETCONFITEM $VDSM_CONFIG vars trust_store_path /etc/pki/vdsm` >> $VDSM_CONFIG
--
To view, visit http://gerrit.ovirt.org/8200
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a215bbe6c467d10cf414b09cdaee5340092198e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Fernando Granha Jeronimo <fgranha(a)linux.vnet.ibm.com>
10 years, 7 months
Change in vdsm[master]: [WIP]change startup process for vdsm and supervdsm
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: [WIP]change startup process for vdsm and supervdsm
......................................................................
[WIP]change startup process for vdsm and supervdsm
Using vdsmService to take care of start up and respawn process of
vdsm and supervdsm. Remove the function of vdsm to start previlege
supervdsm process.
Change-Id: I69aae6b0b9529c80291d90c6ad14ff82b21aea53
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/storage/misc.py
M vdsm/supervdsm.py
M vdsm/supervdsmServer.py
M vdsm/vdsm
A vdsm/vdsmService
M vdsm/vdsmd.init.in
M vdsm_reg/Makefile.am
9 files changed, 208 insertions(+), 63 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/4145/1
--
To view, visit http://gerrit.ovirt.org/4145
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I69aae6b0b9529c80291d90c6ad14ff82b21aea53
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
10 years, 7 months
Change in vdsm[master]: Modify vdsm/netinfo.py for PEP8 compliance
by qiaoliyong@gmail.com
Eli Qiao has uploaded a new change for review.
Change subject: Modify vdsm/netinfo.py for PEP8 compliance
......................................................................
Modify vdsm/netinfo.py for PEP8 compliance
Change-Id: I5a8370da88235ff0edce7cf7b1a350fb0402e7d9
Signed-off-by: Eli Qiao <qiaoliyong(a)gmail.com>
---
M vdsm/netinfo.py
1 file changed, 62 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/4334/1
--
To view, visit http://gerrit.ovirt.org/4334
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a8370da88235ff0edce7cf7b1a350fb0402e7d9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eli Qiao <qiaoliyong(a)gmail.com>
10 years, 7 months
Change in vdsm[master]: Related to BZ# - One shot prepare.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Related to BZ# - One shot prepare.
......................................................................
Related to BZ# - One shot prepare.
The number of storage accesses is reduced to 1 or none instead of
the recursive volume images produces.
Change-Id: Id47db9c53199385dd5d08586e4782ea23885eb72
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 7 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/4220/1
--
To view, visit http://gerrit.ovirt.org/4220
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id47db9c53199385dd5d08586e4782ea23885eb72
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years, 8 months
Change in vdsm[master]: Adding more qemuImg commands
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: Adding more qemuImg commands
......................................................................
Adding more qemuImg commands
Change-Id: I1fbe822da8544ece4fcce9cb5b15a39a9bb35a64
---
M vdsm/qemuImg.py
1 file changed, 48 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/2612/1
--
To view, visit http://gerrit.ovirt.org/2612
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fbe822da8544ece4fcce9cb5b15a39a9bb35a64
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
10 years, 8 months
Change in vdsm[master]: Related to BZ#769502 - One shot prepare.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Related to BZ#769502 - One shot prepare.
......................................................................
Related to BZ#769502 - One shot prepare.
The number of storage accesses is reduced to 1 or none instead of
the recursive volume images produces.
Change-Id: I4b6a4e99cf3a657affb4f5e96aa1ac1978a297da
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/hsm.py
M vdsm/storage/image.py
2 files changed, 5 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/4234/1
--
To view, visit http://gerrit.ovirt.org/4234
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b6a4e99cf3a657affb4f5e96aa1ac1978a297da
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
10 years, 9 months
Change in vdsm[master]: deployUtil: Add logging.error() to CPU virt check
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: deployUtil: Add logging.error() to CPU virt check
......................................................................
deployUtil: Add logging.error() to CPU virt check
Adding logging.error() msg to help users in case CPU
virt support is disable in BIOS.
Change-Id: I3baff7594ad2cfcf4844a30586a2e4a4313a1972
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm_reg/deployUtil.py.in
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/3549/1
--
To view, visit http://gerrit.ovirt.org/3549
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3baff7594ad2cfcf4844a30586a2e4a4313a1972
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 9 months