Change in vdsm[master]: Provisional fix: the domain is produced in the monitor threa...
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Provisional fix: the domain is produced in the monitor thread.
......................................................................
Provisional fix: the domain is produced in the monitor thread.
This should reduce the number of vgs in connectStoragePool thread.
Change-Id: I5a2d332b7bc930e681ba23141978ea4f523338d5
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/domainMonitor.py
M vdsm/storage/sp.py
2 files changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/7163/1
diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
index afda7b1..8bae2f6 100644
--- a/vdsm/storage/domainMonitor.py
+++ b/vdsm/storage/domainMonitor.py
@@ -75,18 +75,18 @@
def monitoredDomains(self):
return self._domains.keys()
- def startMonitoring(self, domain, hostId):
- if domain.sdUUID in self._domains:
+ def startMonitoring(self, sdUUID, hostId):
+ if sdUUID in self._domains:
return
status = DomainMonitorStatus()
stopEvent = Event()
thread = Thread(target=self._monitorDomain,
- args=(domain, hostId, stopEvent, status))
+ args=(sdUUID, hostId, stopEvent, status))
thread.setDaemon(True)
thread.start()
- self._domains[domain.sdUUID] = (stopEvent, thread, status)
+ self._domains[sdUUID] = (stopEvent, thread, status)
def stopMonitoring(self, sdUUID):
if sdUUID not in self._domains:
@@ -110,7 +110,8 @@
for sdUUID in self._domains.keys():
self.stopMonitoring(sdUUID)
- def _monitorDomain(self, domain, hostId, stopEvent, status):
+ def _monitorDomain(self, sdUUID, hostId, stopEvent, status):
+ domain = sdCache.produce(sdUUID)
nextStatus = DomainMonitorStatus()
isIsoDomain = domain.isISO()
lastRefresh = time()
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index ee45151..7ca2cd6 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1554,7 +1554,7 @@
if sdUUID not in monitoredDomains:
try:
self.domainMonitor \
- .startMonitoring(sdCache.produce(sdUUID), self.id)
+ .startMonitoring(sdUUID, self.id)
self.log.debug("Storage Pool `%s` started monitoring "
"domain `%s`", self.spUUID, sdUUID)
except se.StorageException:
--
To view, visit http://gerrit.ovirt.org/7163
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a2d332b7bc930e681ba23141978ea4f523338d5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
11 years
Change in vdsm[master]: Asynchronous LVM bootstrap on vdsm start
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: Asynchronous LVM bootstrap on vdsm start
......................................................................
Asynchronous LVM bootstrap on vdsm start
The lvm bootstrap might take a long time if one or more block device is
unreachable. Moving the bootstrap in the storageRefresh thread speeds up
the vdsm initialization and its responsiveness.
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=752470
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I9cbf1b8880cf2fb38f9de008f884fc0a2b92e004
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/7566/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 331a563..d708a24 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -290,9 +290,9 @@
multipath.setupMultipath()
self.__validateLvmLockingType()
- lvm._lvminfo.bootstrap()
def storageRefresh():
+ lvm._lvminfo.bootstrap()
sdCache.refreshStorage()
self.tasksDir = config.get('irs', 'hsm_tasks')
--
To view, visit http://gerrit.ovirt.org/7566
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cbf1b8880cf2fb38f9de008f884fc0a2b92e004
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years
Change in vdsm[master]: core: report cpuUser and cpuSys separately
by lhornyak@redhat.com
Laszlo Hornyak has uploaded a new change for review.
Change subject: core: report cpuUser and cpuSys separately
......................................................................
core: report cpuUser and cpuSys separately
Uses virDomainGetCPUStats to get the CPU information instead of info()
Change-Id: Iaff1e2babfa9675155072b553c38db9411e3ddd2
Signed-off-by: Laszlo Hornyak <lhornyak(a)redhat.com>
---
M vdsm/libvirtvm.py
1 file changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/5793/1
--
To view, visit http://gerrit.ovirt.org/5793
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaff1e2babfa9675155072b553c38db9411e3ddd2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak(a)redhat.com>
11 years
Change in vdsm[master]: Also remove NIC in delNetwork if no bonding configured.
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Also remove NIC in delNetwork if no bonding configured.
......................................................................
Also remove NIC in delNetwork if no bonding configured.
The client needn't specifiy
Change-Id: I42e316eeb7aa978962b7ff0def61ce6d2e8692b2
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/7712/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index fe42547..b8fbd9f 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -1049,6 +1049,7 @@
configWriter.removeBonding(bonding)
name = None if bonding == name else name
+ if implicitBonding or not bonding:
for nic in nics:
if not nicOtherUsers(network, vlan, bonding, nic):
ifdown(nic)
--
To view, visit http://gerrit.ovirt.org/7712
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42e316eeb7aa978962b7ff0def61ce6d2e8692b2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
11 years
Change in vdsm[master]: Correct vdsClient's help for the verb getVmsInfo
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Correct vdsClient's help for the verb getVmsInfo
......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/827/ : ABORTED
--
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: 3
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 Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Correct vdsClient's help for the verb getVmsInfo
......................................................................
Patch Set 3: I would prefer that you didn't submit this
Please relate to my comment about your commit message.
--
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: 3
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]: tests: Honour PYTHONPATH if set on the host
by deepakcs@linux.vnet.ibm.com
Deepak C Shetty has uploaded a new change for review.
Change subject: tests: Honour PYTHONPATH if set on the host
......................................................................
tests: Honour PYTHONPATH if set on the host
run_tests_local.sh doesn't honour PYTHONPATH if it was set.
This causes issues with the tests (sometimes) if user was using
a custom path for say libvirt ( running from a git src, rather
than installed rpm path). This path add $PYTHONPATH to the
script to fix the issue.
Change-Id: Ia4a3ac4d238da59abf558b628fa34cae90006b6e
Signed-off-by: Deepak C Shetty <deepakcs(a)linux.vnet.ibm.com>
---
M tests/run_tests_local.sh.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/7648/1
diff --git a/tests/run_tests_local.sh.in b/tests/run_tests_local.sh.in
index c4bc5c8..bb43538 100644
--- a/tests/run_tests_local.sh.in
+++ b/tests/run_tests_local.sh.in
@@ -1,2 +1,2 @@
#!/bin/sh
-PYTHONDONTWRITEBYTECODE=1 LC_ALL=C PYTHONPATH="@builddir@/vdsm:@top_srcdir@/vdsm:@top_srcdir@/vdsm_cli" @PYTHON@ @top_srcdir(a)/tests/testrunner.py --local-modules $@
+PYTHONDONTWRITEBYTECODE=1 LC_ALL=C PYTHONPATH="$PYTHONPATH:@builddir@/vdsm:@top_srcdir@/vdsm:@top_srcdir@/vdsm_cli" @PYTHON@ @top_srcdir(a)/tests/testrunner.py --local-modules $@
--
To view, visit http://gerrit.ovirt.org/7648
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4a3ac4d238da59abf558b628fa34cae90006b6e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Deepak C Shetty <deepakcs(a)linux.vnet.ibm.com>
11 years
Change in vdsm[master]: BZ#811807 Define network filter on libvirt
by masayag@redhat.com
Moti Asayag has uploaded a new change for review.
Change subject: BZ#811807 Define network filter on libvirt
......................................................................
BZ#811807 Define network filter on libvirt
The patch defines custom network filter on libvirt in order to control
the VM traffic. The custom filter is being set when VDSM service is
being started.
Change-Id: I9f1708385dec6a87bc404e4ab25c4da8ab8a8acc
Signed-off-by: Moti Asayag <masayag(a)redhat.com>
---
M vdsm.spec.in
M vdsm/Makefile.am
A vdsm/nwfilter.py
M vdsm/vdsmd.init.in
4 files changed, 120 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/7354/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 892eee3..6af8a14 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -577,6 +577,7 @@
%{_datadir}/%{vdsm_name}/vdsm-store-net-config
%{_datadir}/%{vdsm_name}/vm.py*
%{_datadir}/%{vdsm_name}/write-net-config
+%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py*
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.policy
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 5992cfa..1a6d446 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -52,7 +52,8 @@
tc.py \
vdsmDebugPlugin.py \
vmChannels.py \
- vm.py
+ vm.py \
+ nwfilter.py
dist_vdsmpylib_PYTHON = \
__init__.py \
diff --git a/vdsm/nwfilter.py b/vdsm/nwfilter.py
new file mode 100755
index 0000000..0be7568
--- /dev/null
+++ b/vdsm/nwfilter.py
@@ -0,0 +1,101 @@
+#! /usr/bin/python
+# Copyright 2012 IBM, 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
+#
+
+import libvirt
+import logging
+from vdsm import libvirtconnection
+
+
+def main():
+ """
+ Defines network filters on libvirt
+ """
+ conn = libvirtconnection.get()
+ defineNwFilter(conn, NoMacSpoofingFilter())
+ try:
+ conn.close()
+ except:
+ pass
+
+def defineNwFilter(conn, nwFilter):
+ """
+ define vdsm network filter on libvirt to control VM traffic
+ """
+
+ filter = None
+ filterName = nwFilter.filterName
+ filterXml = nwFilter.buildFilterXml()
+
+ try:
+ filter = conn.nwfilterLookupByName(filterName)
+ except libvirt.libvirtError:
+ logging.debug("No such filter: %s" % (filterName))
+
+ if filter:
+ logging.debug("Undefine filter %s" % (filter.name()))
+ try:
+ filter.undefine()
+ except libvirt.libvirtError:
+ # Ignore failure if filter already exists. Failure might occur when
+ # attempting to remove a filter which is being used by running VMs
+ pass
+ try:
+ nwFilter = conn.nwfilterDefineXML(filterXml)
+ except libvirt.libvirtError:
+ logging.error("Failed to define filter %s" % (filterName))
+ raise
+ else:
+ logging.debug("Filter %s was defined" % (nwFilter.name()))
+
+
+class VdsmNwFilter(object):
+ """
+ Base class for custom network filters
+ """
+
+ def __init__(self, name):
+ self.filterName = name
+
+ def getFilterXml(self):
+ raise NotImplementedError("Should have implemented this")
+
+ def buildFilterXml(self):
+ return self.getFilterXml() % self.filterName
+
+
+class NoMacSpoofingFilter(VdsmNwFilter):
+ """
+ Class defines the vdsm-no-mac-spoofing filter which is comprised of
+ two libvirt OOB filters: no-mac-spoofing and no-arp-mac-spoofing
+ """
+
+ def __init__(self):
+ VdsmNwFilter.__init__(self, 'vdsm-no-mac-spoofing')
+
+ def getFilterXml(self):
+ return '''<filter name='%s' chain='root'>
+ <!-- preventing MAC spoofing -->
+ <filterref filter='no-mac-spoofing'/>
+ <!-- preventing ARP MAC spoofing -->
+ <filterref filter='no-arp-mac-spoofing'/>
+ </filter> '''
+
+if __name__ == '__main__':
+ main()
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index d34b48d..70d4cd9 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -440,6 +440,20 @@
startout=`/sbin/initctl start libvirtd 2>&1`
if [[ "$?" -eq 0 || "$startout" =~ .*already\ running.* ]];
then
+
+ # Begin workaround
+ # Libvirt reports its service status as responsive despite its socket
+ # is not yet ready. Once issue fixed on libvirt, this WA shouls be removed.
+ for i in {1..20}
+ do
+ if pgrep libvirtd > /dev/null 2>&1;
+ then
+ return 0
+ fi
+ sleep 1
+ done
+ # End workaround
+
return 0
else
echo "$startout" >&2
@@ -469,6 +483,8 @@
return $ret_val
fi
+ @VDSMDIR(a)/nwfilter.py
+
@VDSMDIR@/vdsm-restore-net-config
load_needed_modules
mk_data_center
--
To view, visit http://gerrit.ovirt.org/7354
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f1708385dec6a87bc404e4ab25c4da8ab8a8acc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masayag(a)redhat.com>
11 years
Change in vdsm[master]: [WIP] Upgrade a data domain on attachSD when required
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: [WIP] Upgrade a data domain on attachSD when required
......................................................................
[WIP] Upgrade a data domain on attachSD when required
RHBZ: 844367
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-ID: I65dfd6dd339569fbaf276f3942a001c174423b1a
---
M vdsm/storage/sp.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/7444/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index da403d9..4d2e0cf 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -935,7 +935,7 @@
# If you remove this condition, remove it from
# public_createStoragePool too.
- if dom.isData() and domVers != mstVers:
+ if dom.isData() and domVers > mstVers:
raise se.MixedSDVersionError(dom.sdUUID, domVers,
self.masterDomain.sdUUID, mstVers)
--
To view, visit http://gerrit.ovirt.org/7444
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65dfd6dd339569fbaf276f3942a001c174423b1a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years
Change in vdsm[master]: avoid _blockstatsParses throw exception when lacking some fi...
by lvroyce@linux.vnet.ibm.com
Royce Lv has uploaded a new change for review.
Change subject: avoid _blockstatsParses throw exception when lacking some fields
......................................................................
avoid _blockstatsParses throw exception when lacking some fields
libvirt may return stats with some fields when running query-blockstats
avoid _blockstatsParses to throw exception when encounter keyError
Change-Id: Id898b1456d874b1a02f04115e285e329eb1c81e0
Signed-off-by: Royce Lv<lvroyce(a)linux.vnet.ibm.com>
---
M vdsm/libvirtvm.py
M vdsm/storage/hsm.py
2 files changed, 17 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/4304/1
--
To view, visit http://gerrit.ovirt.org/4304
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id898b1456d874b1a02f04115e285e329eb1c81e0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
11 years