mooli tayer has uploaded a new change for review.
Change subject: vdsm-tool: changing root checking in configurator.
......................................................................
vdsm-tool: changing root checking in configurator.
Checking for root as we currently do in configure of libvirt and
sanlock is not enough. Currently this will fail during the
isConfigured() check since it does not have premissions to the
files it attempts to check:
"OSError: No such file or directory: /etc/libvirt/libvirtd.conf"
It is easy to see that this check is needed for all the exposed
methods of configurator. I'm suggesting to do it in the exposed
verbs in a uniform manner.
Change-Id: I52967e30f677e4537b83c2db442963e3eadecb55
Signed-off-by: Mooli Tayer <mtayer(a)redhat.com>
---
M lib/vdsm/tool/configurator.py
1 file changed, 16 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/31293/1
diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index 8136613..475fa62 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -20,6 +20,7 @@
import argparse
import errno
import filecmp
+import functools
import grp
import os
import pwd
@@ -105,9 +106,6 @@
return ["vdsmd", "supervdsmd", "libvirtd"]
def configure(self):
- if os.getuid() != 0:
- raise NotRootError()
-
self._sysvToUpstart()
if utils.isOvirtNode():
@@ -607,9 +605,6 @@
"""
Configure sanlock process groups
"""
- if os.getuid() != 0:
- raise NotRootError()
-
rc, out, err = utils.execCmd(
(
'/usr/sbin/usermod',
@@ -678,13 +673,25 @@
)
+def assertRoot(func):
+ @functools.wraps(func)
+ def inner(*args, **kwargs):
+ if os.getuid() != 0:
+ raise NotRootError()
+ func(*args, **kwargs)
+ return inner
+
+
@expose("configure")
+@assertRoot
def configure(*args):
"""
configure [-h|...]
Configure external services for vdsm
Invoke with -h for complete usage.
"""
+
+
args = _parse_args(*args)
configurer_to_trigger = []
@@ -726,6 +733,7 @@
@expose("is-configured")
+@assertRoot
def isconfigured(*args):
"""
is-configured [-h|...]
@@ -763,6 +771,7 @@
@expose("validate-config")
+@assertRoot
def validate_config(*args):
"""
validate-config [-h|...]
@@ -788,6 +797,7 @@
@expose("remove-config")
+@assertRoot
def remove_config(*args):
"""
Remove vdsm configuration from conf files
--
To view, visit http://gerrit.ovirt.org/31293
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I52967e30f677e4537b83c2db442963e3eadecb55
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
mooli tayer has uploaded a new change for review.
Change subject: libvirtd.log: time to be less verbose
......................................................................
libvirtd.log: time to be less verbose
After several years, we can drop log verbosity to libvirt's default.
Currently, libvirt logs are filling up ovirt-nodes that run dozens of
VMs.
Change-Id: I251c2534d3284aa95bffa56143c449d5de887008
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1125237
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31135
Tested-by: mooli tayer <mtayer(a)redhat.com>
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
(cherry picked from commit da2d0403de40f89da30f0618d903e707632cc445)
---
M lib/vdsm/tool/configurators/libvirt.py
1 file changed, 0 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/32244/1
diff --git a/lib/vdsm/tool/configurators/libvirt.py b/lib/vdsm/tool/configurators/libvirt.py
index da19da2..86f24e4 100644
--- a/lib/vdsm/tool/configurators/libvirt.py
+++ b/lib/vdsm/tool/configurators/libvirt.py
@@ -340,14 +340,6 @@
'auth_unix_rw': '"sasl"',
'host_uuid': '"' + str(uuid.uuid4()) + '"',
'keepalive_interval': -1,
- # FIXME until we are confident with libvirt
- # integration, let us have a verbose log
- 'log_outputs': (
- '"1:file:/var/log/libvirt/libvirtd.log"'),
- 'log_filters': (
- '"3:virobject 3:virfile 2:virnetlink '
- '3:cgroup 3:event 3:json 1:libvirt '
- '1:util 1:qemu"'),
},
},
{
--
To view, visit http://gerrit.ovirt.org/32244
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I251c2534d3284aa95bffa56143c449d5de887008
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: libvirtd.log: time to be less verbose
......................................................................
libvirtd.log: time to be less verbose
After several years, we can drop log verbosity to libvirt's default.
Currently, libvirt logs are filling up ovirt-nodes that run dozens of
VMs.
Change-Id: I251c2534d3284aa95bffa56143c449d5de887008
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/tool/configurator.py
1 file changed, 1 insertion(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/31135/1
diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index 8136613..636babf 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -349,7 +349,7 @@
# version != PACKAGE_VERSION since we do not want to update configuration
# on every update. see 'configuration versioning:' at Configfile.py for
# details.
- CONF_VERSION = '4.13.0'
+ CONF_VERSION = '4.17.0'
PKI_DIR = os.path.join(SYSCONF_PATH, 'pki/vdsm')
CA_FILE = os.path.join(PKI_DIR, 'certs/cacert.pem')
@@ -388,14 +388,6 @@
'auth_unix_rw': '"sasl"',
'host_uuid': '"' + str(uuid.uuid4()) + '"',
'keepalive_interval': -1,
- # FIXME until we are confident with libvirt
- # integration, let us have a verbose log
- 'log_outputs': (
- '"1:file:/var/log/libvirt/libvirtd.log"'),
- 'log_filters': (
- '"3:virobject 3:virfile 2:virnetlink '
- '3:cgroup 3:event 3:json 1:libvirt '
- '1:util 1:qemu"'),
},
},
{
--
To view, visit http://gerrit.ovirt.org/31135
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I251c2534d3284aa95bffa56143c449d5de887008
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Force flag not optional for detach storage domain
......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_3.5_create-rpms_merged/125/ : SUCCESS
--
To view, visit http://gerrit.ovirt.org/32219
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0b7b34464ec83bbf408df61c0193cd17e193e00
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No