Change in vdsm[master]: libvirtvm: use <interface type='network'>
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: libvirtvm: use <interface type='network'>
......................................................................
libvirtvm: use <interface type='network'>
In the future, this would allow us to migrate a VM from a bridge-based
network to funkier types of networks defined in
http://libvirt.org/formatnetwork.html .
Change-Id: If173a6351b1033c3a1c821cbadd05a2cbdf3d76c
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/libvirtvmTests.py
M vdsm/libvirtvm.py
2 files changed, 15 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/9441/1
diff --git a/tests/libvirtvmTests.py b/tests/libvirtvmTests.py
index 4293276..2a0f097 100644
--- a/tests/libvirtvmTests.py
+++ b/tests/libvirtvmTests.py
@@ -261,10 +261,10 @@
def testInterfaceXML(self):
interfaceXML = """
- <interface type="bridge"> <address %s/>
+ <interface type="network"> <address %s/>
<mac address="52:54:00:59:F5:3F"/>
<model type="virtio"/>
- <source bridge="ovirtmgmt"/>
+ <source network="vdsm-ovirtmgmt"/>
<filterref filter="no-mac-spoofing"/>
<boot order="1"/>
<driver name="vhost"/>
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 3439dc3..7bbab95 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -982,16 +982,17 @@
"""
Create domxml for network interface.
- <interface type="bridge">
+ <interface type="network">
<mac address="aa:bb:dd:dd:aa:bb"/>
<model type="virtio"/>
- <source bridge="engine"/>
+ <source network="vdsm-engine"/>
[<filterref filter='filter name'/>]
[<tune><sndbuf>0</sndbuf></tune>]
</interface>
"""
doc = xml.dom.minidom.Document()
iface = self.createXmlElem('interface', self.device, ['address'])
+ iface.setAttribute('type', 'network')
m = doc.createElement('mac')
m.setAttribute('address', self.macAddr)
iface.appendChild(m)
@@ -999,7 +1000,7 @@
m.setAttribute('type', self.nicModel)
iface.appendChild(m)
m = doc.createElement('source')
- m.setAttribute('bridge', self.network)
+ m.setAttribute('network', netinfo.LIBVIRT_NET_PREFIX + self.network)
iface.appendChild(m)
if hasattr(self, 'filter'):
m = doc.createElement('filterref')
@@ -2790,10 +2791,15 @@
mac = x.getElementsByTagName('mac')[0].getAttribute('address')
alias = x.getElementsByTagName('alias')[0].getAttribute('name')
model = x.getElementsByTagName('model')[0].getAttribute('type')
- bridge = None
+
+ network = None
source = x.getElementsByTagName('source')
if source:
- bridge = source[0].getAttribute('bridge')
+ network = source[0].getAttribute('bridge')
+ if not network:
+ network = source[0].getAttribute('network')
+ network = network[len(netinfo.LIBVIRT_NET_PREFIX):]
+
# Get nic address
address = self._getUnderlyingDeviceAddress(x)
for nic in self._devices[vm.NIC_DEVICES]:
@@ -2819,8 +2825,8 @@
'address': address,
'alias': alias,
'name': name}
- if bridge:
- nicDev['network'] = bridge
+ if network:
+ nicDev['network'] = network
self.conf['devices'].append(nicDev)
def _setWriteWatermarks(self):
--
To view, visit http://gerrit.ovirt.org/9441
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If173a6351b1033c3a1c821cbadd05a2cbdf3d76c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[ovirt-3.4]: logging: Enable all loggers
by ybronhei@redhat.com
Hello Nir Soffer, Dima Kuznetsov, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/25451
to review the following change.
Change subject: logging: Enable all loggers
......................................................................
logging: Enable all loggers
Unless disable_existsing_loggers is passed as false, logging checks
the pre-existing logs and disables any that are not mentioned in the
configuration file, this causes various logs to be not visible.
Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060510
Signed-off-by: Dima Kuznetsov <dkuznets(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/25185
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/tool/upgrade.py
M vdsm/supervdsmServer
M vdsm/ut/ivdsm.py
M vdsm/vdsm
M vdsm/vdsm-restore-net-config
M vdsm_reg/vdsm-reg-setup.in
6 files changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/25451/1
diff --git a/lib/vdsm/tool/upgrade.py b/lib/vdsm/tool/upgrade.py
index f013798..2e19701 100644
--- a/lib/vdsm/tool/upgrade.py
+++ b/lib/vdsm/tool/upgrade.py
@@ -57,7 +57,8 @@
# This will override VDSM's root logger but will keep the other
# loggers intact. During an upgrade we add the update handler
# to all loggers.
- logging.config.fileConfig(P_VDSM_CONF + 'logger.conf')
+ logging.config.fileConfig(P_VDSM_CONF + 'logger.conf',
+ disable_existing_loggers=False)
logging.config.fileConfig(P_VDSM_CONF + 'upgrade.logger.conf',
disable_existing_loggers=False)
chown(
diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
index 21351c3..dbf1498 100755
--- a/vdsm/supervdsmServer
+++ b/vdsm/supervdsmServer
@@ -34,7 +34,7 @@
LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf"
try:
- logging.config.fileConfig(LOG_CONF_PATH)
+ logging.config.fileConfig(LOG_CONF_PATH, disable_existing_loggers=False)
except:
logging.basicConfig(filename='/dev/stdout', filemode='w+',
level=logging.DEBUG)
diff --git a/vdsm/ut/ivdsm.py b/vdsm/ut/ivdsm.py
index 086e90c..a6dcd91 100644
--- a/vdsm/ut/ivdsm.py
+++ b/vdsm/ut/ivdsm.py
@@ -42,7 +42,7 @@
import clientIF
loggerConfFile = loggerConfigurationPath
- lconfig.fileConfig(loggerConfFile)
+ lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False)
log = logging.getLogger('vds')
config.read(configFilePath)
diff --git a/vdsm/vdsm b/vdsm/vdsm
index d91704a..1f72755 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -79,7 +79,7 @@
def run(pidfile=None):
- lconfig.fileConfig(loggerConfFile)
+ lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False)
logging.addLevelName(5, 'TRACE')
logging.TRACE = 5 # impolite but helpful
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index fc2308b..9e90be8 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -69,7 +69,8 @@
if __name__ == '__main__':
try:
- logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf')
+ logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf',
+ disable_existing_loggers=False)
except:
logging.basicConfig(filename='/dev/stdout', filemode='w+',
level=logging.DEBUG)
diff --git a/vdsm_reg/vdsm-reg-setup.in b/vdsm_reg/vdsm-reg-setup.in
index 6489d8a..9bc58dd 100644
--- a/vdsm_reg/vdsm-reg-setup.in
+++ b/vdsm_reg/vdsm-reg-setup.in
@@ -246,7 +246,7 @@
if daemonize:
createDaemon.createDaemon()
#set up logger
- logging.config.fileConfig(loggerConf)
+ logging.config.fileConfig(loggerConf, disable_existing_loggers=False)
log = logging.getLogger('')
if daemonize:
log = logging.getLogger('vdsRegistrator')
--
To view, visit http://gerrit.ovirt.org/25451
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vm: Set numatune and guest numa topology
by fromani@redhat.com
Francesco Romani has posted comments on this change.
Change subject: vm: Set numatune and guest numa topology
......................................................................
Patch Set 2: Code-Review+1
looks OK.
It seems already OK, but please be careful when adding CPU features: make sure PPC64 supports them, or add them only in the X86_64 path.
Once again: at glance it seems already OK but I was bitten by this once and I'd like to point out.
--
To view, visit http://gerrit.ovirt.org/25254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88ec56047809b03449a788ead0b97f9ed876712d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 2 months
Change in vdsm[master]: Added network directory
by amuller@redhat.com
Assaf Muller has uploaded a new change for review.
Change subject: Added network directory
......................................................................
Added network directory
To-Do in a follow up patch:
Added a network directory under lib/vdsm, put ipwrapper,
netinfo and netconfpersistence there.
Change-Id: If9c7e8cfc96cc1671ed7549c2f45ca820211c7c1
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M AUTHORS
M Makefile.am
M configure.ac
M debian/vdsm.install
M lib/vdsm/tool/upgrade_300_networks.py
M tests/configNetworkTests.py
M tests/functional/networkTests.py
M tests/netconfTests.py
M tests/netmodelsTests.py
M vdsm.spec.in
M vdsm/API.py
M vdsm/Makefile.am
C vdsm/network/Makefile.am
C vdsm/network/__init__.py
R vdsm/network/addNetwork
R vdsm/network/configNetwork.py
R vdsm/network/delNetwork
R vdsm/network/netconf/Makefile.am
R vdsm/network/netconf/__init__.py
R vdsm/network/netconf/ifcfg.py
R vdsm/network/netconf/iproute2.py
R vdsm/network/netconf/libvirtCfg.py
R vdsm/network/neterrors.py
R vdsm/network/netmodels.py
R vdsm/network/sourceRoute.py
R vdsm/network/sourceRoute.sh
R vdsm/network/sourceRouteThread.py
R vdsm/network/vdsm-restore-net-config
R vdsm/network/vdsm-store-net-config.in
M vdsm/supervdsmServer
30 files changed, 94 insertions(+), 114 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/22694/1
diff --git a/AUTHORS b/AUTHORS
index 1faf4eb..e99f023 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -25,6 +25,7 @@
Adam Litke <agl(a)us.ibm.com>
Igor Lvovsky <ilvovsky(a)redhat.com>
Sanjay Mehrotra <smehrotr(a)redhat.com>
+ Assaf Muller <amuller(a)redhat.com>
Robert Munilla <rmunilla(a)redhat.com>
David Naori <dnaori(a)redhat.com>
Yotam Oron <yoron(a)redhat.com>
diff --git a/Makefile.am b/Makefile.am
index 9b1a3c9..12f939c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -64,7 +64,8 @@
vdsm-tool \
vdsm/*.py \
vdsm/*.py.in \
- vdsm/netconf \
+ vdsm/network \
+ vdsm/network/netconf \
vdsm/sos/vdsm.py.in \
vdsm/storage \
vdsm/vdsm \
diff --git a/configure.ac b/configure.ac
index bd44d83..f552b13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,7 +269,8 @@
vdsm-tool/Makefile
vdsm/Makefile
vdsm/gluster/Makefile
- vdsm/netconf/Makefile
+ vdsm/network/Makefile
+ vdsm/network/netconf/Makefile
vdsm/sos/Makefile
vdsm/storage/Makefile
vdsm/storage/imageRepository/Makefile
diff --git a/debian/vdsm.install b/debian/vdsm.install
index c81bdf2..efd4a88 100644
--- a/debian/vdsm.install
+++ b/debian/vdsm.install
@@ -42,7 +42,6 @@
./usr/share/vdsm/blkid.py
./usr/share/vdsm/caps.py
./usr/share/vdsm/clientIF.py
-./usr/share/vdsm/configNetwork.py
./usr/share/vdsm/daemonAdapter
./usr/share/vdsm/debugPluginClient.py
./usr/share/vdsm/delNetwork
@@ -65,19 +64,21 @@
./usr/share/vdsm/mk_sysprep_floppy
./usr/share/vdsm/mkimage.py
./usr/share/vdsm/momIF.py
-./usr/share/vdsm/netconf/__init__.py
-./usr/share/vdsm/netconf/ifcfg.py
-./usr/share/vdsm/netconf/iproute2.py
-./usr/share/vdsm/netconf/libvirtCfg.py
-./usr/share/vdsm/neterrors.py
-./usr/share/vdsm/netmodels.py
+./usr/share/vdsm/network/netconf/__init__.py
+./usr/share/vdsm/network/netconf/ifcfg.py
+./usr/share/vdsm/network/netconf/iproute2.py
+./usr/share/vdsm/network/netconf/libvirtCfg.py
+./usr/share/vdsm/network/__init__.py
+./usr/share/vdsm/network/configNetwork.py
+./usr/share/vdsm/network/neterrors.py
+./usr/share/vdsm/network/netmodels.py
+./usr/share/vdsm/network/sourceRoute.py
+./usr/share/vdsm/network/sourceRouteThread.py
./usr/share/vdsm/parted_utils.py
./usr/share/vdsm/ppc64HardwareInfo.py
./usr/share/vdsm/respawn
./usr/share/vdsm/sampling.py
./usr/share/vdsm/set-conf-item
-./usr/share/vdsm/sourceRoute.py
-./usr/share/vdsm/sourceRouteThread.py
./usr/share/vdsm/storage/__init__.py
./usr/share/vdsm/storage/blockSD.py
./usr/share/vdsm/storage/blockVolume.py
diff --git a/lib/vdsm/tool/upgrade_300_networks.py b/lib/vdsm/tool/upgrade_300_networks.py
index 0f754fd..7f1eb66 100644
--- a/lib/vdsm/tool/upgrade_300_networks.py
+++ b/lib/vdsm/tool/upgrade_300_networks.py
@@ -27,7 +27,7 @@
from vdsm.tool.upgrade import upgrade
sys.path.append("/usr/share/vdsm")
-from netconf import ifcfg
+from network.netconf import ifcfg
def isNeeded(networks, bridges):
diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py
index a72fe96..1b717a9 100644
--- a/tests/configNetworkTests.py
+++ b/tests/configNetworkTests.py
@@ -20,14 +20,9 @@
# Refer to the README and COPYING files for full details of the license
#
-from netmodels import Bond
-from netmodels import Bridge
-from netmodels import Nic
-from netmodels import Vlan
+from network.netmodels import Bond, Bridge, Nic, Vlan
+from network import configNetwork, netconf, neterrors
from vdsm import netinfo
-import configNetwork
-import netconf
-import neterrors
from testrunner import VdsmTestCase as TestCaseBase
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 6ecced8..dbada07 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -20,7 +20,6 @@
from functools import wraps
import os.path
-import neterrors
from storage.misc import RollbackContext
from hookValidation import ValidatesHook
@@ -32,6 +31,7 @@
import dnsmasq
import dummy
import firewall
+from network import neterrors
import veth
from nose.plugins.skip import SkipTest
from utils import SUCCESS, VdsProxy, cleanupRules
diff --git a/tests/netconfTests.py b/tests/netconfTests.py
index 919a5eb..00d012e 100644
--- a/tests/netconfTests.py
+++ b/tests/netconfTests.py
@@ -20,6 +20,7 @@
# Refer to the README and COPYING files for full details of the license
#
+from nose.plugins.skip import SkipTest
import os
import pwd
import re
@@ -29,12 +30,10 @@
from xml.dom.minidom import parseString
from vdsm import netinfo
-from netconf import ifcfg
-from netconf import libvirtCfg
+from network.netconf import ifcfg, libvirtCfg
from monkeypatch import MonkeyPatch
from monkeypatch import MonkeyPatchScope
-from nose.plugins.skip import SkipTest
from testrunner import VdsmTestCase as TestCaseBase
diff --git a/tests/netmodelsTests.py b/tests/netmodelsTests.py
index 6181a9e..be07a02 100644
--- a/tests/netmodelsTests.py
+++ b/tests/netmodelsTests.py
@@ -21,19 +21,13 @@
#
import os
-from netmodels import Bond
-from netmodels import Bridge
-from netmodels import IPv4
-from netmodels import Nic
-from netmodels import Vlan
-from netmodels import _nicSort
-from vdsm import netinfo
-import neterrors
-
-from testrunner import VdsmTestCase as TestCaseBase
-from testValidation import ValidateRunningAsRoot
from nose.plugins.skip import SkipTest
+from network.netmodels import Bond, Bridge, IPv4, Vlan, Nic, _nicSort
+from vdsm import netinfo
+from network import neterrors
+from testrunner import VdsmTestCase as TestCaseBase
+from testValidation import ValidateRunningAsRoot
from monkeypatch import MonkeyPatch
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 0f7f4d4..425cb3d 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -861,7 +861,8 @@
%dir %{_sysconfdir}/%{vdsm_name}
%dir %{_sysconfdir}/%{vdsm_name}/mom.d
%dir %{_datadir}/%{vdsm_name}
-%dir %{_datadir}/%{vdsm_name}/netconf
+%dir %{_datadir}/%{vdsm_name}/network
+%dir %{_datadir}/%{vdsm_name}/network/netconf
%dir %{_datadir}/%{vdsm_name}/storage
%dir %{_datadir}/%{vdsm_name}/storage/imageRepository
%{_datadir}/%{vdsm_name}/alignmentScan.py*
@@ -879,8 +880,8 @@
%{_datadir}/%{vdsm_name}/parted_utils.py*
%{_datadir}/%{vdsm_name}/mkimage.py*
%{_datadir}/%{vdsm_name}/ppc64HardwareInfo.py*
-%{_datadir}/%{vdsm_name}/sourceRoute.py*
-%{_datadir}/%{vdsm_name}/sourceRouteThread.py*
+%{_datadir}/%{vdsm_name}/network/sourceRoute.py*
+%{_datadir}/%{vdsm_name}/network/sourceRouteThread.py*
%{_datadir}/%{vdsm_name}/supervdsm.py*
%{_datadir}/%{vdsm_name}/supervdsmServer
%{_datadir}/%{vdsm_name}/vmChannels.py*
@@ -1013,19 +1014,20 @@
%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup
%{_datadir}/%{vdsm_name}/addNetwork
-%{_datadir}/%{vdsm_name}/configNetwork.py*
%{_datadir}/%{vdsm_name}/delNetwork
+%{_datadir}/%{vdsm_name}/network/__init__.py*
+%{_datadir}/%{vdsm_name}/network/configNetwork.py*
+%{_datadir}/%{vdsm_name}/network/netconf/__init__.py*
+%{_datadir}/%{vdsm_name}/network/netconf/ifcfg.py*
+%{_datadir}/%{vdsm_name}/network/netconf/libvirtCfg.py*
+%{_datadir}/%{vdsm_name}/network/netconf/iproute2.py*
+%{_datadir}/%{vdsm_name}/network/neterrors.py*
+%{_datadir}/%{vdsm_name}/network/netmodels.py*
%{_datadir}/%{vdsm_name}/dumpStorageTable.py*
%{_datadir}/%{vdsm_name}/get-conf-item
%{_datadir}/%{vdsm_name}/kaxmlrpclib.py*
%{_datadir}/%{vdsm_name}/ksm.py*
%{_datadir}/%{vdsm_name}/momIF.py*
-%{_datadir}/%{vdsm_name}/netconf/__init__.py*
-%{_datadir}/%{vdsm_name}/netconf/ifcfg.py*
-%{_datadir}/%{vdsm_name}/netconf/libvirtCfg.py*
-%{_datadir}/%{vdsm_name}/netconf/iproute2.py*
-%{_datadir}/%{vdsm_name}/neterrors.py*
-%{_datadir}/%{vdsm_name}/netmodels.py*
%{_datadir}/%{vdsm_name}/respawn
%{_datadir}/%{vdsm_name}/sampling.py*
%{_datadir}/%{vdsm_name}/set-conf-item
diff --git a/vdsm/API.py b/vdsm/API.py
index e7a550c..80194c0 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -30,12 +30,11 @@
import threading
import logging
+from network import configNetwork
+from network.netconf import RollbackIncomplete
from vdsm import utils
from clientIF import clientIF
-import configNetwork
-from netmodels import Bond
-from netmodels import Vlan
-from netconf import RollbackIncomplete
+from network.netmodels import Bond, Vlan
from vdsm import netinfo
from vdsm import constants
import storage.misc
@@ -48,7 +47,6 @@
import caps
from vdsm.config import config
import ksm
-
import supervdsm
haClient = None # Define here to work around pyflakes issue #13
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 4bcc6ed..6a13bd9 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -18,7 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
-SUBDIRS = netconf sos storage gluster
+SUBDIRS = gluster network sos storage
include $(top_srcdir)/build-aux/Makefile.subs
@@ -29,7 +29,6 @@
blkid.py \
caps.py \
clientIF.py \
- configNetwork.py \
debugPluginClient.py \
dmidecodeUtil.py \
guestIF.py \
@@ -42,13 +41,9 @@
md_utils.py \
mkimage.py \
momIF.py \
- neterrors.py \
- netmodels.py \
parted_utils.py \
ppc64HardwareInfo.py \
sampling.py \
- sourceRoute.py \
- sourceRouteThread.py \
supervdsm.py \
tc.py \
vdsmDebugPlugin.py \
@@ -68,8 +63,7 @@
dumpStorageTable.py
nodist_vdsm_SCRIPTS = \
- mk_sysprep_floppy \
- vdsm-store-net-config
+ mk_sysprep_floppy
nodist_noinst_DATA = \
logger.conf \
@@ -82,13 +76,10 @@
$(NULL)
dist_vdsm_SCRIPTS = \
- addNetwork \
- delNetwork \
get-conf-item \
set-conf-item \
supervdsmServer \
vdsm \
- vdsm-restore-net-config \
$(NULL)
nodist_man8_MANS = \
@@ -115,7 +106,6 @@
mom.d/01-parameters.policy \
mom.d/02-balloon.policy \
mom.d/03-ksm.policy \
- sourceRoute.sh \
sudoers.vdsm.in \
svdsm.logger.conf.in \
upgrade.logger.conf.in \
@@ -126,7 +116,6 @@
vdsm-logrotate \
vdsm-logrotate.conf.in \
vdsm-modules-load.d.conf \
- vdsm-store-net-config.in \
vdsm-sysctl.conf \
vdsm.rwtab.in \
vdsmd.8.in \
@@ -253,7 +242,7 @@
install-data-dhclient-hooks:
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/dhcp/dhclient.d
- $(INSTALL_DATA) sourceRoute.sh \
+ $(INSTALL_DATA) network/sourceRoute.sh \
$(DESTDIR)$(sysconfdir)/dhcp/dhclient.d/sourceRoute.sh
chmod 755 $(DESTDIR)$(sysconfdir)/dhcp/dhclient.d/sourceRoute.sh
diff --git a/vdsm/netconf/Makefile.am b/vdsm/network/Makefile.am
similarity index 68%
copy from vdsm/netconf/Makefile.am
copy to vdsm/network/Makefile.am
index 71ee11c..02d4fb0 100644
--- a/vdsm/netconf/Makefile.am
+++ b/vdsm/network/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright 20013 Red Hat, Inc.
+#
+# Copyright 2013 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
@@ -17,13 +18,27 @@
# Refer to the README and COPYING files for full details of the license
#
+SUBDIRS = netconf
+
include $(top_srcdir)/build-aux/Makefile.subs
-vdsmnetconfdir = $(vdsmdir)/netconf
-
-dist_vdsmnetconf_PYTHON = \
+vdsmnetworkdir = $(vdsmdir)/network
+dist_vdsmnetwork_PYTHON = \
__init__.py \
- ifcfg.py \
- iproute2.py \
- libvirtCfg.py \
- $(NULL)
+ configNetwork.py \
+ neterrors.py \
+ netmodels.py \
+ sourceRoute.py \
+ sourceRouteThread.py
+
+nodist_vdsm_SCRIPTS = \
+ vdsm-store-net-config
+
+dist_vdsm_SCRIPTS = \
+ addNetwork \
+ delNetwork \
+ vdsm-restore-net-config
+
+EXTRA_DIST = \
+ vdsm-store-net-config.in \
+ sourceRoute.sh
diff --git a/vdsm/netconf/Makefile.am b/vdsm/network/__init__.py
similarity index 77%
copy from vdsm/netconf/Makefile.am
copy to vdsm/network/__init__.py
index 71ee11c..8e88115 100644
--- a/vdsm/netconf/Makefile.am
+++ b/vdsm/network/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 20013 Red Hat, Inc.
+# Copyright 2013 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
@@ -16,14 +16,3 @@
#
# Refer to the README and COPYING files for full details of the license
#
-
-include $(top_srcdir)/build-aux/Makefile.subs
-
-vdsmnetconfdir = $(vdsmdir)/netconf
-
-dist_vdsmnetconf_PYTHON = \
- __init__.py \
- ifcfg.py \
- iproute2.py \
- libvirtCfg.py \
- $(NULL)
diff --git a/vdsm/addNetwork b/vdsm/network/addNetwork
similarity index 91%
rename from vdsm/addNetwork
rename to vdsm/network/addNetwork
index 2678b94..1c00f09 100755
--- a/vdsm/addNetwork
+++ b/vdsm/network/addNetwork
@@ -45,5 +45,5 @@
shift 4
PYTHONPATH=`dirname $(readlink -f "$0")` \
-/usr/bin/python -m configNetwork add "$bridge" "$vlan" "$bonding" $nics "$@"
+/usr/bin/python -m network.configNetwork add "$bridge" "$vlan" "$bonding" $nics "$@"
diff --git a/vdsm/configNetwork.py b/vdsm/network/configNetwork.py
similarity index 98%
rename from vdsm/configNetwork.py
rename to vdsm/network/configNetwork.py
index 5db2a41..59e1b81 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/network/configNetwork.py
@@ -29,19 +29,13 @@
from vdsm import constants
from vdsm import utils
from storage.misc import execCmd
-import neterrors as ne
from netconf import libvirtCfg
-from neterrors import ConfigNetworkError
+from .neterrors import ConfigNetworkError
from vdsm import netinfo
from netconf.ifcfg import ConfigWriter
from netconf.ifcfg import Ifcfg
-from netmodels import Bond
-from netmodels import Bridge
-from netmodels import IPv4
-from netmodels import IPv6
-from netmodels import IpConfig
-from netmodels import Nic
-from netmodels import Vlan
+import neterrors as ne
+from .netmodels import Bond, Bridge, IPv4, IPv6, IpConfig, Nic, Vlan
import hooks
CONNECTIVITY_TIMEOUT_DEFAULT = 4
diff --git a/vdsm/delNetwork b/vdsm/network/delNetwork
similarity index 86%
rename from vdsm/delNetwork
rename to vdsm/network/delNetwork
index 1b7083f..86e1e42 100755
--- a/vdsm/delNetwork
+++ b/vdsm/network/delNetwork
@@ -26,5 +26,5 @@
shift 4
PYTHONPATH=`dirname $(readlink -f "$0")` \
-/usr/bin/python -m configNetwork del "$bridge" "$vlan" "$bonding" $nics "$@"
+/usr/bin/python -m network.configNetwork del "$bridge" "$vlan" "$bonding" $nics "$@"
diff --git a/vdsm/netconf/Makefile.am b/vdsm/network/netconf/Makefile.am
similarity index 95%
rename from vdsm/netconf/Makefile.am
rename to vdsm/network/netconf/Makefile.am
index 71ee11c..fb83b66 100644
--- a/vdsm/netconf/Makefile.am
+++ b/vdsm/network/netconf/Makefile.am
@@ -19,7 +19,7 @@
include $(top_srcdir)/build-aux/Makefile.subs
-vdsmnetconfdir = $(vdsmdir)/netconf
+vdsmnetconfdir = $(vdsmdir)/network/netconf
dist_vdsmnetconf_PYTHON = \
__init__.py \
diff --git a/vdsm/netconf/__init__.py b/vdsm/network/netconf/__init__.py
similarity index 97%
rename from vdsm/netconf/__init__.py
rename to vdsm/network/netconf/__init__.py
index 7ab63da..9292c3c 100644
--- a/vdsm/netconf/__init__.py
+++ b/vdsm/network/netconf/__init__.py
@@ -20,9 +20,9 @@
import logging
import libvirtCfg
-from netmodels import Bond, Bridge
-from sourceRoute import DynamicSourceRoute
-from sourceRoute import StaticSourceRoute
+from ..netmodels import Bond, Bridge
+from ..sourceRoute import DynamicSourceRoute
+from ..sourceRoute import StaticSourceRoute
from vdsm import netinfo
from vdsm.netconfpersistence import RunningConfig
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/network/netconf/ifcfg.py
similarity index 99%
rename from vdsm/netconf/ifcfg.py
rename to vdsm/network/netconf/ifcfg.py
index 46df9f9..bfae900 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/network/netconf/ifcfg.py
@@ -18,20 +18,21 @@
#
import glob
-import libvirt
import logging
import os
import pipes
import pwd
import re
-import selinux
import shutil
import threading
-from netconf import Configurator
-from neterrors import ConfigNetworkError
-from netmodels import Nic, Bridge, IpConfig
-from sourceRoute import DynamicSourceRoute
+import libvirt
+import selinux
+
+from . import Configurator
+from ..neterrors import ConfigNetworkError
+from ..netmodels import Nic, Bridge, IpConfig
+from ..sourceRoute import DynamicSourceRoute
from vdsm.config import config
from vdsm import constants
from vdsm import netinfo
@@ -39,7 +40,7 @@
from vdsm.netconfpersistence import RunningConfig
import dsaversion
import libvirtCfg
-import neterrors as ne
+from .. import neterrors as ne
class Ifcfg(Configurator):
diff --git a/vdsm/netconf/iproute2.py b/vdsm/network/netconf/iproute2.py
similarity index 98%
rename from vdsm/netconf/iproute2.py
rename to vdsm/network/netconf/iproute2.py
index 8915f48..6e08e3a 100644
--- a/vdsm/netconf/iproute2.py
+++ b/vdsm/network/netconf/iproute2.py
@@ -20,9 +20,9 @@
import logging
import libvirtCfg
-from netconf import Configurator
-from neterrors import ConfigNetworkError, ERR_FAILED_IFUP, ERR_FAILED_IFDOWN
-from netmodels import Nic
+from . import Configurator
+from ..neterrors import ConfigNetworkError, ERR_FAILED_IFUP, ERR_FAILED_IFDOWN
+from ..netmodels import Nic
from vdsm import netinfo
from vdsm import ipwrapper
from vdsm.constants import EXT_BRCTL
diff --git a/vdsm/netconf/libvirtCfg.py b/vdsm/network/netconf/libvirtCfg.py
similarity index 100%
rename from vdsm/netconf/libvirtCfg.py
rename to vdsm/network/netconf/libvirtCfg.py
diff --git a/vdsm/neterrors.py b/vdsm/network/neterrors.py
similarity index 100%
rename from vdsm/neterrors.py
rename to vdsm/network/neterrors.py
diff --git a/vdsm/netmodels.py b/vdsm/network/netmodels.py
similarity index 99%
rename from vdsm/netmodels.py
rename to vdsm/network/netmodels.py
index 5fde4e0..f2b5bdc 100644
--- a/vdsm/netmodels.py
+++ b/vdsm/network/netmodels.py
@@ -24,7 +24,7 @@
import socket
import struct
-from neterrors import ConfigNetworkError
+from .neterrors import ConfigNetworkError
from vdsm import netinfo
import neterrors as ne
diff --git a/vdsm/sourceRoute.py b/vdsm/network/sourceRoute.py
similarity index 100%
rename from vdsm/sourceRoute.py
rename to vdsm/network/sourceRoute.py
diff --git a/vdsm/sourceRoute.sh b/vdsm/network/sourceRoute.sh
similarity index 100%
rename from vdsm/sourceRoute.sh
rename to vdsm/network/sourceRoute.sh
diff --git a/vdsm/sourceRouteThread.py b/vdsm/network/sourceRouteThread.py
similarity index 97%
rename from vdsm/sourceRouteThread.py
rename to vdsm/network/sourceRouteThread.py
index c913220..4550e4b 100644
--- a/vdsm/sourceRouteThread.py
+++ b/vdsm/network/sourceRouteThread.py
@@ -4,7 +4,7 @@
import pyinotify
from netconf.iproute2 import Iproute2
-from sourceRoute import DynamicSourceRoute
+from .sourceRoute import DynamicSourceRoute
from vdsm.constants import P_VDSM_RUN
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/network/vdsm-restore-net-config
similarity index 96%
rename from vdsm/vdsm-restore-net-config
rename to vdsm/network/vdsm-restore-net-config
index 4227e4e..b27ecde 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/network/vdsm-restore-net-config
@@ -22,10 +22,10 @@
import logging
import logging.config
-from netconf import ifcfg
+from network.netconf import ifcfg
from vdsm.config import config
from vdsm.netconfpersistence import RunningConfig, PersistentConfig
-from configNetwork import setupNetworks
+from network.configNetwork import setupNetworks
def ifcfg_restoration():
diff --git a/vdsm/vdsm-store-net-config.in b/vdsm/network/vdsm-store-net-config.in
similarity index 100%
rename from vdsm/vdsm-store-net-config.in
rename to vdsm/network/vdsm-store-net-config.in
diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
index 59df478..ad27e4a 100755
--- a/vdsm/supervdsmServer
+++ b/vdsm/supervdsmServer
@@ -17,6 +17,7 @@
#
# Refer to the README and COPYING files for full details of the license
#
+
from pwd import getpwnam
import platform
import sys
@@ -64,13 +65,12 @@
from vdsm.constants import METADATA_GROUP, EXT_UDEVADM, \
DISKIMAGE_USER, DISKIMAGE_GROUP, P_LIBVIRT_VMCHANNELS, VDSM_USER
from storage.devicemapper import _removeMapping, _getPathsStatus
-import configNetwork
+from network import configNetwork, sourceRouteThread
from vdsm.config import config
import tc
import ksm
import mkimage
from storage.multipath import MPATH_CONF
-import sourceRouteThread
_UDEV_RULE_FILE_DIR = "/etc/udev/rules.d/"
_UDEV_RULE_FILE_PREFIX = "99-vdsm-"
--
To view, visit http://gerrit.ovirt.org/22694
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9c7e8cfc96cc1671ed7549c2f45ca820211c7c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: pep8: use multiline blacklist
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: pep8: use multiline blacklist
......................................................................
pep8: use multiline blacklist
Yaniv thinks it's nicer that way.
Change-Id: I8e9f4d214ae2bf19029265d230078cf5f67d9e15
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M Makefile.am
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/16/25416/1
diff --git a/Makefile.am b/Makefile.am
index 3f4266c..4c8781f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,7 +53,11 @@
WITH_HOOKS = --define="with_hooks 1"
endif
-PEP8_BLACKLIST = config.py,constants.py,crossImportsTests.py,vdsm.py
+PEP8_BLACKLIST = config.py \
+ constants.py \
+ crossImportsTests.py \
+ vdsm.py \
+ $(NULL)
SKIP_PYFLAKES_ERR = "\./vdsm/storage/lvm\.py.*: list comprehension redefines \
'lv' from line .*"
@@ -64,7 +68,10 @@
grep -w -v $(SKIP_PYFLAKES_ERR) | \
while read LINE; do echo "$$LINE"; false; done
$(PEP8) --version
- $(PEP8) --exclude="$(PEP8_BLACKLIST)" --filename '*.py,*.py.in' .
+ for x in $(PEP8_BLACKLIST); do \
+ exclude="$${exclude},$${x}" ; \
+ done ; \
+ $(PEP8) --exclude=$${exclude} --filename '*.py,*.py.in' .
@if test -f .gitignore; then \
for i in `git ls-files \*.in`; do \
if ! grep -q -x $${i%%.in} .gitignore; then \
--
To view, visit http://gerrit.ovirt.org/25416
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e9f4d214ae2bf19029265d230078cf5f67d9e15
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vm: Set numatune and guest numa topology
by smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: vm: Set numatune and guest numa topology
......................................................................
Patch Set 2: Code-Review+1
Looks decent enough.
--
To view, visit http://gerrit.ovirt.org/25254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88ec56047809b03449a788ead0b97f9ed876712d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 2 months
Change in vdsm[ovirt-3.4]: libvirt_configure: unpersist logrotate.d/libvirt
by ybronhei@redhat.com
Hello Douglas Schilling Landgraf, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/25756
to review the following change.
Change subject: libvirt_configure: unpersist logrotate.d/libvirt
......................................................................
libvirt_configure: unpersist logrotate.d/libvirt
On commit 247a76e7 we moved the libvirt settings to libvirt_configure.sh.in and now
we see that vdsm cannot rename temp. file to /etc/logrotate.d/libvirtd on
ovirt-node system at the stage we execute vdsm-tool configure --force.
This patch will add the command unpersist before renaming the file,
otherwise ovirt-node will complain with "Device or resource busy".
Change-Id: Icd0e6b3ea39680ac3fc8ec5731aa6be3bd8e4deb
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1074257
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/25700
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/tool/libvirt_configure.sh.in
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/25756/1
diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index 88b4080..eacb37c 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -302,12 +302,20 @@
@SED_PATH@ -i 's/^/# VDSM backup/' "$llogr"
@SED_PATH@ -e "/# vdsm/,/# end vdsm/d" "${llogr}" >> "${stanza}"
local oldmod=`/usr/bin/stat --format=%a "${llogr}"`
+
+ # unpersist cmd is remove_config on ovirt-functions
+ if isOvirtNode; then
+ . /usr/libexec/ovirt-functions
+ remove_config "${llogr}"
+ fi
@MV_PATH@ "${stanza}" "${llogr}"
+
if [ -n "${oldmod}" ]; then
@CHMOD_PATH@ "${oldmod}" "${llogr}"
fi
restorecon "${llogr}"
+ # persist cmd is ovirt_store_config on ovirt-functions
if isOvirtNode; then
. /usr/libexec/ovirt-functions
ovirt_store_config "${lconf}" "${qconf}" "${ldconf}" "${llogr}"
--
To view, visit http://gerrit.ovirt.org/25756
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd0e6b3ea39680ac3fc8ec5731aa6be3bd8e4deb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 2 months
Change in vdsm[ovirt-3.4]: Reload daemon file after each install
by ybronhei@redhat.com
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24898
to review the following change.
Change subject: Reload daemon file after each install
......................................................................
Reload daemon file after each install
Currently we load the daemon file only on first install. After upgrade
we could fail with:
"Warning: Unit file changed on disk, 'systemctl --system daemon-reload'
recommended."
This patch perform the reload after each installation of vdsm.
Change-Id: I1d6e6e292494da78052a9593c5cbe94ac35ea0d9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063772
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/24535
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/24898/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 149793e..a90d1a4 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -725,8 +725,8 @@
if [ "$1" -eq 1 ] ; then
/bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :
/bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || :
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
exit 0
%endif
--
To view, visit http://gerrit.ovirt.org/24898
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d6e6e292494da78052a9593c5cbe94ac35ea0d9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: Sometimes the FD number can be reused in the child process
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: Sometimes the FD number can be reused in the child process
......................................................................
Sometimes the FD number can be reused in the child process
This makes sure that the fd is the file that we expected to be closed child
process
Change-Id: I7044936fba8923297c76d9a2123215ec2b793548
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/betterPopenTests.py
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/9591/1
diff --git a/tests/betterPopenTests.py b/tests/betterPopenTests.py
index 6347460..eb129f4 100644
--- a/tests/betterPopenTests.py
+++ b/tests/betterPopenTests.py
@@ -59,8 +59,9 @@
def testCloseFDs(self):
fds = os.pipe()
+ rpath = os.path.realpath("/proc/%d/fds/%d" % (os.getpid(), fds[1]))
try:
- self._subTest("fds", [str(fds[1])], close_fds=True)
+ self._subTest("fds", [str(fds[1]), rpath], close_fds=True)
finally:
os.close(fds[0])
os.close(fds[1])
@@ -154,11 +155,11 @@
if __name__ == "__main__":
cmd = sys.argv[1]
if cmd == "fds":
- try:
- os.close(int(sys.argv[2]))
- print "False"
- except:
- print "True"
+ fdpath = "/proc/%d/fds/%d" % (os.getpid(), int(sys.argv[2]))
+ if not os.path.exists(fdpath):
+ print True
+ else:
+ print (open(fdpath).read().strip() == sys.argv[3])
elif cmd == "nofds":
try:
--
To view, visit http://gerrit.ovirt.org/9591
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7044936fba8923297c76d9a2123215ec2b793548
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vm: remove obsolete code
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: vm: remove obsolete code
......................................................................
vm: remove obsolete code
those are remnants of the pre-libvirt.py merge and they
are no longer useful.
Change-Id: I29e8a888d124fccd878a2ecac30734e58b355678
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 1 insertion(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/24744/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 9219c3a..eebaf52 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -3112,7 +3112,7 @@
libvirt.VIR_DOMAIN_RUNNING)
if self.lastStatus not in ('Migration Destination',
'Restoring state'):
- self._initTimePauseCode = self._readPauseCode(0)
+ self._initTimePauseCode = 'NOERR'
if not self.recovering and self._initTimePauseCode:
self.conf['pauseCode'] = self._initTimePauseCode
if self._initTimePauseCode == 'ENOSPC':
@@ -3696,13 +3696,6 @@
self._cleanupDrives(drive)
return {'status': doneCode, 'vmList': self.status()}
-
- def _readPauseCode(self, timeout):
- self.log.warning('_readPauseCode unsupported by libvirt vm')
- return 'NOERR'
-
- def _monitorDependentInit(self, timeout=None):
- self.log.warning('unsupported by libvirt vm')
def _timeoutExperienced(self, timeout):
if timeout:
--
To view, visit http://gerrit.ovirt.org/24744
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29e8a888d124fccd878a2ecac30734e58b355678
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
10 years, 2 months