Bug 1421764

Summary: engine-vacuum needs proper log messages
Product: [oVirt] ovirt-engine Reporter: Lukas Svaty <lsvaty>
Component: Database.CoreAssignee: Martin Perina <mperina>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: low Docs Contact:
Priority: medium    
Version: 4.1.1CC: bugs, lveyde, mgoldboi, mperina, oourfali, rgolan
Target Milestone: ovirt-4.1.2Keywords: Improvement
Target Release: 4.1.2Flags: rule-engine: ovirt-4.1+
rule-engine: ovirt-4.2+
lsvaty: testing_plan_complete+
mgoldboi: planning_ack+
mperina: devel_ack+
lsvaty: testing_ack+
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:16:23 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:

Description Lukas Svaty 2017-02-13 15:44:54 UTC
Description of problem:
When running ovirt vacuum only sql commands are written to command line. Either write them with proper descrription or dont write anything. Non educated user about sql does not know what these means.

Version-Release number of selected component (if applicable):
rhevm-4.1.1-0.1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. [root@ls-engine1 ~]# engine-vacuum 
VACUUM;

1. [root@ls-engine1 ~]# engine-vacuum -f
VACUUM (FULL);


Actual results:
1. VACUUM;
2. VACUUM (FULL);

Expected results:
1. Running vacuum on database, sql: VACUUM
2. Running full vacuum on database, sql: VACUUM (FULL)

Comment 1 Yaniv Kaul 2017-03-08 19:31:50 UTC
Any updates on this?

Comment 2 Roy Golan 2017-03-09 09:08:10 UTC
You have a -v flag for verbosity, which is exactly what needed. 

```
engine-vacuum -v
...
CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  "pg_toast_1016191": found 0 removable, 0 nonremovable row versions in 0 out of 0 pages
DETAIL:  0 dead row versions cannot be removed yet.
There were 0 unused item pointers.
Skipped 0 pages due to buffer pins.
0 pages are entirely empty.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
VACUUM (VERBOSE);
```

Comment 3 Yaniv Kaul 2017-03-09 09:15:27 UTC
(In reply to Roy Golan from comment #2)
> You have a -v flag for verbosity, which is exactly what needed. 
> 
> ```
> engine-vacuum -v
> ...
> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> INFO:  "pg_toast_1016191": found 0 removable, 0 nonremovable row versions in
> 0 out of 0 pages
> DETAIL:  0 dead row versions cannot be removed yet.
> There were 0 unused item pointers.
> Skipped 0 pages due to buffer pins.
> 0 pages are entirely empty.
> CPU 0.00s/0.00u sec elapsed 0.00 sec.
> VACUUM (VERBOSE);
> ```

So is it going to 4.1.2? Is the bug fixed? What's the status?

Comment 4 Martin Perina 2017-03-09 09:22:32 UTC
As discussed in the past with Roy, we should suppress output if verbose is not specified (displaying "VACUUM;" or "VACUUM (FULL);"). If verbose is specified then we will show full output of the command as mentioned in Comment 2.

@Roy will you prepare the fix or should I assign it to someone else?

Comment 5 Lukas Svaty 2017-05-09 13:29:06 UTC
verified in ovirt-engine-4.1.2.1-0.1.el7.noarch