Bug 1839076 - engine-vacuum on nonexistent table returns 0
Summary: engine-vacuum on nonexistent table returns 0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.4.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.4.1
: 4.4.1.4
Assignee: Eli Mesika
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-22 12:48 UTC by Petr Matyáš
Modified: 2020-07-08 08:27 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.4.1.4
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-08 08:27:40 UTC
oVirt Team: Infra
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 109394 0 master MERGED return code correctly from vacuum 2020-06-25 12:11:37 UTC
oVirt gerrit 109644 0 master MERGED packaging: bin: Fix engine-vacuum.sh return 2020-06-25 12:11:37 UTC

Description Petr Matyáš 2020-05-22 12:48:15 UTC
Description of problem:
When running engine-vacuum on nonexistent table return code is 0, should be non-zero.

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.1-0.1.el8ev.noarch

How reproducible:
always

Steps to Reproduce:
1. engine-vacuum -t test
2.
3.

Actual results:
shows error but returns 0

Expected results:
shows error and returns non-zero return code

Additional info:
[root@engine ~]# engine-vacuum -t test
vacuumdb: vacuuming database "engine"
vacuumdb: error: query failed: ERROR:  relation "test" does not exist
LINE 2:   VALUES ('test'::pg_catalog.regclass, NULL::pg_catalog.text...
                  ^
vacuumdb: query was: WITH listed_tables (table_oid, column_list) AS (
  VALUES ('test'::pg_catalog.regclass, NULL::pg_catalog.text)
)
SELECT c.relname, ns.nspname, listed_tables.column_list FROM pg_catalog.pg_class c
 JOIN pg_catalog.pg_namespace ns ON c.relnamespace OPERATOR(pg_catalog.=) ns.oid
 LEFT JOIN pg_catalog.pg_class t ON c.reltoastrelid OPERATOR(pg_catalog.=) t.oid
 JOIN listed_tables ON listed_tables.table_oid OPERATOR(pg_catalog.=) c.oid
 ORDER BY c.relpages DESC;
/usr/bin/engine-vacuum: line 85: ==1: command not found
[root@engine ~]# echo $?
0

Comment 1 Yedidyah Bar David 2020-06-15 08:15:56 UTC
Seems like it's still broken

Comment 2 RHEL Program Management 2020-06-15 08:16:03 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 3 Petr Matyáš 2020-06-25 12:14:27 UTC
Verified on ovirt-engine-4.4.1.5-0.17.el8ev.noarch

Comment 4 Sandro Bonazzola 2020-07-08 08:27:40 UTC
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.1 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.


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