Bug 1343757
| Summary: | engine-psql.sh does not log commands when -c option is used | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Allie DeVolder <adevolder> | |
| Component: | redhat-support-plugin-rhev | Assignee: | Spenser Shumaker <sshumake> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavel Stehlik <pstehlik> | |
| Severity: | low | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 3.6.3 | CC: | awels, dornelas, gklein, lsurette, mkalinin, mperina, oourfali, pstehlik, rbalakri, rmcswain, srevivo, ykaul | |
| Target Milestone: | ovirt-4.0.0-rc | |||
| Target Release: | 4.0.0 | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1344468 1344586 (view as bug list) | Environment: | ||
| Last Closed: | 2016-09-06 06:55:14 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1344586 | |||
|
Description
Allie DeVolder
2016-06-07 20:22:21 UTC
Without '-a' tee will overwrite the specified file. Everything was logged correctly to LOGFILE up until this point, but then tee is overwriting LOGFILE with the output of psql command. # /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select 1"
?column?
----------
1
(1 row)
# zcat /var/log/ovirt-engine/db-manual/20160607171954-engine-psql.log.gz
Tue Jun 7 17:19:54 EDT 2016: executing command : /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c select 1
output:
?column?
----------
1
(1 row)
result: 0
# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -f /root/test.sql
?column?
----------
1
(1 row)
# zcat /var/log/ovirt-engine/db-manual/20160607172005-engine-psql.log.gz
Tue Jun 7 17:20:05 EDT 2016: executing command : /usr/share/ovirt-engine/dbscripts/engine-psql.sh -f /root/test.sql
file content is:
select 1
output:
?column?
----------
1
(1 row)
result: 0
Alex, could you please take a look? My sh skills are non-existent, but I can certainly apply the patch that adds -a to line 85 command as provided by Derrick Ornelas. Looks like a fairly trivial change to me. I didn't write the script it was dropped in my lap with a note saying its yours now. @Derrick is that what you want me to do? Can you verify that it solves your problem? Ahh, sorry Alex, now I remember that GSS wanted this script to be included in support-plugin. To me this change make sense, but I think GSS should approve the change (as they have requested this script to be included). Marina? Yes, this is very needed by GSS. And this is actually a regression, since it used to work: https://bugzilla.redhat.com/show_bug.cgi?id=1071458 Please please please fix it! +1 for this, thanks! :) redhat-support-plugin-rhev-4.0.0-7.el7ev.noarch |