Change in vdsm[master]: new vdsm config to output libvirtd log to file
ybronhei at redhat.com
ybronhei at redhat.com
Mon May 25 13:52:09 UTC 2015
Yaniv Bronhaim has uploaded a new change for review.
Change subject: new vdsm config to output libvirtd log to file
......................................................................
new vdsm config to output libvirtd log to file
Having the config value libvirt_log_file=True will add to libvirtd.conf
the field log_outputs=1:file:/var/log/libvirt/libvirtd.log. otherwise libvirtd
uses the default output which is currently only to syslog.
Change-Id: Iaa9c47273b134cf102dfe85dcb628619c1de53b5
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M lib/vdsm/config.py.in
M lib/vdsm/tool/configurators/libvirt.py
2 files changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/41395/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 03a63c8..ca8517b 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -160,6 +160,10 @@
('ssl', 'true',
'Whether to use ssl encryption and authentication.'),
+ ('libvirt_log_file', 'False',
+ 'True to print libvirtd logs to /var/log/libvirt/libvirtd.log.'
+ 'False will uses the service default.'),
+
('vds_responsiveness_timeout', '60', None),
('vdsm_nice', '-5', None),
diff --git a/lib/vdsm/tool/configurators/libvirt.py b/lib/vdsm/tool/configurators/libvirt.py
index e182231..891b188 100644
--- a/lib/vdsm/tool/configurators/libvirt.py
+++ b/lib/vdsm/tool/configurators/libvirt.py
@@ -72,6 +72,7 @@
config.read(_getFile('VDSM_CONF'))
vdsmConfiguration = {
'ssl_enabled': config.getboolean('vars', 'ssl'),
+ 'log_to_file': config.getboolen('vars', 'libvirt_log_file'),
'sanlock_enabled': constants.SANLOCK_ENABLED,
'libvirt_selinux': constants.LIBVIRT_SELINUX
}
@@ -343,6 +344,14 @@
},
},
+ {
+ 'conditions': {
+ "log_to_file": True,
+ },
+ 'content': {
+ 'log_outputs': '1:file:/var/log/libvirt/libvirtd.log',
+ },
+ },
]
},
--
To view, visit https://gerrit.ovirt.org/41395
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa9c47273b134cf102dfe85dcb628619c1de53b5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
More information about the vdsm-patches
mailing list