Change in vdsm[master]: API: drop the bogus _getStats helper method
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: API: drop the bogus _getStats helper method
......................................................................
API: drop the bogus _getStats helper method
kill this private _getStats() helper: we don't use it anymore.
Change-Id: I5a5497013bffb676565508babd62b6f976d68233
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/API.py
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/64899/1
diff --git a/vdsm/API.py b/vdsm/API.py
index 7467c11..a117a57 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -331,9 +331,6 @@
"""
Obtain statistics of the specified VM
"""
- return self._getStats()
-
- def _getStats(self, runHooks=True):
# for backward compatibility reasons, we need to
# do the instance check before to run the hooks.
vm = self.vm
--
To view, visit https://gerrit.ovirt.org/64899
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a5497013bffb676565508babd62b6f976d68233
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: copy_data: Add qcow2_compat on convert.
by Maor Lipchuk
Maor Lipchuk has uploaded a new change for review.
Change subject: copy_data: Add qcow2_compat on convert.
......................................................................
copy_data: Add qcow2_compat on convert.
Pass qcow2 compat on convert.
Change-Id: Ie26e5dcba6fc493b32ea7764889df2918c4dfdd3
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
---
M vdsm/storage/sdm/api/copy_data.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/64373/1
diff --git a/vdsm/storage/sdm/api/copy_data.py b/vdsm/storage/sdm/api/copy_data.py
index 0a1cdb6..7e91948 100644
--- a/vdsm/storage/sdm/api/copy_data.py
+++ b/vdsm/storage/sdm/api/copy_data.py
@@ -70,7 +70,8 @@
srcFormat=self._source.qemu_format,
dstFormat=self._dest.qemu_format,
backing=self._dest.backing_path,
- backingFormat=self._dest.backing_qemu_format)
+ backingFormat=self._dest.backing_qemu_format,
+ qcow2_compat=self._dest.qcow2_compat)
self._operation.wait_for_completion()
@@ -124,6 +125,11 @@
return volume.getBackingVolumePath(self.img_id, parent_vol.volUUID)
@property
+ def qcow2_compat(self):
+ dom = sdCache.produce_manifest(self.sd_id)
+ return dom.qcow2_compat()
+
+ @property
def backing_qemu_format(self):
parent_vol = self._vol.getParentVolume()
if not parent_vol:
--
To view, visit https://gerrit.ovirt.org/64373
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie26e5dcba6fc493b32ea7764889df2918c4dfdd3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: volume_artifacts: Add qcow2_compat on create.
by Maor Lipchuk
Maor Lipchuk has uploaded a new change for review.
Change subject: volume_artifacts: Add qcow2_compat on create.
......................................................................
volume_artifacts: Add qcow2_compat on create.
Pass qcow2 compat on initialize volume.
Change-Id: I2dd2d53fba0dd69cdb4f60e152cf6d254cfb863a
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
---
M vdsm/storage/sdm/volume_artifacts.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/64372/1
diff --git a/vdsm/storage/sdm/volume_artifacts.py b/vdsm/storage/sdm/volume_artifacts.py
index d12f1b0..1e52a59 100644
--- a/vdsm/storage/sdm/volume_artifacts.py
+++ b/vdsm/storage/sdm/volume_artifacts.py
@@ -142,7 +142,8 @@
def _initialize_volume(self, vol_format, size):
if vol_format == sc.COW_FORMAT:
- qemuimg.create(self.volume_path, size, sc.fmt2str(vol_format))
+ qemuimg.create(self.volume_path, size, sc.fmt2str(vol_format),
+ qcow2_compat=self.sd_manifest.qcow2_compat)
class FileVolumeArtifacts(VolumeArtifacts):
--
To view, visit https://gerrit.ovirt.org/64372
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dd2d53fba0dd69cdb4f60e152cf6d254cfb863a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: fix comment
by ahadas@redhat.com
Arik Hadas has uploaded a new change for review.
Change subject: fix comment
......................................................................
fix comment
The comment on _getConfigVmStats mention the 'display' field
but this field is no longer set in this method, thus this
part is removed.
Change-Id: Ie234c9a1dd0fde9da85356ae253c39da608ebf01
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/64972/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 967dbab..c38eaef 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1218,7 +1218,7 @@
"""
provides all the stats which will not change after a VM is booted.
Please note that some values are provided by client (engine)
- but can change as result as interaction with libvirt (display*)
+ but can change as a result of interaction with libvirt
"""
stats = {
'vmId': self.conf['vmId'],
--
To view, visit https://gerrit.ovirt.org/64972
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie234c9a1dd0fde9da85356ae253c39da608ebf01
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: logging: Unify SimpleLogAdapter format
......................................................................
logging: Unify SimpleLogAdapter format
SimpleLogAdapter was prefixing the log message with context info, using
"::" as message separator. This made sense when the log was using "::"
as field separator, but now we are using spaces.
Additionally the old format use strange quoting and no spacing between
pairs, making the format harder to read:
task=`xxxyyy`res=`foo.bar.baz`::Message text ...
The new format fixes these issues and enclose the context info in
parenthesis to match the new log format:
(task='xxxyyy', res='foo.bar.baz') Message text ...
This matches the format we used lately in many logs for adding message
details.
Here is an example log:
https://paste.fedoraproject.org/431636/raw/
Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M lib/vdsm/logUtils.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/64227/1
diff --git a/lib/vdsm/logUtils.py b/lib/vdsm/logUtils.py
index 4c5ad8c..e726d9b 100644
--- a/lib/vdsm/logUtils.py
+++ b/lib/vdsm/logUtils.py
@@ -104,11 +104,11 @@
Would produce this message::
- "task=`xxxyyy`res=`foo.bar.baz`::Message"
+ "(task='xxxyyy', res='foo.bar.baz') Message"
"""
self.logger = logger
- items = "".join("%s=`%s`" % (k, v) for k, v in context.iteritems())
- self.prefix = items + "::"
+ items = ", ".join("%s='%s'" % (k, v) for k, v in context.iteritems())
+ self.prefix = "(%s) " % items
def process(self, msg, kwargs):
return self.prefix + msg, kwargs
--
To view, visit https://gerrit.ovirt.org/64227
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: logging: Improve log level alignment
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: logging: Improve log level alignment
......................................................................
logging: Improve log level alignment
Shorten WARNING to WARN and CRITICAL to CRIT to make log messages align
nicer.
Here is an example log:
https://paste.fedoraproject.org/431570/raw/
Change-Id: Ia18649258f145f974fd4a8f7a96b5849c4a77938
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M README.logging
M static/etc/vdsm/logger.conf.in
M tests/run_tests_local.sh.in
M vdsm/vdsm
4 files changed, 13 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/64217/1
diff --git a/README.logging b/README.logging
index ed91532..ca04578 100644
--- a/README.logging
+++ b/README.logging
@@ -26,7 +26,7 @@
# vdsClient [-s] SERVER setLogLevel LEVEL [LOGGER]
-`LEVEL` is one of DEBUG, INFO, WARNING
+`LEVEL` is one of DEBUG, INFO, WARN
`LOGGER` is any logger Vdsm uses. Please check the configuration file
to learn about some predefined loggers.
@@ -43,16 +43,16 @@
vdsClient -s 0 setLogLevel DEBUG
2. silence virt logs, show only warnings, errors or worse:
-vdsClient -s 0 setLogLevel WARNING virt
+vdsClient -s 0 setLogLevel WARN virt
3. same as #2, for storage
-vdsClient -s 0 setLogLevel WARNING storage
+vdsClient -s 0 setLogLevel WARN storage
4. silence JSONRPC logs:
-vdsClient -s 0 setLogLevel WARNING jsonrpc
+vdsClient -s 0 setLogLevel WARN jsonrpc
5. enable the 'devel' logs, which could be useful for developers
-vdsClient -s 0 setLogLevel devel WARNING
+vdsClient -s 0 setLogLevel devel WARN
Notes
diff --git a/static/etc/vdsm/logger.conf.in b/static/etc/vdsm/logger.conf.in
index 02988ff..5e92b78 100644
--- a/static/etc/vdsm/logger.conf.in
+++ b/static/etc/vdsm/logger.conf.in
@@ -61,7 +61,7 @@
propagate=0
[handler_syslog]
-level=WARNING
+level=WARN
class=handlers.SysLogHandler
formatter=sysform
args=('/dev/log', handlers.SysLogHandler.LOG_USER)
@@ -92,7 +92,7 @@
format: %(message)s
[formatter_long]
-format: %(asctime)s %(levelname)-7s [%(name)s] (%(threadName)s) %(message)s (%(module)s:%(lineno)d)
+format: %(asctime)s %(levelname)-5s [%(name)s] (%(threadName)s) %(message)s (%(module)s:%(lineno)d)
[formatter_sysform]
format= vdsm %(name)s %(levelname)s %(message)s
diff --git a/tests/run_tests_local.sh.in b/tests/run_tests_local.sh.in
index 121eb7c..5a8d8b6 100644
--- a/tests/run_tests_local.sh.in
+++ b/tests/run_tests_local.sh.in
@@ -5,7 +5,7 @@
export \
LC_ALL=C \
- NOSE_LOGFORMAT='%(asctime)s %(levelname)-7s [%(name)s] (%(threadName)s) %(message)s (%(module)s:%(lineno)d)' \
+ NOSE_LOGFORMAT='%(asctime)s %(levelname)-5s [%(name)s] (%(threadName)s) %(message)s (%(module)s:%(lineno)d)' \
NOSE_VERBOSE=${NOSE_VERBOSE:-3} \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH="@top_srcdir@/lib:@top_srcdir@/vdsm:@top_srcdir@/client:@top_srcdir@/vdsm_api:$PYTHONPATH" \
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 34a400c..b87fa61 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -133,6 +133,11 @@
raise FatalError("Cannot configure logging: %s" % e)
logging.addLevelName(5, 'TRACE')
+
+ # Shorten WARNING and CRITICAL to make the log align nicer.
+ logging.addLevelName(logging.WARNING, 'WARN')
+ logging.addLevelName(logging.CRITICAL, 'CRIT')
+
logging.TRACE = 5 # impolite but helpful
log = logging.getLogger('vds')
try:
--
To view, visit https://gerrit.ovirt.org/64217
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia18649258f145f974fd4a8f7a96b5849c4a77938
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: virt: enable libgfapi
by ahino@redhat.com
Ala Hino has uploaded a new change for review.
Change subject: virt: enable libgfapi
......................................................................
virt: enable libgfapi
This change is based on Federico's changes:
https://gerrit.ovirt.org/33768/
Change-Id: I54b81e87b959b0b49c0f06810f88410e7c75de1d
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M vdsm/storage/glusterVolume.py
M vdsm/storage/hsm.py
M vdsm/virt/vm.py
3 files changed, 22 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/44061/1
diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py
index 8f701ba..109d1c9 100644
--- a/vdsm/storage/glusterVolume.py
+++ b/vdsm/storage/glusterVolume.py
@@ -54,4 +54,5 @@
return {'volType': VmVolumeInfo.TYPE_NETWORK, 'path': glusterPath,
'protocol': 'gluster', 'volPort': volPort,
'volTransport': volTrans,
- 'volfileServer': volfileServer}
+ 'volfileServer': volfileServer,
+ 'bricks': volInfo[volname]['bricks']}
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index f68d3bb..109cdfa 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3209,8 +3209,7 @@
path = os.path.join(dom.domaindir, sd.DOMAIN_IMAGES, imgUUID,
volUUID)
volInfo = {'domainID': sdUUID, 'imageID': imgUUID,
- 'volumeID': volUUID, 'path': path,
- 'volType': "path"}
+ 'volumeID': volUUID, 'path': path}
leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID)
@@ -3221,8 +3220,8 @@
})
imgVolumesInfo.append(volInfo)
- if volUUID == leafUUID:
- leafInfo = volInfo
+
+ leafInfo = dom.produceVolume(imgUUID, leafUUID).getVmVolumeInfo()
return {'path': leafPath, 'info': leafInfo,
'imgVolumesInfo': imgVolumesInfo}
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 71a74b3..2976f3b 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -805,6 +805,23 @@
# A destroy request has been issued, exit early
break
drive['path'] = self.cif.prepareVolumePath(drive, self.id)
+ if drive.get('diskType') == DISK_TYPE.NETWORK:
+ volinfo = drive.get('volumeInfo')
+ drive['path'] = volinfo['path']
+ drive['protocol'] = volinfo['protocol']
+ if drive.get('hosts') is None:
+ """
+ THIS CODE COMMENTED OUT DUE TO A BUG IN LIBVIRT,
+ CANNOT WORK WITH MULTIPLE HOSTS
+ """
+ """
+ hosts = [dict(name=brick.split(":")[0],
+ port='0', transport='tcp')
+ for brick in volinfo['bricks']]
+ """
+ hosts = [dict(name=volinfo['bricks'][0].split(":")[0],
+ port='0', transport='tcp')]
+ drive['hosts'] = hosts
else:
# Now we got all the resources we needed
--
To view, visit https://gerrit.ovirt.org/44061
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54b81e87b959b0b49c0f06810f88410e7c75de1d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: sos: change getConnectedStoragePoolsList result key
by igoihman@redhat.com
Irit Goihman has uploaded a new change for review.
Change subject: sos: change getConnectedStoragePoolsList result key
......................................................................
sos: change getConnectedStoragePoolsList result key
patch https://gerrit.ovirt.org/#/c/63483 fixes
getConnectedStoragePoolsList result so it's needs to be updated in
sos report which uses the old wrong 'items' key.
Change-Id: I369d1392701d7b0eac2ce73613ba633a9a60d059
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M vdsm/sos/vdsm.py.in
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/63557/1
diff --git a/vdsm/sos/vdsm.py.in b/vdsm/sos/vdsm.py.in
index dd3ae91..5939d58 100644
--- a/vdsm/sos/vdsm.py.in
+++ b/vdsm/sos/vdsm.py.in
@@ -143,8 +143,8 @@
self.addObjectAsFile(
cli.getAllTasksStatuses(), "getAllTasksStatuses")
- if "items" in cli.getConnectedStoragePoolsList():
- pools_list = cli.getConnectedStoragePoolsList()["items"]
+ if "poollist" in cli.getConnectedStoragePoolsList():
+ pools_list = cli.getConnectedStoragePoolsList()["poollist"]
for pool in pools_list:
self.addObjectAsFile(
cli.getSpmStatus(pool), "getSpmStatus " + pool)
--
To view, visit https://gerrit.ovirt.org/63557
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I369d1392701d7b0eac2ce73613ba633a9a60d059
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: after_vm_start: changed vdscli to jsonrpcvdsli
by igoihman@redhat.com
Irit Goihman has uploaded a new change for review.
Change subject: after_vm_start: changed vdscli to jsonrpcvdsli
......................................................................
after_vm_start: changed vdscli to jsonrpcvdsli
vdscli is deprecated and was replaced by jsonrpcvdsli
Change-Id: I66bd62164594c83167e8e72081325ff60d1c0cb0
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M vdsm_hooks/openstacknet/after_vm_start.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/62713/1
diff --git a/vdsm_hooks/openstacknet/after_vm_start.py b/vdsm_hooks/openstacknet/after_vm_start.py
index 6f5c1e5..aa9b509 100644
--- a/vdsm_hooks/openstacknet/after_vm_start.py
+++ b/vdsm_hooks/openstacknet/after_vm_start.py
@@ -10,6 +10,7 @@
Where:
VM_ID should be replaced with the vm id.'''
+from contextlib import closing
import libvirt
import os
import time
@@ -17,16 +18,24 @@
import hooking
from openstacknet_utils import MARK_FOR_UNPAUSE_PATH
from openstacknet_utils import VM_ID_KEY
-from vdsm import vdscli
+from vdsm import config
+from vdsm import jsonrpcvdscli
OPENSTACK_NIC_WAIT_TIME = 15
+def connect_to_vdsm():
+ request_queues = config.get("addresses", "request_queues")
+ request_queue = request_queues.split(",")[0]
+ return jsonrpcvdscli.connect(requestQueue=request_queue)
+
+
def resume_paused_vm(vm_id):
unpause_file = MARK_FOR_UNPAUSE_PATH % vm_id
if os.path.isfile(unpause_file):
- vdscli.connect().cont(vm_id)
+ with closing(connect_to_vdsm()) as server:
+ server.cont(vm_id)
os.remove(unpause_file)
--
To view, visit https://gerrit.ovirt.org/62713
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66bd62164594c83167e8e72081325ff60d1c0cb0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
7 years, 6 months
Change in vdsm[master]: vdsm: Rely on system for logrotation
by Tomas Golembiovsky
Tomas Golembiovsky has uploaded a new change for review.
Change subject: vdsm: Rely on system for logrotation
......................................................................
vdsm: Rely on system for logrotation
When logrotate is installed it is normaly run periodicaly by cron. There
is no real reason to invoke logrotate manualy.
Also if we rely on system to run logrotate we can remove the dependency
on it from RPMs. It is enough to install the configuration file into the
the directory with logrotate configuration.
The patch also renames script vdsm-logrotate to vdsm-remove-logs because
it doesn't run logrotate anymore. It only removes old log files.
Change-Id: Ica888244bd7c65121f55983e5716a6eae5662879
Signed-off-by: Tomáš Golembiovský <tgolembi(a)redhat.com>
---
M static/Makefile.am
R static/etc/logrotate.d/vdsm
M vdsm.spec.in
M vdsm/Makefile.am
R vdsm/vdsm-remove-logs
5 files changed, 12 insertions(+), 21 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/63682/1
diff --git a/static/Makefile.am b/static/Makefile.am
index 040d6ec..22c8736 100644
--- a/static/Makefile.am
+++ b/static/Makefile.am
@@ -37,10 +37,10 @@
./etc/vdsm/mom.d/05-iotune.policy \
$(NULL)
-vdsmconfrotatedir = $(vdsmconfdir)/logrotate
+vdsmconfrotatedir = $(sysconfdir)/logrotate.d
vdsmconfrotate_DATA = \
- ./etc/vdsm/logrotate/vdsm \
+ ./etc/logrotate.d/vdsm \
$(NULL)
sudoersdir = $(sysconfdir)/sudoers.d
diff --git a/static/etc/vdsm/logrotate/vdsm b/static/etc/logrotate.d/vdsm
similarity index 100%
rename from static/etc/vdsm/logrotate/vdsm
rename to static/etc/logrotate.d/vdsm
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 26c36d3..dafeb9c 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -131,7 +131,6 @@
Requires: ethtool
Requires: which
Requires: sudo >= 1.7.3
-Requires: logrotate
Requires: xz
Requires: ntp
Requires: iproute >= 3.10.0
@@ -948,7 +947,7 @@
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy
-%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm
+%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm
%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm
%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf
%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf
@@ -956,7 +955,7 @@
%{_sysconfdir}/dhcp/dhclient.d/sourceRoute.sh
%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf
%{_sysconfdir}/sudoers.d/50_vdsm
-%{_sysconfdir}/cron.hourly/vdsm-logrotate
+%{_sysconfdir}/cron.hourly/vdsm-remove-logs
%{_sysconfdir}/libvirt/hooks/qemu
%{_libexecdir}/%{vdsm_name}/curl-img-wrap
%{_libexecdir}/%{vdsm_name}/fc-scan
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index 8b535b6..0b5e807 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -76,7 +76,7 @@
vdsm-gencerts.sh.in \
vdsm-libvirt-access.pkla \
vdsm-libvirt-access.rules \
- vdsm-logrotate \
+ vdsm-remove-logs \
vdsm-store-net-config.in \
vdsmd.8.in \
$(NULL)
@@ -94,7 +94,7 @@
install-data-bonding-defaults \
install-data-dhclient-hooks \
install-data-libvirtpass \
- install-data-logrotate \
+ install-data-logs \
install-data-vdsmconf
$(MKDIR_P) $(DESTDIR)$(vdsmrepo)
$(MKDIR_P) $(DESTDIR)$(vdsmrepo)/hsm-tasks
@@ -118,7 +118,7 @@
uninstall-data-bonding-defaults \
uninstall-data-dhclient-hooks \
uninstall-data-libvirtpass \
- uninstall-data-logrotate \
+ uninstall-data-logs \
uninstall-data-vdsmconf
install-data-libvirtpass:
@@ -139,14 +139,13 @@
$(RM) $(DESTDIR)$(vdsmdir)/bonding-defaults.json
$(RM) $(DESTDIR)$(vdsmdir)/bonding-name2numeric.json
-install-data-logrotate:
+install-data-logs:
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/cron.hourly
- $(INSTALL_SCRIPT) $(srcdir)/vdsm-logrotate \
- $(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-logrotate
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/cron.d
+ $(INSTALL_SCRIPT) $(srcdir)/vdsm-remove-logs \
+ $(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-remove-logs
-uninstall-data-logrotate:
- $(RM) $(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-logrotate
+uninstall-data-logs:
+ $(RM) $(DESTDIR)$(sysconfdir)/cron.hourly/vdsm-remove-logs
install-data-vdsmconf:
$(MKDIR_P) $(DESTDIR)$(vdsmconfdir)/vdsm.conf.d
diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-remove-logs
similarity index 77%
rename from vdsm/vdsm-logrotate
rename to vdsm/vdsm-remove-logs
index 11050b9..7760b6b 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-remove-logs
@@ -1,12 +1,5 @@
#!/bin/sh
-/usr/sbin/logrotate /etc/vdsm/logrotate/vdsm
-
-EXITVALUE=$?
-if [ $EXITVALUE != 0 ]; then
- /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
-fi
-
if [ -d /var/log/core ] ; then
/usr/bin/find /var/log/core -type f -name '*xz' -mtime +7 -exec /bin/rm -f '{}' \;
EXITVALUE=$?
--
To view, visit https://gerrit.ovirt.org/63682
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica888244bd7c65121f55983e5716a6eae5662879
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Golembiovsky <tgolembi(a)redhat.com>
7 years, 6 months