Bug 1608326 - /bin/rhv-log-collector-analyzer: line 126: [: : integer expression expected
Summary: /bin/rhv-log-collector-analyzer: line 126: [: : integer expression expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhv-log-collector-analyzer
Version: 4.2.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.6
: ---
Assignee: Douglas Schilling Landgraf
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-25 10:18 UTC by Jiri Belka
Modified: 2018-10-01 12:25 UTC (History)
5 users (show)

Fixed In Version: rhv-log-collector-analyzer-0.1.3-0.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 13:46:53 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:2639 0 None None None 2018-09-04 13:47:00 UTC

Description Jiri Belka 2018-07-25 10:18:57 UTC
Description of problem:

not sure but '[' is external command for bash (/usr/bin/[), thus the syntax is not ok - comparing <nothing> in algebraically equal test.

iiuc if you would use bash's '[[' it would work. also would work if all vars would be defined in the beginning with its default values (ie. LIVE=0).


if [ "${LIVE}" -eq 1 ]; then
    echo "Generating reports:"
    echo "==================="
    tmpfile=$(mktemp)
    rhv-log-collector-analyzer-live --csv > "${tmpfile}" && asciidoctor -a toc=left -o "${HTML_OUT}" "${tmpfile}"
    echo "Generated ${HTML_OUT}"
    exit $?
fi


Version-Release number of selected component (if applicable):
rhv-log-collector-analyzer-0.1.2-0.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. run the tool, eg. $ rhv-log-collector-analyzer /tmp/sosreport-LogCollector-20180725114347.tar.xz
2. check output
3.

Actual results:
syntax is incorrect

Expected results:
not syntax issues

Additional info:

Comment 3 Jiri Belka 2018-08-17 12:07:19 UTC
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.rMp9TTazmh
Unpacking postgres data. This can take up to several minutes.
sos-report extracted into: /temp/tmp.rMp9TTazmh/unpacked_sosreport
pgdump extracted into: /temp/tmp.rMp9TTazmh/pg_dump_dir
Welcome to unpackHostsSosReports script!
Creating a temporary database in /temp/tmp.rMp9TTazmh/postgresDb/pgdata. Log of initdb is in /temp/tmp.rMp9TTazmh/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.rMp9TTazmh/db-restore.log

Generating reports:
===================
Generated analyzer_report.html

Cleaning up:
============
Stopping temporary database
Removing temporary directory /temp/tmp.rMp9TTazmh

Comment 6 errata-xmlrpc 2018-09-04 13:46:53 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.

https://access.redhat.com/errata/RHEA-2018:2639


Note You need to log in before you can comment on or make changes to this bug.