Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1854071

Summary: ovirt-log-collector failed on "ERROR: Could not collect PostgreSQL information: [Errno 2] No such file or directory"
Product: [oVirt] ovirt-log-collector Reporter: Tzahi Ashkenazi <tashkena>
Component: GeneralAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED CURRENTRELEASE QA Contact: Guilherme Santos <gdeolive>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.4.1CC: ahadas, bugs, dagur, gdeolive, mavital, michal.skrivanek, mlehrer
Target Milestone: ovirt-4.4.2Keywords: Regression, TestBlocker
Target Release: ---Flags: mavital: needinfo+
sbonazzo: ovirt-4.4?
sbonazzo: planning_ack?
sbonazzo: devel_ack+
lleistne: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-log-collector-4.4.2-2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-18 07:13:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tzahi Ashkenazi 2020-07-06 09:10:28 UTC
Description of problem:

while running  ovirt-log-collector tool .
its failed on connecting to the PostgreSQL and exit on error 

ERROR: Could not collect PostgreSQL information: [Errno 2] No such file or directory: '/var/tmp/logcollector-_hrqeh5j/working/log-collector-data/sosreport-rhev-red-01-2020-07-06-nhaduce.tar.xz.sha256' -> '/var/tmp/logcollector-_hrqeh5j/working/log-collector-data/postgresql-sosreport-rhev-red-01-2020-07-06-nhaduce.tar.xz.sha256'

Version-Release number of selected component (if applicable):

vdsm-4.40.22-1.el8ev.x86_64
rhv-release-4.4.1-10-001.noarch


How reproducible:
from the engine run the > ovirt-log-collector

Steps to Reproduce:
1. from the engine run the > ovirt-log-collector

Actual results:
INFO: Gathering PostgreSQL the oVirt Engine database and log files from localhost...
ERROR: Could not collect PostgreSQL information: [Errno 2] No such file or directory: '/var/tmp/logcollector-_hrqeh5j/working/log-collector-data/sosreport-rhev-red-01-2020-07-06-nhaduce.tar.xz.sha256' -> '/var/tmp/logcollector-_hrqeh5j/working/log-collector-data/postgresql-sosreport-rhev-red-01-2020-07-06-nhaduce.tar.xz.sha256'


Expected results:
without any errors such as above 

Additional info:
1. tested on rhev 4.3 which working without any errors , seems like its related to the new DB 
2. while running the ovirt-log-collector with the --local-tmp flag in order to redirect the results to another folder other then /tmp  
its still write the results  to /tmp 

example : 
 ovirt-log-collector  --no-hypervisors  --local-tmp=/tzahi_mount_test/log_collector_bug/LOGCOLLECT1/ --log-file=/tzahi_mount_test/log_collector_bug/LOGCOLLECT2/collect.log

INFO: Skipping hypervisor collection...
INFO: Creating compressed archive...
ERROR: tar: /tmp/sosreport-LogCollector-20200706041628.tar: Cannot write: No space left on device
ERROR: tar: Error is not recoverable: exiting now
 2.0G  2.0G   24K 100% /tmp

Comment 1 Douglas Schilling Landgraf 2020-07-07 11:14:52 UTC
Start investigating.

Comment 3 Sandro Bonazzola 2020-07-13 09:46:21 UTC
Moving back to modified since ovirt-log-collector-4.4.2-2 was not included in 4.4.1 compose

Comment 4 Michal Skrivanek 2020-07-23 12:45:59 UTC
doesn't matter if it's in a compose or not if FixedInVersion clearly specifies the package. Fix is available there and QE can either verify with that or wait until a compose exists

Comment 5 Douglas Schilling Landgraf 2020-07-30 23:45:40 UTC
*** Bug 1862169 has been marked as a duplicate of this bug. ***

Comment 6 Sandro Bonazzola 2020-08-04 13:41:15 UTC
As a workaround, you can still collect data from the engine by running sos-report.

Comment 7 Guilherme Santos 2020-08-27 08:52:48 UTC
Verified on:
ovirt-engine-4.4.2.3-0.6.el8ev.noarch
ovirt-log-collector-4.4.3-1.el8ev.noarch

Steps:
1. # fallocate -l $((`df | grep /tmp | awk '{print $4}'` - 100))K /tmp/fake.file
2. # ovirt-log-collector --local-tmp=/root/local_tmp

Results:
No PostgreSQL and tmp files created on dir specified on --local-tmp (no issue with lack on space on /tmp)

Comment 8 Sandro Bonazzola 2020-09-18 07:13:28 UTC
This bugzilla is included in oVirt 4.4.2 release, published on September 17th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.2 release, it has been closed with a resolution of CURRENT RELEASE.

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