Alon Bar-Lev has uploaded a new change for review.
Change subject: bootstrap: node id: consider bonding MAC addresses as well
......................................................................
bootstrap: node id: consider bonding MAC addresses as well
The node id is constructed using the lowest MAC address.
If bonding is applied after initial node id was taken, it may shade the
minimal address.
This change adds to the MAC addresses of bonding interfaces to the MAC
address addresses to consider.
Sync with engine command used for same purpose.
Change-Id: Iae0713f95c25e3e05b24bf8254499e4cd8e64d10
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M vdsm_reg/deployUtil.py.in
1 file changed, 26 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/7596/1
diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
index e22bfb5..fc7df29 100644
--- a/vdsm_reg/deployUtil.py.in
+++ b/vdsm_reg/deployUtil.py.in
@@ -290,13 +290,36 @@
return strReturn
def getMacs():
+
+ # (
+ # find /sys/class/net/*/device | while read f; do \
+ # cat "$(dirname "$f")/address"; \
+ # done; \
+ # [ -d /proc/net/bonding ] && \
+ # find /proc/net/bonding -type f -exec cat '{}' \; | \
+ # grep 'Permanent HW addr:' | \
+ # sed 's/.* //'
+ # ) | sed -e '/00:00:00:00/d' -e '/^$/d'
+
macs = []
for b in glob.glob('/sys/class/net/*/device'):
- nic = b.split('/')[-2]
- addr = '/sys/class/net/' + nic + '/address'
- mac = file(addr).readlines()[0].split()[0]
+ mac = file(os.path.join(os.path.dirname(b), "address")). \
+ readline().replace("\n", "")
macs.append(mac)
+ for b in glob.glob('/proc/net/bonding/*'):
+ lines = file(b).readlines()
+ try:
+ line = (string for i, string in enumerate(lines) \
+ if "Permanent HW addr: " in string).next()
+ macs.append(line.split(": ")[1].replace("\n", ""))
+ except StopIteration:
+ pass
+
+ for r in ("", "00:00:00:00:00:00"):
+ while macs.count(r):
+ macs.remove(r)
+
return macs
def getHostID():
--
To view, visit http://gerrit.ovirt.org/7596
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae0713f95c25e3e05b24bf8254499e4cd8e64d10
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: momTest: improve test's error reports
......................................................................
momTest: improve test's error reports
The test is skipped if MOM is not installed on host.
Also, the returned value of the setMOMPolicy call is checked.
MOMTest.testKSM still fails on my host, but at least I can tell when in
the test process it has happened.
Change-Id: If4298572eef9db20263ed00a603085b3830a7dbd
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/functional/momTests.py
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/7571/1
diff --git a/tests/functional/momTests.py b/tests/functional/momTests.py
index f5110a2..584468a 100644
--- a/tests/functional/momTests.py
+++ b/tests/functional/momTests.py
@@ -17,12 +17,19 @@
#
# Refer to the README and COPYING files for full details of the license
#
+import imp
import random
import time
+
import testValidation
from testrunner import VdsmTestCase as TestCaseBase
+from nose.plugins.skip import SkipTest
from vdsm import vdscli
+try:
+ imp.find_module('mom')
+except ImportError:
+ raise SkipTest('MOM is not installed')
class MOMTest(TestCaseBase):
@@ -37,7 +44,8 @@
(Host.Control "ksm_pages_to_scan" %d)""" % \
(run, pages_to_scan)
s = vdscli.connect()
- s.setMOMPolicy(testPolicyStr)
+ r = s.setMOMPolicy(testPolicyStr)
+ self.assertEqual(r['status']['code'], 0, str(r))
# Wait for the policy taking effect
time.sleep(10)
--
To view, visit http://gerrit.ovirt.org/7571
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4298572eef9db20263ed00a603085b3830a7dbd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: Add a basic xmlrpc functional test
......................................................................
Add a basic xmlrpc functional test
Change-Id: I6ab2ac67717339cac697df4b507e65cf0a4a8f19
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/functional/Makefile.am
A tests/functional/xmlrpcTests.py
2 files changed, 71 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/5788/1
--
To view, visit http://gerrit.ovirt.org/5788
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ab2ac67717339cac697df4b507e65cf0a4a8f19
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
ShaoHe Feng has uploaded a new change for review.
Change subject: fix TypeError of _eqSplit in vdsClient.py
......................................................................
fix TypeError of _eqSplit in vdsClient.py
list type can not be a hash key
Change-Id: I98b5573499adaa1b64f8343b445cc16df8f60f3d
Signed-off-by: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
---
M vdsm_cli/vdsClient.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/7200/1
diff --git a/vdsm_cli/vdsClient.py b/vdsm_cli/vdsClient.py
index 7e02c1d..8a95dc6 100644
--- a/vdsm_cli/vdsClient.py
+++ b/vdsm_cli/vdsClient.py
@@ -1408,7 +1408,7 @@
if len(kv) == 2:
k, v = kv
else:
- k, v = kv, ''
+ k, v = kv[0], ''
d[k] = v
return d
--
To view, visit http://gerrit.ovirt.org/7200
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I98b5573499adaa1b64f8343b445cc16df8f60f3d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Federico Simoncelli has uploaded a new change for review.
Change subject: Check if libvirtd.upstart is present before copying
......................................................................
Check if libvirtd.upstart is present before copying
If the (libvirt) packaged upstart script is present in the rpm list
of files but is absent from the filesystem the initscript was failing
because the cp command couldn't copy it. This is mostly interesting
in stripped down installations as the ovirt-node.
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I1ba7d52d21e2a072b99ffc9055327d217c78e8fc
---
M vdsm/vdsmd.init.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/7375/1
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index a57649f..a222e21 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -433,7 +433,7 @@
/bin/grep libvirtd.upstart | /usr/bin/tail -1`
target=/etc/init/libvirtd.conf
- if ! diff -q "$packaged" "$target" >/dev/null;
+ if [[ -f "$packaged" ]] && ! diff -q "$packaged" "$target" >/dev/null;
then
/bin/cp -p "$packaged" "$target" || return 1
/sbin/initctl reload-configuration
--
To view, visit http://gerrit.ovirt.org/7375
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ba7d52d21e2a072b99ffc9055327d217c78e8fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: libvirtvm: allow acpi again
......................................................................
libvirtvm: allow acpi again
Commit c3e2272f has mistakenly changed
<features>
<acpi/>
</features>
into
<features>
acpi
</features>
which caused VMs to start up silently with no acpi support. This patch
reverts the offending part of the above commit.
Bug initially reported by Itzik Brown.
Change-Id: I591c40678f030f1bcd4cb7cb42c21907420f7cf1
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/7533/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index a975206..c29a1a9 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -726,7 +726,8 @@
<features/>
"""
if utils.tobool(self.conf.get('acpiEnable', 'true')):
- self.appendChildWithText('features', 'acpi')
+ self.dom.appendChild(self.doc.createElement('features')) \
+ .appendChild(self.doc.createElement('acpi'))
def appendCpu(self):
"""
--
To view, visit http://gerrit.ovirt.org/7533
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I591c40678f030f1bcd4cb7cb42c21907420f7cf1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>