Description of problem: if it fails, it does not clean anything... tech analyzer 'trap' command, thx. fails because of https://bugzilla.redhat.com/show_bug.cgi?id=1539027 # ls -ltr /tmp/ total 21780 drwx------. 3 root root 17 Jan 25 10:38 systemd-private-76875037d08a469f972f0f9e62ecdd93-chronyd.service-ymOW61 drwxr-x---. 2 ovirt ovirt 6 Jan 25 14:16 ovirt-engine-pki.v2.lock -rw-------. 1 root root 27221 Jan 25 16:48 yum_save_tx.2018-01-25.16-48.iXetKz.yumtx -rw-------. 1 root root 27221 Jan 25 17:10 yum_save_tx.2018-01-25.17-10.64G38w.yumtx drwx------. 2 ovirt ovirt 33 Jan 25 17:14 tmpgMfndv drwxr-xr-x. 2 ovirt ovirt 30 Jan 25 17:14 hsperfdata_ovirt drwx------. 3 root root 17 Jan 25 17:14 systemd-private-76875037d08a469f972f0f9e62ecdd93-httpd.service-99ZBXJ drwxr-xr-x. 2 root root 6 Jan 26 13:43 hsperfdata_root -rw-------. 1 root root 11116788 Jan 26 13:43 sosreport-LogCollector-20180126134351.tar.xz -rw-r--r--. 1 root root 84 Jan 26 13:43 sosreport-LogCollector-20180126134351.tar.xz.md5 -rwxr-xr-x. 1 postgres postgres 11116788 Jan 26 13:53 sos.tar.xz -bash-4.2$ ovirt-log-collector-analyzer /tmp/sos.tar.xz Preparing environment: ====================== Temporary working directory is /tmp/tmp.MgPnKAwhD0 Unpacking postgres data. This can take up to several minutes. tar: sosreport-10-37-137-41.rhev.lab.eng.brq.redhat.com-20180126134346/sos_commands/postgresql/pgdump.tar\nsosreport-10-37-137-41.rhev.lab.eng.brq.redhat.com-20180126134346/sos_commands/postgresql/pgdump-scl-rh-postgresql95.tar: Not found in archive tar: Exiting with failure status due to previous errors tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors -bash-4.2$ ls -ltr /tmp/ total 21780 drwx------. 3 root root 17 Jan 25 10:38 systemd-private-76875037d08a469f972f0f9e62ecdd93-chronyd.service-ymOW61 drwxr-x---. 2 ovirt ovirt 6 Jan 25 14:16 ovirt-engine-pki.v2.lock -rw-------. 1 root root 27221 Jan 25 16:48 yum_save_tx.2018-01-25.16-48.iXetKz.yumtx -rw-------. 1 root root 27221 Jan 25 17:10 yum_save_tx.2018-01-25.17-10.64G38w.yumtx drwx------. 2 ovirt ovirt 33 Jan 25 17:14 tmpgMfndv drwxr-xr-x. 2 ovirt ovirt 30 Jan 25 17:14 hsperfdata_ovirt drwx------. 3 root root 17 Jan 25 17:14 systemd-private-76875037d08a469f972f0f9e62ecdd93-httpd.service-99ZBXJ drwxr-xr-x. 2 root root 6 Jan 26 13:43 hsperfdata_root -rw-------. 1 root root 11116788 Jan 26 13:43 sosreport-LogCollector-20180126134351.tar.xz -rw-r--r--. 1 root root 84 Jan 26 13:43 sosreport-LogCollector-20180126134351.tar.xz.md5 -rwxr-xr-x. 1 postgres postgres 11116788 Jan 26 13:53 sos.tar.xz drwxr-xr-x. 2 postgres postgres 6 Jan 26 14:00 ovirt-log-collector-analyzer-hosts drwx------. 4 postgres postgres 78 Jan 26 14:00 tmp.MgPnKAwhD0 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
*** This bug has been marked as a duplicate of bug 1539027 ***
This bug is in no way a duplicate of BZ1539027. This bug is about the tool itself does not clean it's temporary data - it must clean its temporary data when it does fail or is canceled by user. Why? This tool fail because it did not have space to extract all data into /tmp and this caused my /tmp is 100% full. If this tool would use `trap` to cache signals and do its own cleaning in the end if won't have 100% full /tmp. ---%>--- $ rhv-log-collector-analyzer /tmp/sosreport-LogCollector-20180725114347.tar.xz /bin/rhv-log-collector-analyzer: line 126: [: : integer expression expected Preparing environment: ====================== Temporary working directory is /tmp/tmp.0k5vGFTaUu Unpacking postgres data. This can take up to several minutes. sos-report extracted into: /tmp/tmp.0k5vGFTaUu/unpacked_sosreport pgdump extracted into: /tmp/tmp.0k5vGFTaUu/pg_dump_dir Welcome to unpackHostsSosReports script! Extracting sosreport from hypervisor slot-1.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-1.rhev.lab.eng.brq.redhat.com Extracting sosreport from hypervisor slot-5a.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-5a.rhev.lab.eng.brq.redhat.com Extracting sosreport from hypervisor slot-5c.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-5c.rhev.lab.eng.brq.redhat.com Extracting sosreport from hypervisor slot-5d.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-5d.rhev.lab.eng.brq.redhat.com Extracting sosreport from hypervisor slot-6a.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-6a.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-6b.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-6b.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-6b.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-6c.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-6c.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-6c.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-6d.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-6d.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-6d.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-7a.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-7a.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-7a.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-7b.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-7b.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-7b.rhev.lab.eng.brq.redhat.com mkdir: cannot create directory ‘/tmp/ovirt-log-collector-analyzer-hosts/slot-7c.rhev.lab.eng.brq.redhat.com’: No space left on device Extracting sosreport from hypervisor slot-7c.rhev.lab.eng.brq.redhat.com in /tmp/ovirt-log-collector-analyzer-hosts/slot-7c.rhev.lab.eng.brq.redhat.com /usr/share/rhv-log-collector-analyzer/analyzer/importDumpIntoNewDb.sh: line 66: /tmp/tmp.0k5vGFTaUu/produceHtml.sh: No space left on device ---%<--- use trap!
ok, rhv-log-collector-analyzer-0.1.5-0.el7ev.noarch $ rhv-log-collector-analyzer /temp/sosreport-LogCollector-20180817140049.tar.xz Preparing environment: ====================== Temporary working directory is /temp/tmp.NtV7d6iNCq Unpacking postgres data. This can take up to several minutes. sos-report extracted into: /temp/tmp.NtV7d6iNCq/unpacked_sosreport pgdump extracted into: /temp/tmp.NtV7d6iNCq/pg_dump_dir Welcome to unpackHostsSosReports script! Creating a temporary database in /temp/tmp.NtV7d6iNCq/postgresDb/pgdata. Log of initdb is in /temp/tmp.NtV7d6iNCq/initdb.log WARNING: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. LOG: redirecting log output to logging collector process HINT: Future log output will appear in directory "pg_log". Importing the dump into a temporary database. Log of the restore process is in /temp/tmp.NtV7d6iNCq/db-restore.log ^C -bash-4.2$ ls -ltr $TMPDIR total 29228 -rw-r--r--. 1 postgres postgres 29921640 Aug 17 14:00 sosreport-LogCollector-20180817140049.tar.xz -rw-r--r--. 1 root root 85 Aug 17 14:01 sosreport-LogCollector-20180817140049.tar.xz.md5
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. https://access.redhat.com/errata/RHEA-2018:2639
BZ<2>Jira re-sync