Change in vdsm[master]: Packaging: Fix misleading help string for --enable-libvirt-s...
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Packaging: Fix misleading help string for --enable-libvirt-sanlock
......................................................................
Packaging: Fix misleading help string for --enable-libvirt-sanlock
Help strings in configure.ac for --enable-libvirt-sanlock and
--enable-libvirt-selinux are a bit misleading. Currently they are
--disable-libvirt-sanlock
disable libvirt sanlock plugin [default=yes]
--disable-libvirt-selinux
disable libvirt selinux plugin [default=yes]
meaning libvirt sanlock and selinux are disabled by default. Actually
they are enabled by default. So in this patch we fix the help strings as
following.
--enable-libvirt-sanlock
enable libvirt sanlock plugin [default=yes]
--enable-libvirt-selinux
enable libvirt selinux plugin [default=yes]
Change-Id: I935693a8b8e7c371c653853b9524c9a774bca6fd
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M configure.ac
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/19005/1
diff --git a/configure.ac b/configure.ac
index 2af9953..884cd07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,8 +54,8 @@
AC_ARG_ENABLE(
[libvirt-sanlock],
- [AS_HELP_STRING([--disable-libvirt-sanlock],
- [disable libvirt sanlock plugin @<:@default=yes@:>@])],
+ [AS_HELP_STRING([--enable-libvirt-sanlock],
+ [enable libvirt sanlock plugin @<:@default=yes@:>@])],
,
[enable_libvirt_sanlock="yes"]
)
@@ -63,8 +63,8 @@
AC_ARG_ENABLE(
[libvirt-selinux],
- [AS_HELP_STRING([--disable-libvirt-selinux],
- [disable libvirt selinux plugin @<:@default=yes@:>@])],
+ [AS_HELP_STRING([--enable-libvirt-selinux],
+ [enable libvirt selinux plugin @<:@default=yes@:>@])],
,
[enable_libvirt_selinux="yes"]
)
--
To view, visit http://gerrit.ovirt.org/19005
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I935693a8b8e7c371c653853b9524c9a774bca6fd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 2 months
Change in vdsm[master]: Functional Tests [3/3]: Added static source routing function...
by amuller@redhat.com
Assaf Muller has uploaded a new change for review.
Change subject: Functional Tests [3/3]: Added static source routing functional test
......................................................................
Functional Tests [3/3]: Added static source routing functional test
Change-Id: I4188e6ee5daea12fbd35cb8e1c87782e9605c7cd
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M tests/functional/networkTests.py
1 file changed, 44 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/18041/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 10e42dc..296ed2d 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -29,6 +29,8 @@
from vdsm.ipwrapper import ruleAdd, ruleDel, routeAdd, routeDel, routeExists, \
ruleExists, Route, Rule
+from vdsm.netinfo import prefix2netmask
+
NETWORK_NAME = 'test-network'
VLAN_ID = '27'
@@ -442,3 +444,45 @@
self.assertTrue(routeExists(route))
routeDel(route)
self.assertFalse(routeExists(route))
+
+ @permutations([[True], [False]])
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testSourceRouting(self, bridged=True):
+ with dummyIf(1) as nics:
+ status, msg = self.vdsm_net.setupNetworks(
+ {NETWORK_NAME:
+ {'nic': nics[0], 'bridged': bridged, 'ipaddr': IP_ADDRESS,
+ 'netmask': prefix2netmask(int(IP_CIDR)),
+ 'gateway': IP_GATEWAY}},
+ {}, {'connectivityCheck': False})
+ self.assertEqual(status, SUCCESS, msg)
+ self.assertTrue(self.vdsm_net.networkExists(NETWORK_NAME, bridged))
+
+ deviceName = NETWORK_NAME if bridged else nics[0]
+
+ # Assert that routes and rules exist
+ routes = [Route(network='0.0.0.0/0', ipaddr=IP_GATEWAY,
+ device=deviceName, table=IP_TABLE),
+ Route(network=IP_NETWORK_AND_CIDR,
+ ipaddr=IP_ADDRESS, device=deviceName,
+ table=IP_TABLE)]
+ rules = [Rule(source=IP_NETWORK_AND_CIDR, table=IP_TABLE),
+ Rule(destination=IP_NETWORK_AND_CIDR, table=IP_TABLE,
+ srcDevice=deviceName)]
+
+ for route in routes:
+ self.assertTrue(routeExists(route))
+ for rule in rules:
+ self.assertTrue(ruleExists(rule))
+
+ status, msg = self.vdsm_net.setupNetworks(
+ {NETWORK_NAME: {'remove': True}},
+ {}, {'connectivityCheck': False})
+ self.assertEqual(status, SUCCESS, msg)
+
+ # Assert that routes and rules don't exist
+ for route in routes:
+ self.assertFalse(routeExists(route))
+ for rule in rules:
+ self.assertFalse(ruleExists(rule))
--
To view, visit http://gerrit.ovirt.org/18041
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4188e6ee5daea12fbd35cb8e1c87782e9605c7cd
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]: Functional Tests [2/3]: Added ipwrapper.ruleExists+routeExists
by amuller@redhat.com
Assaf Muller has uploaded a new change for review.
Change subject: Functional Tests [2/3]: Added ipwrapper.ruleExists+routeExists
......................................................................
Functional Tests [2/3]: Added ipwrapper.ruleExists+routeExists
Added functional tests for both functions as well.
Change-Id: Iaf7c28e85f53f51879750308f3a9f93fc635cf33
Signed-off-by: Assaf Muller <amuller(a)redhat.com>
---
M lib/vdsm/ipwrapper.py
M tests/functional/networkTests.py
2 files changed, 80 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/18040/1
diff --git a/lib/vdsm/ipwrapper.py b/lib/vdsm/ipwrapper.py
index 6eade35..66458a4 100644
--- a/lib/vdsm/ipwrapper.py
+++ b/lib/vdsm/ipwrapper.py
@@ -106,6 +106,12 @@
for word in str(self).split():
yield word
+ def __eq__(self, other):
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
class Rule(object):
def __init__(self, table, source=None, destination=None, srcDevice=None):
@@ -191,6 +197,12 @@
for word in str(self).split():
yield word
+ def __eq__(self, other):
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ return not self.__eq__(other)
+
class IPRoute2Error(Exception):
pass
@@ -233,6 +245,20 @@
_execCmd(command)
+def _validate(validator, entry):
+ try:
+ validator.fromText(entry)
+ except:
+ return False
+ else:
+ return True
+
+
+def routeExists(route):
+ return route in [Route.fromText(entry) for entry in routeShowTable('all')
+ if _validate(Route, entry)]
+
+
def ruleList():
command = [_IP_BINARY.cmd, 'rule']
return _execCmd(command)
@@ -248,3 +274,8 @@
command = [_IP_BINARY.cmd, 'rule', 'del']
command += rule
_execCmd(command)
+
+
+def ruleExists(rule):
+ return rule in [Rule.fromText(entry) for entry in ruleList()
+ if _validate(Rule, entry)]
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 5fbbc73..10e42dc 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -22,13 +22,24 @@
expandPermutations, permutations)
from testValidation import RequireDummyMod, ValidateRunningAsRoot
-from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy
+import dummyUtils
from dummyUtils import dummyIf
+from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy
+
+from vdsm.ipwrapper import ruleAdd, ruleDel, routeAdd, routeDel, routeExists, \
+ ruleExists, Route, Rule
NETWORK_NAME = 'test-network'
VLAN_ID = '27'
BONDING_NAME = 'bond0'
+IP_ADDRESS = '240.0.0.1'
+IP_NETWORK = '240.0.0.0'
+IP_CIDR = '24'
+IP_NETWORK_AND_CIDR = IP_NETWORK + '/' + IP_CIDR
+IP_GATEWAY = '240.0.0.254'
+IP_TABLE = '4026531841' # Current implementation converts ip to its 32 bit int
+ # representation
def setupModule():
@@ -394,3 +405,40 @@
nics=nics,
opts={'bridged': bridged})
self.assertEqual(status, neterrors.ERR_BAD_BRIDGE, msg)
+
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testRuleExists(self):
+ with dummyIf(1) as nics:
+ nic = nics[0]
+ dummyUtils.setIP(nic, IP_ADDRESS + '/' + IP_CIDR)
+ dummyUtils.setLinkUp(nic)
+
+ rules = [Rule(source=IP_NETWORK_AND_CIDR, table=IP_TABLE),
+ Rule(destination=IP_NETWORK_AND_CIDR, table=IP_TABLE,
+ srcDevice=nic)]
+ for rule in rules:
+ self.assertFalse(ruleExists(rule))
+ ruleAdd(rule)
+ self.assertTrue(ruleExists(rule))
+ ruleDel(rule)
+ self.assertFalse(ruleExists(rule))
+
+ @RequireDummyMod
+ @ValidateRunningAsRoot
+ def testRouteExists(self):
+ with dummyIf(1) as nics:
+ nic = nics[0]
+ dummyUtils.setIP(nic, IP_ADDRESS + '/' + IP_CIDR)
+ dummyUtils.setLinkUp(nic)
+
+ routes = [Route(network='0.0.0.0/0', ipaddr=IP_GATEWAY,
+ device=nic, table=IP_TABLE),
+ Route(network=IP_NETWORK_AND_CIDR,
+ ipaddr=IP_ADDRESS, device=nic, table=IP_TABLE)]
+ for route in routes:
+ self.assertFalse(routeExists(route))
+ routeAdd(route)
+ self.assertTrue(routeExists(route))
+ routeDel(route)
+ self.assertFalse(routeExists(route))
--
To view, visit http://gerrit.ovirt.org/18040
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf7c28e85f53f51879750308f3a9f93fc635cf33
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]: lib: add create function to the qemuImg module
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: lib: add create function to the qemuImg module
......................................................................
lib: add create function to the qemuImg module
Change-Id: I69522cd6231e511d891815248fab9a15cbc987e5
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M lib/vdsm/qemuImg.py
1 file changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/18935/1
diff --git a/lib/vdsm/qemuImg.py b/lib/vdsm/qemuImg.py
index a2a5682..e9a328c 100644
--- a/lib/vdsm/qemuImg.py
+++ b/lib/vdsm/qemuImg.py
@@ -88,6 +88,29 @@
return info
+def create(image, size=None, format=None, backing=None, backingFormat=None):
+ cmd = [_qemuimg.cmd, "create"]
+
+ if format:
+ cmd.extend(("-f", format))
+
+ if backing:
+ cmd.extend(("-b", backing))
+
+ if backingFormat:
+ cmd.extend(("-F", backingFormat))
+
+ cmd.append(image)
+
+ if size:
+ cmd.append(int(size))
+
+ rc, out, err = utils.execCmd(cmd)
+
+ if rc != 0:
+ raise QImgError(rc, out, err)
+
+
def check(image, format=None):
cmd = [_qemuimg.cmd, "check"]
--
To view, visit http://gerrit.ovirt.org/18935
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I69522cd6231e511d891815248fab9a15cbc987e5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 2 months
Change in vdsm[ovirt-3.3]: vdsmd.init: Add service-is-managed in shutdown_conflicting_srv
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: vdsmd.init: Add service-is-managed in shutdown_conflicting_srv
......................................................................
vdsmd.init: Add service-is-managed in shutdown_conflicting_srv
We should not throw a stack trace if a service does not exist
Change-Id: I8916a73c446ea2f296b66f5fcf133b07c2d7a66c
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm/vdsmd.init.in
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/19197/1
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index b38791d..482d2ec 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -83,6 +83,7 @@
local srv
for srv in ${CONFLICTING_SERVICES}; do
+ "$VDSM_TOOL" service-is-managed "$srv" >/dev/null 2>&1 || continue
"$VDSM_TOOL" service-disable "$srv"
if "$VDSM_TOOL" service-status "$srv" > /dev/null 2>&1; then
if [ "$srv" = "libvirt-guests" ]; then
--
To view, visit http://gerrit.ovirt.org/19197
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8916a73c446ea2f296b66f5fcf133b07c2d7a66c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vdsmd.init: remove legacy judgment code
by mhuntxu@gmail.com
Hunt Xu has uploaded a new change for review.
Change subject: vdsmd.init: remove legacy judgment code
......................................................................
vdsmd.init: remove legacy judgment code
Judging whether vdsm is registered by checking whether the certificates
exist is legacy. With commit b94937438 there would always be
certificates for vdsm(first in the rpm, generated during startup with
commit 31f4565bd). This patch also merges two if isOvirt judgment
together to tidy the code and the certificates validation would be
performed only when they exist in case configure_libvirt is called
individually(not as a part in vdsm startup).
Change-Id: If51f73576975b13bcdaa110f679c3d5596ae5210
Signed-off-by: huntxu <mhuntxu(a)gmail.com>
---
M vdsm/vdsmd.init.in
1 file changed, 5 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/12875/1
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index 1f845c6..36b2f35 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -230,13 +230,6 @@
echo "$key=$val" >> "$cfile"
}
- if isOvirt
- then
- . /usr/libexec/ovirt-functions
- else
- ovirt_store_config() { :; }
- fi
-
local lconf qconf ldconf
local ssl=`$GETCONFITEM $CONF_FILE vars ssl true | tr A-Z a-z`
@@ -245,15 +238,14 @@
ldconf="$4"
qlconf="$5"
- # do not configure ovirt nodes before registration
if isOvirt
then
- if [ ! -f /etc/pki/vdsm/certs/vdsmcert.pem ]
- then
- log_failure_msg "$prog: Missing certificates, $prog not registered"
- return 6
+ if [ -f /etc/pki/vdsm/certs/vdsmcert.pem ]
+ /usr/bin/vdsm-tool validate-ovirt-certs
fi
- /usr/bin/vdsm-tool validate-ovirt-certs
+ . /usr/libexec/ovirt-functions
+ else
+ ovirt_store_config() { :; }
fi
#
--
To view, visit http://gerrit.ovirt.org/12875
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If51f73576975b13bcdaa110f679c3d5596ae5210
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu(a)gmail.com>
10 years, 2 months
Change in vdsm[master]: Nits: clean the magic number for seek()
by shuming@linux.vnet.ibm.com
Shu Ming has uploaded a new change for review.
Change subject: Nits: clean the magic number for seek()
......................................................................
Nits: clean the magic number for seek()
Change-Id: I65625ae7a41649e290636c95f0e694c065fe42dc
Signed-off-by: Shu Ming <shuming(a)linux.vnet.ibm.com>
---
M vdsm/storage/blockVolume.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/11390/1
diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 5dec748..ab994a7 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -66,7 +66,7 @@
def _getDeviceSize(devPath):
with open(devPath, "rb") as f:
- f.seek(0, 2)
+ f.seek(0, os.SEEK_END)
return f.tell()
--
To view, visit http://gerrit.ovirt.org/11390
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65625ae7a41649e290636c95f0e694c065fe42dc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shu Ming <shuming(a)linux.vnet.ibm.com>
10 years, 2 months
Change in vdsm[master]: service.py: _runAlts() remove ServiceNotExistError
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: service.py: _runAlts() remove ServiceNotExistError
......................................................................
service.py: _runAlts() remove ServiceNotExistError
Do not call raise() if service does not exist
Change-Id: I0d8dc3c50bee73e492127d6aedda3b125c8add0e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1006842
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M lib/vdsm/tool/service.py
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/19165/1
diff --git a/lib/vdsm/tool/service.py b/lib/vdsm/tool/service.py
index 6122cb0..cd4aaf5 100644
--- a/lib/vdsm/tool/service.py
+++ b/lib/vdsm/tool/service.py
@@ -348,9 +348,6 @@
else:
raise ServiceOperationError(
"%s failed" % alt.func_name, out, err)
- raise ServiceNotExistError(
- 'Tried all alternatives but failed:\n%s' %
- ('\n'.join(str(e) for errs in errors.values() for e in errs)))
@expose("service-start")
--
To view, visit http://gerrit.ovirt.org/19165
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d8dc3c50bee73e492127d6aedda3b125c8add0e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vdsm-tool: handle missing sanlock pid file
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: vdsm-tool: handle missing sanlock pid file
......................................................................
vdsm-tool: handle missing sanlock pid file
Change-Id: I711d9b413415ca9372520e6bb25cf6d39ff571a3
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M lib/vdsm/tool/sanlock.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/19112/1
diff --git a/lib/vdsm/tool/sanlock.py b/lib/vdsm/tool/sanlock.py
index c64c874..650a5cf 100644
--- a/lib/vdsm/tool/sanlock.py
+++ b/lib/vdsm/tool/sanlock.py
@@ -38,13 +38,13 @@
supplementary groups.
"""
- sanlock_pid = open(SANLOCK_PID, "r").readline().strip()
-
try:
+ sanlock_pid = open(SANLOCK_PID, "r").readline().strip()
sanlock_status = open(PROC_STATUS_PATH % sanlock_pid, "r")
except IOError as e:
if e.errno == os.errno.ENOENT:
return 0 # service is not running, returning
+ raise
for status_line in sanlock_status:
if status_line.startswith(PROC_STATUS_GROUPS):
--
To view, visit http://gerrit.ovirt.org/19112
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I711d9b413415ca9372520e6bb25cf6d39ff571a3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: Packaging: make libvirt service name and qemu process user g...
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Packaging: make libvirt service name and qemu process user group configurable
......................................................................
Packaging: make libvirt service name and qemu process user group configurable
libvirt service in Ubuntu is libvirt-bin, qemu user is libvirt-qemu,
qemu group is kvm. This patch make these configurable by adding
--with-libvirt-service=libvirt-bin
--with-qemu-user=libvirt-qemu
--with-qemu-group=kvm
options to configure script. The default value are based on RH family so
Fedora and RHEL can igore these options.
Change-Id: I11830b95257655bdc1fe2ba54861655fdcdb861e
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M configure.ac
M lib/vdsm/tool/libvirt_configure.sh.in
2 files changed, 33 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/19007/1
diff --git a/configure.ac b/configure.ac
index fc3c8cb..57a43f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,18 +75,24 @@
AC_SUBST([VDSMGROUP], [kvm])
AC_SUBST([METADATAUSER], [vdsm])
AC_SUBST([METADATAGROUP], [kvm])
-if grep -i fedora /etc/*-release; then
- AC_SUBST([QEMUUSER], [qemu])
- AC_SUBST([QEMUGROUP], [qemu])
-elif grep -i ubuntu /etc/*-release; then
- AC_SUBST([QEMUUSER], [libvirt-qemu])
- AC_SUBST([QEMUGROUP], [kvm])
-else
- AC_SUBST([QEMUUSER], [qemu])
- AC_SUBST([QEMUGROUP], [qemu])
-fi
AC_SUBST([SNLKUSER], [sanlock])
AC_SUBST([SNLKGROUP], [sanlock])
+
+AC_ARG_WITH(
+ [qemu-user],
+ AS_HELP_STRING([--with-qemu-user],
+ [configure user of qemu process spawned by libvirt, @<:@default=qemu@:>@]),
+ [],
+ with_qemu_user="qemu")
+AC_SUBST([QEMUUSER], ["${with_qemu_user}"])
+
+AC_ARG_WITH(
+ [qemu-group],
+ AS_HELP_STRING([--with-qemu-group],
+ [configure group of qemu process spawned by libvirt, @<:@default=qemu@:>@]),
+ [],
+ with_qemu_group="qemu")
+AC_SUBST([QEMUGROUP], ["${with_qemu_group}"])
# VDSM default paths
AC_SUBST([vdsmdir], ['${datarootdir}/vdsm'])
@@ -112,6 +118,22 @@
AC_SUBST([vdsmreglogdir], ['${localstatedir}/log/vdsm-reg'])
AC_SUBST([vdsmupgradedir], ['/data/updates'])
+AC_ARG_WITH(
+ [sysdefaultdir],
+ AS_HELP_STRING([--with-sysdefaultdir],
+ [configure directory path of system daemon environment files, @<:@SYSCONFDIR/sysconfig@:>@]),
+ [],
+ with_sysdefaultdir="${sysconfdir}/sysconfig")
+AC_SUBST([sysdefaultdir], ["${with_sysdefaultdir}"])
+
+AC_ARG_WITH(
+ [libvirt-service],
+ AS_HELP_STRING([--with-libvirt-service],
+ [configure name of the libvirt service, @<:@default=libvirtd@:>@]),
+ [],
+ with_libvirt_service="libvirtd")
+AC_SUBST([LIBVIRT_SERVICE], ["${with_libvirt_service}"])
+
# Network
AC_SUBST([VDSMBRIDGE], ['ovirtmgmt'])
diff --git a/lib/vdsm/tool/libvirt_configure.sh.in b/lib/vdsm/tool/libvirt_configure.sh.in
index c4f56a9..23527a7 100755
--- a/lib/vdsm/tool/libvirt_configure.sh.in
+++ b/lib/vdsm/tool/libvirt_configure.sh.in
@@ -28,7 +28,7 @@
QEMU_DUMP_PATH="/var/log/core"
LCONF="@sysconfdir(a)/libvirt/libvirtd.conf"
QCONF="@sysconfdir(a)/libvirt/qemu.conf"
-LDCONF="@sysconfdir@/sysconfig/libvirtd"
+LDCONF="@sysdefaultdir@/@LIBVIRT_SERVICE@"
QLCONF="@sysconfdir(a)/libvirt/qemu-sanlock.conf"
[ "${ENABLE_LIBVIRT_SANLOCK}" = "yes" ] && QLCONF="/dev/null"
--
To view, visit http://gerrit.ovirt.org/19007
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I11830b95257655bdc1fe2ba54861655fdcdb861e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 2 months