Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1608326 - /bin/rhv-log-collector-analyzer: line 126: [: : integer expression expected
/bin/rhv-log-collector-analyzer: line 126: [: : integer expression expected
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhv-log-collector-analyzer (Show other bugs)
4.2.5
Unspecified Unspecified
medium Severity medium
: ovirt-4.2.6
: ---
Assigned To: Douglas Schilling Landgraf
Jiri Belka
: FieldEngineering, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-25 06:18 EDT by Jiri Belka
Modified: 2018-10-01 08:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: rhv-log-collector-analyzer-0.1.3-0.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-09-04 09:46:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:2639 None None None 2018-09-04 09:47 EDT

  None (edit)
Description Jiri Belka 2018-07-25 06:18:57 EDT
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 08:07:19 EDT
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 09:46:53 EDT
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.