Change in vdsm[ovirt-3.1]: setup: move the certificate generation
by Federico Simoncelli
Hello Michael Burns, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/10615
to review the following change.
Change subject: setup: move the certificate generation
......................................................................
setup: move the certificate generation
Generating the certificate at the service startup (instead of during the
rpm installation) has a better chance to succeed (and a better recovery
process). Moreover this allows appliances (like ovirt-node) to postpone
the certificate generation when the service is actually used for the
first time.
In this patch:
* Move the certificate generation from the spec file to the init file
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=860067
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I40fa3d9a6a54e312e399af3f87ac67e843078360
Reviewed-on: http://gerrit.ovirt.org/8368
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-by: Michael Burns <mburns(a)redhat.com>
Tested-by: Michael Burns <mburns(a)redhat.com>
---
M vdsm.spec.in
M vdsm/vdsm-gencerts.sh.in
M vdsm/vdsmd.init.in
3 files changed, 9 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/10615/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 5f5f989..572b338 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -404,9 +404,6 @@
/etc/pki/vdsm/keys/libvirt_password
fi
-# generate the vdsm certificates (if missing)
-%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh
-
%if 0%{?rhel}
if [ "$1" -eq 1 ] ; then
/sbin/chkconfig --add vdsmd
diff --git a/vdsm/vdsm-gencerts.sh.in b/vdsm/vdsm-gencerts.sh.in
index 1e11b69..3ee38c3 100755
--- a/vdsm/vdsm-gencerts.sh.in
+++ b/vdsm/vdsm-gencerts.sh.in
@@ -33,6 +33,10 @@
umask 077
+if [ "$1" = "--check" ]; then
+ [ -s "$VDSM_KEY" -a -s "$VDSM_CA" -a -s "$VDSM_CRT" ] && exit 0 || exit 1
+fi
+
if [ ! -f "$VDSM_KEY" ]; then
/usr/bin/certtool --generate-privkey --outfile "$VDSM_KEY" 2> /dev/null
/bin/chown "$VDSM_PERMS" "$VDSM_KEY"
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index dd6f3c6..a288c16 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -498,6 +498,11 @@
shutdown_conflicting_srv && stop_libvirtd_sysv
+ if ! @LIBEXECDIR(a)/vdsm-gencerts.sh --check; then
+ echo -n $"Configuring a self-signed VDSM host certificate: "
+ @LIBEXECDIR(a)/vdsm-gencerts.sh && success || failure ; echo
+ fi
+
reconfigure noforce
ret_val=$?
if [ $ret_val -ne 0 ]
--
To view, visit http://gerrit.ovirt.org/10615
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40fa3d9a6a54e312e399af3f87ac67e843078360
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.1
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Michael Burns <mburns(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: [WIP] Fix mounts parsing
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: [WIP] Fix mounts parsing
......................................................................
[WIP] Fix mounts parsing
Change-Id: I8fdeda5f2900d818912ef5a939b60687462d5344
---
M vdsm/storage/mount.py
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/3261/1
--
To view, visit http://gerrit.ovirt.org/3261
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fdeda5f2900d818912ef5a939b60687462d5344
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: net: drop redundant ifdown/up of bond's nics.
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: net: drop redundant ifdown/up of bond's nics.
......................................................................
net: drop redundant ifdown/up of bond's nics.
Commit 5cabaaa130 has introduced a logic that we are trying to
eliminate: we should not ifdown a bonded nic directly, initscripts do it
for us.
Change-Id: Ia87fe1327448f3d859372be00b9ea8cd19d62e50
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 0 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/10584/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 5290436..7a076f9 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -1180,15 +1180,10 @@
cf = netinfo.NET_CONF_PREF + bonding
configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
for nic in nics:
- ifdown(nic)
cf = netinfo.NET_CONF_PREF + nic
configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
ifup(bonding)
- # NICs must be activated in the same order of boot time
- # to expose the correct MAC address.
- for nic in nicSort(nics):
- ifup(nic)
def clientSeen(timeout):
--
To view, visit http://gerrit.ovirt.org/10584
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia87fe1327448f3d859372be00b9ea8cd19d62e50
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: netConf: fix a sloppy rebase
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: netConf: fix a sloppy rebase
......................................................................
netConf: fix a sloppy rebase
Commit 5cabaaa1 is refering to ConfigWriter.NET_CONF_PREF which was
dropped by a parallel commit 1ebff6e5b.
Change-Id: Ibecb8d6797f64e4239d7078566fbca5b89f030fc
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/10582/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index e812bcb..5290436 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -1177,11 +1177,11 @@
elif not bondingOtherUsers(network, vlan, bonding):
# update MTU for bond interface and underlying NICs
ifdown(bonding)
- cf = configWriter.NET_CONF_PREF + bonding
+ cf = netinfo.NET_CONF_PREF + bonding
configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
for nic in nics:
ifdown(nic)
- cf = configWriter.NET_CONF_PREF + nic
+ cf = netinfo.NET_CONF_PREF + nic
configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
ifup(bonding)
--
To view, visit http://gerrit.ovirt.org/10582
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibecb8d6797f64e4239d7078566fbca5b89f030fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: Add callback to the plethora of retry halting possibilities
by smizrahi@redhat.com
Saggi Mizrahi has uploaded a new change for review.
Change subject: Add callback to the plethora of retry halting possibilities
......................................................................
Add callback to the plethora of retry halting possibilities
Change-Id: Idb5a2158f008b41133352dcfb4926ad21dcceea1
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/miscTests.py
M vdsm/storage/misc.py
2 files changed, 35 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/8093/1
diff --git a/tests/miscTests.py b/tests/miscTests.py
index bec6539..c8bcf09 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -621,6 +621,35 @@
self.assertEquals(misc._alignData(1, 1), (1, 1, 1))
+class RetryTests(TestCaseBase):
+ def testStopCallback(self):
+ counter = [0]
+ limit = 4
+ def stopCallback():
+ counter[0] += 1
+ if counter[0] == limit:
+ return True
+
+ return False
+
+ def foo():
+ print counter[0]
+ if counter[0] == (limit - 1):
+ return
+
+ raise RuntimeError("If at first you don't succeed, try, try again."
+ "Then quit. There's no point in being a damn"
+ "fool about it.")
+ # W. C. Fields
+
+ self.assertRaises(RuntimeError, misc.retry, foo, tries=(limit - 1), sleep=0,
+ stopCallback=stopCallback)
+
+ counter[0] = 0
+ misc.retry(foo, RuntimeError, tries=limit, sleep=0,
+ stopCallback=stopCallback)
+
+
class ValidateDDBytes(TestCaseBase):
def testValidInputTrue(self):
"""
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index 161726b..ef0c74e 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -728,7 +728,7 @@
def retry(func, expectedException=Exception, tries=None,
- timeout=None, sleep=1):
+ timeout=None, sleep=1, stopCallback=None):
"""
Retry a function. Wraps the retry logic so you don't have to
implement it each time you need it.
@@ -741,6 +741,8 @@
the method. It will just not run it if it ended after the
timeout.
:param sleep: Time to sleep between calls in seconds.
+ :param stopCallback: A function that takes no parameters and invokes a
+ bail-out when it returns with a positive value.
"""
if tries in [0, None]:
tries = -1
@@ -761,6 +763,9 @@
if (timeout > 0) and ((time.time() - startTime) > timeout):
raise
+ if stopCallback is not None and stopCallback():
+ raise
+
time.sleep(sleep)
--
To view, visit http://gerrit.ovirt.org/8093
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb5a2158f008b41133352dcfb4926ad21dcceea1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: spec: fix typo in the numa hook summary
by Federico Simoncelli
Federico Simoncelli has uploaded a new change for review.
Change subject: spec: fix typo in the numa hook summary
......................................................................
spec: fix typo in the numa hook summary
Change-Id: I03eee4df9db645af51e75661f382b123b2df6919
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/10436/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 2be6592..7e992ef 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -315,7 +315,7 @@
this hook will expose it to the guests.
%package hook-numa
-Summary: numa sopport for VDSM
+Summary: NUMA support for VDSM
BuildArch: noarch
%description hook-numa
--
To view, visit http://gerrit.ovirt.org/10436
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03eee4df9db645af51e75661f382b123b2df6919
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
11 years, 4 months
Change in vdsm[master]: pylint:vdsm/*.py cast output to str() for .strip()/splitline...
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: pylint:vdsm/*.py cast output to str() for .strip()/splitlines()
......................................................................
pylint:vdsm/*.py cast output to str() for .strip()/splitlines()
************* Module caps
E:187,35:osversion: Instance of 'list' has no 'splitlines' member (but some types could not be inferred
************* Module configNetwork
E: 68,7:ifdown: Instance of 'list' has no 'strip' member (but some types could not be inferred)
E: 70,7:ifdown: Instance of 'list' has no 'strip' member (but some types could not be inferred)
E: 71,49:ifdown: Instance of 'list' has no 'splitlines' member (but some types could not be inferred)
E: 80,7:ifup: Instance of 'list' has no 'strip' member (but some types could not be inferred)
E: 82,7:ifup: Instance of 'list' has no 'strip' member (but some types could not be inferred)
************* Module netinfo
E: 45,23:nics: Instance of '_Chainmap' has no 'split' member (but some types could not be inferred)
E:137,22:ifconfig: Instance of 'list' has no 'split' member (but some types could not be inferred)
************* Module utils
E:681,42:getHostUUID: Instance of 'list' has no 'splitlines' member (but some types could not be inferred)
wrapper command and config output with str() to help pylint.
Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm/caps.py
M vdsm/configNetwork.py
M vdsm/netinfo.py
M vdsm/utils.py
4 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/3444/1
--
To view, visit http://gerrit.ovirt.org/3444
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae2c0ece02d5e41e0080bf41c0d9ea3544965274
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
11 years, 4 months
Change in vdsm[master]: Update comments to remove rhev-specific paths
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: Update comments to remove rhev-specific paths
......................................................................
Update comments to remove rhev-specific paths
Change-Id: Ide161d8f23e9f49e70e1ba8322fbcec31eba5886
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm/storage/fileSD.py
M vdsm/storage/fileVolume.py
M vdsm/storage/sp.py
3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/3294/1
--
To view, visit http://gerrit.ovirt.org/3294
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide161d8f23e9f49e70e1ba8322fbcec31eba5886
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
11 years, 4 months
Change in vdsm[master]: Remove rhev strings from vdsm_hooks directory and scripts
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: Remove rhev strings from vdsm_hooks directory and scripts
......................................................................
Remove rhev strings from vdsm_hooks directory and scripts
Change-Id: I3a6012529af0e81e9c4163db33fa02a046c42920
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm_hooks/README
M vdsm_hooks/persist-vdsm-hooks.in
M vdsm_hooks/sriov/README
M vdsm_hooks/unpersist-vdsm-hook
4 files changed, 13 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/3293/1
--
To view, visit http://gerrit.ovirt.org/3293
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a6012529af0e81e9c4163db33fa02a046c42920
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
11 years, 4 months
Change in vdsm[master]: Remove rhev/rhevm from vdsm_reg
by Ryan Harper
Ryan Harper has uploaded a new change for review.
Change subject: Remove rhev/rhevm from vdsm_reg
......................................................................
Remove rhev/rhevm from vdsm_reg
Change-Id: I5366b674c88a75243ef701e94f4adbcb1d2e48b5
Signed-off-by: Ryan Harper <ryanh(a)us.ibm.com>
---
M vdsm_reg/deployUtil.py.in
M vdsm_reg/engine.py
M vdsm_reg/vdsm-complete
M vdsm_reg/vdsm-config
M vdsm_reg/vdsm-gen-cert
M vdsm_reg/vdsm-reg-cmdline
M vdsm_reg/vdsm-reg-setup.in
M vdsm_reg/vdsm-reg.8
M vdsm_reg/vdsm-reg.conf.in
M vdsm_reg/vdsm-upgrade
10 files changed, 90 insertions(+), 90 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/3292/1
--
To view, visit http://gerrit.ovirt.org/3292
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5366b674c88a75243ef701e94f4adbcb1d2e48b5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ryan Harper <ryanh(a)us.ibm.com>
11 years, 4 months