Change in vdsm[master]: vdsm: introduce cpuinfo module
by fromani@redhat.com
Francesco Romani has posted comments on this change.
Change subject: vdsm: introduce cpuinfo module
......................................................................
Patch Set 7: Code-Review+1
(7 comments)
looks good. Few minor comments and questions inside
https://gerrit.ovirt.org/#/c/46912/7/debian/vdsm-tests.install
File debian/vdsm-tests.install:
Line 8: usr/share/vdsm/tests/caps_libvirt_intel_i73770.out
Line 9: usr/share/vdsm/tests/caps_libvirt_intel_i73770_nosnap.out
Line 10: usr/share/vsdm/tests/caps_numactl_4_nodes.out
Line 11: usr/share/vdsm/tests/cpu_map.xml
Line 12: usr/share/vdsm/tests/cpu/*.out
I still believe cpuinfo/ is more apt, but no bug deal.
Line 13: usr/share/vdsm/tests/devices/parsing*.py
Line 14: usr/share/vdsm/tests/devices/data/*.xml
Line 15: usr/share/vdsm/tests/functional/*.policy
Line 16: usr/share/vdsm/tests/functional/*.py
https://gerrit.ovirt.org/#/c/46912/7/lib/vdsm/cpuinfo.py
File lib/vdsm/cpuinfo.py:
Line 67: if targetarch == Architecture.X86_64:
Line 68: return 'x86'
Line 69:
Line 70: if targetarch in Architecture.POWER:
Line 71: return 'ppc64'
else?
Line 72:
Line 73:
Line 74: def parse(source='/proc/cpuinfo'):
Line 75: '''
Line 89: except ValueError:
Line 90: continue
Line 91: if key == 'processor':
Line 92: cpu = int(value)
Line 93: _CPUS[cpu] = {}
maybe make _CPUS a defaultdict(dict) ?
Line 94: continue
Line 95: else:
Line 96: _CPUS[cpu][key] = value
Line 97:
Line 188: if not _CPUS:
: parse()
for some reasons I still think a eager initialization (cpuinfo.parse() somewhere at startup) would be nicer.
https://gerrit.ovirt.org/#/c/46912/7/lib/vdsm/utils.py
File lib/vdsm/utils.py:
Line 808: if os.path.exists(constants.P_VDSM_NODE_ID):
Line 809: with open(constants.P_VDSM_NODE_ID) as f:
Line 810: __hostUUID = f.readline().replace("\n", "")
Line 811: else:
Line 812: if cpuinfo.arch() in (cpuinfo.Architecture.X86_64):
parenthesis here seems unneeded
Line 813: ret, out, err = execCmd([constants.EXT_DMIDECODE,
Line 814: "-s",
Line 815: "system-uuid"],
Line 816: raw=True,
https://gerrit.ovirt.org/#/c/46912/7/tests/Makefile.am
File tests/Makefile.am:
Line 20:
Line 21: include $(top_srcdir)/build-aux/Makefile.subs
Line 22:
Line 23: SUBDIRS = \
Line 24: cpu\
missing space before "\"
Line 25: functional \
Line 26: devices \
Line 27: integration \
Line 28: $(NULL)
https://gerrit.ovirt.org/#/c/46912/7/tests/nettestlib.py
File tests/nettestlib.py:
Line 103: _TUNSETIFF = 0x400454ca
Line 104: elif cpuinfo.arch() == 'ppc64':
Line 105: _TUNSETIFF = 0x800454ca
Line 106: else:
Line 107: raise cpuinfo.UnsupportedArchitecture
not sure. We may probably want to skip this test, not to make it fail.
Line 108:
Line 109: _deviceListener = None
Line 110:
Line 111: def addDevice(self):
--
To view, visit https://gerrit.ovirt.org/46912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes
8 years, 7 months
Change in vdsm[master]: New before_device_create/before_nic_hotplug hook: privatevlan
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: New before_device_create/before_nic_hotplug hook: privatevlan
......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found
--
To view, visit https://gerrit.ovirt.org/24195
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idda6f193c0095241bc1540a0241d49426c000fb3
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Michael Samuel <mik(a)miknet.net>
Gerrit-Reviewer: Antoni Segura Puimedon <toni+ovirt(a)midokura.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michael Samuel <mik(a)miknet.net>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: vdsm: isolate fake_kvm into a hook
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: vdsm: isolate fake_kvm into a hook
......................................................................
Patch Set 4:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46897
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I178e0c1d5a9a8ffca2bf28b2fb404b42729dfff4
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: vdsm: introduce cpuinfo module
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: vdsm: introduce cpuinfo module
......................................................................
Patch Set 7:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: faqemu: fix
by Martin Polednik
Martin Polednik has uploaded a new change for review.
Change subject: faqemu: fix
......................................................................
faqemu: fix
Change-Id: Ied7aeee26972c12abff6e0453c8c877494f5d526
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M vdsm/virt/vmxml.py
M vdsm_hooks/faqemu/before_vm_start.py
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/46960/1
diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py
index 2b92a3a..a17f974 100644
--- a/vdsm/virt/vmxml.py
+++ b/vdsm/virt/vmxml.py
@@ -253,7 +253,7 @@
machine = self.conf.get('emulatedMachine', DEFAULT_MACHINES[self.arch])
- oselem.appendChildWithArgs('type', text='hvm', arch=self.arch,
+ oselem.appendChildWithArgs('type', text='hvm', arch=cpuinfo.arch(),
machine=machine)
qemu2libvirtBoot = {'a': 'fd', 'c': 'hd', 'd': 'cdrom', 'n': 'network'}
diff --git a/vdsm_hooks/faqemu/before_vm_start.py b/vdsm_hooks/faqemu/before_vm_start.py
index 73a1d05..2755092 100644
--- a/vdsm_hooks/faqemu/before_vm_start.py
+++ b/vdsm_hooks/faqemu/before_vm_start.py
@@ -40,6 +40,15 @@
memvalue.appendChild(domxml.createTextNode(memory))
for cputag in domxml.getElementsByTagName("cpu"):
- cputag.parentNode.removeChild(cputag)
+ for modeltag in cputag.getElementsByTagName('model'):
+ cputag.removeChild(modeltag)
+
+ for controllertag in domxml.getElementsByTagName("controller"):
+ for child in controllertag.childNodes:
+ try:
+ if child.getAttribute('type') == 'spapr-vio':
+ child.parentNode.removeChild(child)
+ except AttributeError:
+ continue
hooking.write_domxml(domxml)
--
To view, visit https://gerrit.ovirt.org/46960
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied7aeee26972c12abff6e0453c8c877494f5d526
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
8 years, 7 months
Change in vdsm[master]: vdsm: isolate fake_kvm into a hook
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: vdsm: isolate fake_kvm into a hook
......................................................................
Patch Set 3:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46897
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I178e0c1d5a9a8ffca2bf28b2fb404b42729dfff4
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: vdsm: introduce cpuinfo module
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: vdsm: introduce cpuinfo module
......................................................................
Patch Set 6:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: vdsm: isolate fake_kvm into a hook
by Martin Polednik
Martin Polednik has posted comments on this change.
Change subject: vdsm: isolate fake_kvm into a hook
......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/46897/2/vdsm.spec.in
File vdsm.spec.in:
Line 408: %description hook-fakearch
Line 409: VDSM hook that intercepts capabilities returned by VDSM to allow faking the
Line 410: target architecture.
Line 411: To enable this hook on your host, set vars.fake_kvm_support=true and target
Line 412: architecture in vars.fake_kvm_architecture in your /etc/vdsm/vdsm.conf.
> not sure this hook should be configured using the main vdsm.conf.
for backwards compatibility, I'd keep it in [vars] (at least for the current version) - good point though!
Line 413:
Line 414: %package hook-fakevmstats
Line 415: Summary: Generate random VM statistics
Line 416: Requires: %{name}
--
To view, visit https://gerrit.ovirt.org/46897
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I178e0c1d5a9a8ffca2bf28b2fb404b42729dfff4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes
8 years, 7 months
Change in vdsm[master]: vdsm: introduce cpuinfo module
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: vdsm: introduce cpuinfo module
......................................................................
Patch Set 5:
* Update tracker::IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/46912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 7 months
Change in vdsm[master]: vdsm: introduce cpuinfo module
by Martin Polednik
Martin Polednik has posted comments on this change.
Change subject: vdsm: introduce cpuinfo module
......................................................................
Patch Set 4:
(4 comments)
https://gerrit.ovirt.org/#/c/46912/4//COMMIT_MSG
Commit Message:
Line 9: The objective of the new module is encapsulating functionality related
Line 10: to CPU from bare-metal standpoint. That means parsing cpuinfo and
Line 11: exposing host architecture. This approach cleans up 'caps' module and,
Line 12: more importantly, moves the code to vdsm library - allowing hooks to
Line 13: work with cpu info and architecture.
> so we can have fakekvm/fake* as hook, right? If so (excellent goal BTW, we'
I've internally renamed fakekvm to fakearch (since that what it really is), will do!
Line 14:
Line 15: Also adds tests for POWER8 cpuinfo and unknown architectures (should we
Line 16: encounter them).
Line 17:
https://gerrit.ovirt.org/#/c/46912/4/lib/vdsm/utils.py
File lib/vdsm/utils.py:
Line 808: if os.path.exists(constants.P_VDSM_NODE_ID):
Line 809: with open(constants.P_VDSM_NODE_ID) as f:
Line 810: __hostUUID = f.readline().replace("\n", "")
Line 811: else:
Line 812: if cpuinfo.arch() in (cpuinfo.Architecture.X86_64):
> feel free to drop this if you don't like it.
nice idea! still unsure of the call operator though :)
Line 813: ret, out, err = execCmd([constants.EXT_DMIDECODE,
Line 814: "-s",
Line 815: "system-uuid"],
Line 816: raw=True,
https://gerrit.ovirt.org/#/c/46912/4/tests/Makefile.am
File tests/Makefile.am:
Line 20:
Line 21: include $(top_srcdir)/build-aux/Makefile.subs
Line 22:
Line 23: SUBDIRS = \
Line 24: cpu\
> cpuinfo maybe?
not sure about this part - I'd like to move even the libvirt cpu-related output there
Line 25: functional \
Line 26: devices \
Line 27: integration \
Line 28: $(NULL)
https://gerrit.ovirt.org/#/c/46912/4/tests/cpuinfoTests.py
File tests/cpuinfoTests.py:
Line 33: @MonkeyPatch(platform, 'machine', lambda: cpuinfo.Architecture.X86_64)
Line 34: def test_cpuinfo_E5649_x86_64(self):
Line 35: self._load_cpuinfo('cpuinfo_E5649_x86_64.out')
Line 36: self.assertEqual(set(cpuinfo.flags()),
Line 37: set('''fpu vme de pse tsc msr pae mce cx8 apic mtrr pge
> if you're gonna using split(), why don't split this already manually?
easy 'it was like that before' way, agreed that we shouldn't be *that* lazy
Line 38: mca cmov pat pse36 clflush dts acpi mmx fxsr sse
Line 39: sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm
Line 40: constant_tsc arch_perfmon pebs bts rep_good
Line 41: xtopology nonstop_tsc aperfmperf pni pclmulqdq
--
To view, visit https://gerrit.ovirt.org/46912
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa702b05f3825ebdcfed16d86d39a8c38fcf224c
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: Yes
8 years, 7 months