Bug 1016651

Summary: log file overwritten each upload attempt
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-image-uploaderAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, iheim, jbelka, jkt, knesenko, pstehlik, Rhev-m-bugs, sbonazzo, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 3.2.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: rhevm-image-uploader-3.2.2-3.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 950712 Environment:
Last Closed: 2013-10-25 18:12:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 950712    
Bug Blocks:    

Description rhev-integ 2013-10-08 13:25:20 UTC
+++ This bug is a RHEV-M zstream clone. The original bug is: +++
+++   https://bugzilla.redhat.com/show_bug.cgi?id=+++ Requested by "sbonazzo" +++
. +++
950712======================================================================




----------------------------------------------------------------------
Following comment by dajohnso on April 10 at 17:46:27, 2013

Description of problem:
========================================================
Each time you attempt to upload a image, the existing log file gets overwritten which makes debugging issues harder when you execute multiple attempts to upload.

Either append or save existing off to a timestamp prefixed file would be a little more customer friendly.


Version-Release number of selected component (if applicable):
====================================================================
rhevm-image-uploader-3.1.0-7.el6ev.noarch


How reproducible:   
================
100%

Steps to Reproduce:
==================================
1.  run several uploads in succession and see the log file only tracks the last attempt

----------------------------------------------------------------------
Following comment by sbonazzo on August 19 at 14:14:31, 2013

Patch pushed on master branch.
Note that also log-collector and iso-uploader are affected by the same bug.
I'll open one bug for each of them.

----------------------------------------------------------------------
Following comment by sbonazzo on August 20 at 08:10:43, 2013

Log messages to timestamped files as default, avoiding to overwrite existing ones.

The default location of the logs was changed, to improve /var/log/ovirt-engine sanity.

/var/log/ovirt-engine -> /var/log/ovirt-engine/ovirt-image-uploader

A log rotation was introduced in order to compress old logs.

----------------------------------------------------------------------
Following comment by sbonazzo on August 20 at 11:21:25, 2013

merged upstream master, pushed to 3.3 branch

----------------------------------------------------------------------
Following comment by sbonazzo on August 21 at 05:49:38, 2013

merged upstream 3.3 branch

----------------------------------------------------------------------
Following comment by errata-xmlrpc on August 21 at 08:40:26, 2013

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2013:15256-01
http://errata.devel.redhat.com/errata/show/15256

----------------------------------------------------------------------
Following comment by dbotzer on August 27 at 09:06:59, 2013

3.3/is11
I get a new file for each image-uploader command is this correct ?
=======================
>ovirt-image-uploader-20130827113507.log
2013-08-27 11:35:18::ERROR::rhevm-image-uploader::1335::root:: not a gzip file

>ovirt-image-uploader-20130827120229.log
2013-08-27 12:02:40::ERROR::rhevm-image-uploader::1335::root:: empty header

-rw-r--r--. 1 root root  192 Aug 27 11:09 ovirt-image-uploader-20130827110954.log
-rw-r--r--. 1 root root  192 Aug 27 11:11 ovirt-image-uploader-20130827111114.log
-rw-r--r--. 1 root root  192 Aug 27 11:11 ovirt-image-uploader-20130827111131.log
-rw-r--r--. 1 root root  192 Aug 27 11:11 ovirt-image-uploader-20130827111133.log
-rw-r--r--. 1 root root  192 Aug 27 11:11 ovirt-image-uploader-20130827111135.log
-rw-r--r--. 1 root root  192 Aug 27 11:11 ovirt-image-uploader-20130827111136.log
-rw-r--r--. 1 root root   99 Aug 27 11:12 ovirt-image-uploader-20130827111242.log
-rw-r--r--. 1 root root    0 Aug 27 11:16 ovirt-image-uploader-20130827111602.log
-rw-r--r--. 1 root root  209 Aug 27 11:17 ovirt-image-uploader-20130827111750.log
-rw-r--r--. 1 root root    0 Aug 27 11:17 ovirt-image-uploader-20130827111757.log
-rw-r--r--. 1 root root  110 Aug 27 11:18 ovirt-image-uploader-20130827111845.log
-rw-r--r--. 1 root root   79 Aug 27 11:35 ovirt-image-uploader-20130827113507.log
-rw-r--r--. 1 root root   76 Aug 27 12:02 ovirt-image-uploader-20130827120229.log
-rw-r--r--. 1 root root  109 Aug 27 12:04 ovirt-image-uploader-20130827120434.log
-rw-r--r--. 1 root root   76 Aug 27 12:05 ovirt-image-uploader-20130827120456.log
-rw-r--r--. 1 root root   76 Aug 27 12:05 ovirt-image-uploader-20130827120528.log

----------------------------------------------------------------------
Following comment by sbonazzo on September 04 at 08:49:07, 2013

(In reply to David Botzer from comment #6)
> 3.3/is11
> I get a new file for each image-uploader command is this correct ?

Yes a new log file is created for each image-uploader execution. It is correct.

----------------------------------------------------------------------
Following comment by dbotzer on September 04 at 09:03:35, 2013

Fixed, 3.3/is11

Comment 1 Sandro Bonazzola 2013-10-08 14:21:56 UTC
patch merged upstream 3.2 branch

Comment 3 Jiri Belka 2013-10-09 15:29:25 UTC
ok, sf21.

# ls -ltr /var/log/ovirt-engine/ovirt-image-uploader/
total 48
-rw-r--r--. 1 root root 22083 Oct  9 17:28 ovirt-image-uploader-20131009172807.log
-rw-r--r--. 1 root root 22083 Oct  9 17:28 ovirt-image-uploader-20131009172823.log

Comment 5 errata-xmlrpc 2013-10-25 18:12:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1464.html