Change in vdsm[master]: tcTests: make non-local tests run
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: tcTests: make non-local tests run
......................................................................
tcTests: make non-local tests run
Change-Id: I68e4b42c12a6494cbfd73245e3427bab2943c499
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/tcTests.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/7570/1
diff --git a/tests/tcTests.py b/tests/tcTests.py
index db6304f..dee8c5b 100644
--- a/tests/tcTests.py
+++ b/tests/tcTests.py
@@ -34,7 +34,7 @@
from testrunner import VdsmTestCase as TestCaseBase
from testValidation import ValidateRunningAsRoot
-from constants import EXT_BRCTL, EXT_TC
+from vdsm.constants import EXT_BRCTL, EXT_TC
from nose.plugins.skip import SkipTest
import tc
--
To view, visit http://gerrit.ovirt.org/7570
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I68e4b42c12a6494cbfd73245e3427bab2943c499
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: spec: declare mkimageTests' requirement of genisoimage
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: spec: declare mkimageTests' requirement of genisoimage
......................................................................
spec: declare mkimageTests' requirement of genisoimage
Change-Id: Iebdfee2c57c62bb5c13608b86e468435e921eb88
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/7674/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 0d1b195..9e461e0 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -34,6 +34,7 @@
BuildRequires: python-ethtool
BuildRequires: libvirt-python
BuildRequires: sanlock-python >= 2.3
+BuildRequires: genisoimage
%if !0%{?rhel}
BuildRequires: systemd-units
--
To view, visit http://gerrit.ovirt.org/7674
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebdfee2c57c62bb5c13608b86e468435e921eb88
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: Correct vdsClient's help for the verb getVmsInfo
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Correct vdsClient's help for the verb getVmsInfo
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(2 inline comments)
....................................................
Commit Message
Line 5: CommitDate: 2012-08-29 13:37:23 +0800
Line 6:
Line 7: Correct vdsClient's help for the verb getVmsInfo
Line 8:
Line 9: https://bugzilla.redhat.com/show_bug.cgi?id=727791
please use
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=727791
Line 10:
Line 11: replace the help with the following:
Line 12: getVmsInfo <spUUID> [<sdUUID> [vmList](vmId1,vmId2,...)]
Line 13:
....................................................
File vdsm_cli/vdsClient.py
Line 2222: )),
Line 2223: 'getVmsInfo': (serv.do_getVmsInfo,
Line 2224: ('<spUUID> [<sdUUID> [vmList](vmId1,vmId2,...)]',
Line 2225: 'Return info of VMs from the pool or a backup domain '
Line 2226: 'if it\'s sdUUID given. If vmList also given, only get '
it's->its
If vmList also given-> If vmList is also given
Line 2227: 'info for these VMs.'
Line 2228: )),
Line 2229: 'getVmsList': (serv.do_getVmsList,
Line 2230: ('<spUUID> [sdUUID]',
--
To view, visit http://gerrit.ovirt.org/7560
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I152f28dea29f6ac6bb61c0597dbd3b596646c569
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years
Change in vdsm[master]: Correct vdsClient's help for the verb getVmsInfo
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: Correct vdsClient's help for the verb getVmsInfo
......................................................................
Patch Set 2: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.ovirt.org/7560
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I152f28dea29f6ac6bb61c0597dbd3b596646c569
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhu Bo <bozhu(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
11 years
Change in vdsm[master]: libvirtvm: unsetPortMirroring just before hotunplug
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: libvirtvm: unsetPortMirroring just before hotunplug
......................................................................
libvirtvm: unsetPortMirroring just before hotunplug
Change-Id: I4c4ae92d5beb4b7eec08912aae5e2ba4761a7248
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/7425/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index acc9399..e3d8915 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -1436,6 +1436,10 @@
break
if nic:
+ if hasattr(nic, 'portMirroring'):
+ for network in nic.portMirroring:
+ supervdsm.getProxy().unsetPortMirroring(network, nic.name)
+
nicXml = nic.getXML().toprettyxml(encoding='utf-8')
self.log.debug("Hotunplug NIC xml: %s", nicXml)
else:
--
To view, visit http://gerrit.ovirt.org/7425
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c4ae92d5beb4b7eec08912aae5e2ba4761a7248
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: BZ#845193 - Remove BRIDGE from nic/bond cofig file when remo...
by Igor Lvovsky
Igor Lvovsky has uploaded a new change for review.
Change subject: BZ#845193 - Remove BRIDGE from nic/bond cofig file when removing bridge
......................................................................
BZ#845193 - Remove BRIDGE from nic/bond cofig file when removing bridge
Change-Id: I4b1c678469cee610d346d1e4905ee1f02f58f4bc
Signed-off-by: Igor Lvovsky <ilvovsky(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/7600/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 58117f8..74d19c7 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -1034,18 +1034,21 @@
if network and bridged:
configWriter.removeBridge(network)
+ name = None
if vlan:
configWriter.removeVlan(vlan, bonding or nics[0])
-
- # When removing bridgeless non-VLANed network
- # we need to remove IP/NETMASK from the cfg file
- name = None
- if not bridged and not vlan:
+ else:
name = bonding if bonding else nics[0]
- # Just edit the bond/nic cfg file
cf = configWriter.NET_CONF_PREF + name
- for key in ('IPADDR', 'NETMASK', 'GATEWAY', 'BOOTPROTO'):
- configWriter._updateConfigValue(cf, key, '', True)
+ if not bridged:
+ # When removing bridgeless non-VLANed network
+ # we need to remove IP/NETMASK from the cfg file
+ for key in ('IPADDR', 'NETMASK', 'GATEWAY', 'BOOTPROTO'):
+ configWriter._updateConfigValue(cf, key, '', True)
+ else:
+ # When removing bridged non-VLANed network
+ # we need to remove BRIDGE from the cfg file
+ configWriter._updateConfigValue(cf, 'BRIDGE', '', True)
# The (relatively) new setupNetwork verb allows to remove a network
# defined on top of an bonding device without break the bond itself.
--
To view, visit http://gerrit.ovirt.org/7600
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b1c678469cee610d346d1e4905ee1f02f58f4bc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
11 years
Change in vdsm[master]: tc: _delTarget: fix an evil type error
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: tc: _delTarget: fix an evil type error
......................................................................
tc: _delTarget: fix an evil type error
In a former commit 9adf78d9 I thought that returning _delTarget()
returning a set() would be a good idea. It was swiftly converted to
list() in commit 61f1ff45, forgetting this line behind.
Change-Id: Ib45748bc4004912601c58ce10cf9e788063712f8
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/tc.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/7668/1
diff --git a/vdsm/tc.py b/vdsm/tc.py
index 1a76d96..a0a612f 100644
--- a/vdsm/tc.py
+++ b/vdsm/tc.py
@@ -53,7 +53,7 @@
if fs:
filt = fs[0]
else:
- return set([])
+ return []
devices = set(ethtool.get_devices())
acts = [act for act in filt.actions
--
To view, visit http://gerrit.ovirt.org/7668
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib45748bc4004912601c58ce10cf9e788063712f8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: bootstrap: sync utils.getHostUUID() with deployUtil.getHostI...
by Alon Bar-Lev
Alon Bar-Lev has uploaded a new change for review.
Change subject: bootstrap: sync utils.getHostUUID() with deployUtil.getHostID()
......................................................................
bootstrap: sync utils.getHostUUID() with deployUtil.getHostID()
Apparently, the host id is gotten in three different places:
1. Engine VdsInstaller::ConfigValues.BootstrapNodeIDCommand
2. deployUtil.getHostID()
3. utils.getHostUUID()
Change-Id Iae0713f95 did not handle (3).
Change-Id: I0c99fb4e99ca951e1daf4e856fc473ba82088d1c
Signed-off-by: Alon Bar-Lev <alonbl(a)redhat.com>
---
M vdsm/utils.py
1 file changed, 26 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/7659/1
diff --git a/vdsm/utils.py b/vdsm/utils.py
index 5e2d4e5..02db29f 100644
--- a/vdsm/utils.py
+++ b/vdsm/utils.py
@@ -36,6 +36,7 @@
import fcntl
import functools
import stat
+import glob
import ethtool
@@ -663,6 +664,30 @@
except:
return False
+def _getAllMacs():
+
+ # (
+ # 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'):
+ mac = file(os.path.join(os.path.dirname(b), "address")). \
+ readline().replace("\n", "")
+ macs.append(mac)
+
+ for b in glob.glob('/proc/net/bonding/*'):
+ for line in file(b):
+ if line.startswith("Permanent HW addr: "):
+ macs.append(line.split(": ")[1].replace("\n", ""))
+
+ return set(macs) - set(["", "00:00:00:00:00:00"])
__hostUUID = ''
def getHostUUID():
@@ -687,9 +712,8 @@
else:
logging.warning('Could not find host UUID.')
- nics = netinfo.get()['nics']
try:
- mac = sorted([v['hwaddr'] for v in nics.itervalues()])[0]
+ mac = sorted(_getAllMacs())[0]
except:
mac = ""
logging.warning('Could not find host MAC.', exc_info=True)
--
To view, visit http://gerrit.ovirt.org/7659
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c99fb4e99ca951e1daf4e856fc473ba82088d1c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl(a)redhat.com>
11 years
Change in vdsm[master]: tc: avoid adding non-existing devices to filter
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: tc: avoid adding non-existing devices to filter
......................................................................
tc: avoid adding non-existing devices to filter
When a mirroring target dies, its tap device are removed. On `tc filter
show`, the tap device name is replaced with a string like `if17`, which
is not a name of an existing device.
This patch is somewhat racy, as another qemu may die just before the new
filter is set.
Change-Id: I9c1b459557985a3a894f182880411889f2c8a06f
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/tc.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/7631/1
diff --git a/vdsm/tc.py b/vdsm/tc.py
index 47a7b96..d363d35 100644
--- a/vdsm/tc.py
+++ b/vdsm/tc.py
@@ -20,6 +20,8 @@
from collections import namedtuple
+import ethtool
+
import storage.misc
from vdsm.constants import EXT_TC, EXT_IFCONFIG
@@ -55,6 +57,7 @@
acts = set(filt.actions)
acts.discard(MirredAction(target))
+ acts.update(ethtool.get_devices())
if acts:
filt = Filter(prio=filt.prio, handle=filt.handle, actions=acts)
--
To view, visit http://gerrit.ovirt.org/7631
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c1b459557985a3a894f182880411889f2c8a06f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: tc: unsetPortMirroring: deleting a target twice is fine
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: tc: unsetPortMirroring: deleting a target twice is fine
......................................................................
tc: unsetPortMirroring: deleting a target twice is fine
We should not explode if a mirroring target is already gone when
unsetPortMirroring is called.
Change-Id: I90f90164557548d38aa0e6991c4020055f892edb
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/tc.py
1 file changed, 17 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/30/7630/1
diff --git a/vdsm/tc.py b/vdsm/tc.py
index 570c410..47a7b96 100644
--- a/vdsm/tc.py
+++ b/vdsm/tc.py
@@ -47,13 +47,21 @@
def _delTarget(network, parent, target):
- filt = list(filters(network, parent))[0]
- filt.actions.remove(MirredAction(target))
- if filt.actions:
+ fs = list(filters(network, parent))
+ if fs:
+ filt = fs[0]
+ else:
+ return set([])
+
+ acts = set(filt.actions)
+ acts.discard(MirredAction(target))
+
+ if acts:
+ filt = Filter(prio=filt.prio, handle=filt.handle, actions=acts)
filter_replace(network, parent, filt)
else:
filter_del(network, target, parent, filt.prio)
- return filt.actions
+ return acts
def setPortMirroring(network, target):
@@ -71,8 +79,11 @@
# TODO handle the case where we have partial definitions on device due to
# vdsm crash
acts = _delTarget(network, QDISC_INGRESS, target)
- qdisc_id = _qdiscs_of_device(network).next()
- acts += _delTarget(network, qdisc_id, target)
+ try:
+ qdisc_id = _qdiscs_of_device(network).next()
+ acts |= _delTarget(network, qdisc_id, target)
+ except StopIteration:
+ pass
if not acts:
qdisc_del(network, 'root')
--
To view, visit http://gerrit.ovirt.org/7630
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90f90164557548d38aa0e6991c4020055f892edb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years