Bug 1179361

Summary: hammer truncates output when interactive=false
Product: Red Hat Satellite Reporter: Jindrich Novy <jindrich.novy>
Component: HammerAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.6CC: bkearney, chrobert
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/10313
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-30 12:02:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jindrich Novy 2015-01-06 15:36:15 UTC
Description of problem:
hammer truncates output if interactive=false is defined in the ui section in cli_config.yml.

The default value for "per-page" parameter (defaults to 20) which specifies how many lines should be displayed on terminal before hammer asks interactively whether to display the next page is not ignored when interactive=false. This causes the output to be truncated to per-page lines even though more lines are to be displayed t get complete output.

Per-page should be ignored when interactive: false is defined and there is no --page command line argument.

Version-Release number of selected component (if applicable):
rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
rubygem-hammer_cli-0.1.1-12.el6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
rubygem-hammer_cli_import-0.10.4-1.3.el6sat.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch


How reproducible:
Always

Steps to Reproduce:
1. define interactive: false, default per-page: 2 in "ui:" section in cli_config.yml
2. hammer product list --organization=morganstanley
3. see truncated output

Actual results:
---|----------------------------------------------|-------------|---------------|--------------|-----------
ID | NAME                                         | DESCRIPTION | ORGANIZATION  | REPOSITORIES | SYNC STATE
---|----------------------------------------------|-------------|---------------|--------------|-----------
42 | Red Hat Software Collections for RHEL Server |             | morganstanley | 0            | not_synced
35 | Red Hat Beta                                 |             | morganstanley | 0            | not_synced
---|----------------------------------------------|-------------|---------------|--------------|-----------


Expected results:
---|----------------------------------------------------------------------------------|-------------|---------------|--------------|-----------
ID | NAME                                                                             | DESCRIPTION | ORGANIZATION  | REPOSITORIES | SYNC STATE
---|----------------------------------------------------------------------------------|-------------|---------------|--------------|-----------
42 | Red Hat Software Collections for RHEL Server                                     |             | morganstanley | 0            | not_synced
35 | Red Hat Beta                                                                     |             | morganstanley | 0            | not_synced
48 | Red Hat Enterprise Linux Atomic Host Beta                                        |             | morganstanley | 0            | not_synced
52 | Red Hat Developer Toolset for RHEL Server EUS                                    |             | morganstanley | 0            | not_synced
55 | Red Hat Enterprise Linux Scalable File System for RHEL Server - Extended Upda... |             | morganstanley | 0            | not_synced
58 | Red Hat Enterprise Linux High Availability for RHEL Server                       |             | morganstanley | 0            | not_synced
62 | Red Hat Developer Toolset for RHEL Server                                        |             | morganstanley | 0            | not_synced
46 | Red Hat Enterprise Linux Scalable File System for RHEL Server                    |             | morganstanley | 0            | not_synced
39 | Red Hat Enterprise Linux Server - Extended Update Support                        |             | morganstanley | 0            | not_synced
40 | Oracle Java for RHEL Server - Extended Update Support                            |             | morganstanley | 0            | not_synced
43 | Red Hat Enterprise Virtualization                                                |             | morganstanley | 0            | not_synced
36 | Oracle Java for RHEL Server                                                      |             | morganstanley | 0            | not_synced
49 | Red Hat Enterprise Linux High Availability for RHEL Server - Extended Update ... |             | morganstanley | 0            | not_synced
50 | MRG Realtime                                                                     |             | morganstanley | 0            | not_synced
53 | Red Hat Enterprise Linux High Performance Networking for RHEL Server - Extend... |             | morganstanley | 0            | not_synced
56 | Red Hat Enterprise Linux Load Balancer for RHEL Server - Extended Update Support |             | morganstanley | 0            | not_synced
59 | Red Hat Enterprise Linux Atomic Host                                             |             | morganstanley | 0            | not_synced
60 | Red Hat Enterprise Linux Load Balancer for RHEL Server                           |             | morganstanley | 0            | not_synced
44 | Red Hat Software Collections Beta for RHEL Server                                |             | morganstanley | 0            | not_synced
41 | JBoss Enterprise Application Platform                                            |             | morganstanley | 0            | not_synced
47 | Red Hat Enterprise Linux Resilient Storage for RHEL Server - Extended Update ... |             | morganstanley | 0            | not_synced
51 | Red Hat Container Images Beta                                                    |             | morganstanley | 0            | not_synced
54 | Red Hat Enterprise Linux Resilient Storage for RHEL Server                       |             | morganstanley | 0            | not_synced
57 | Red Hat Container Images                                                         |             | morganstanley | 0            | not_synced
61 | Red Hat Enterprise Linux High Performance Networking for RHEL Server             |             | morganstanley | 0            | not_synced
37 | Red Hat Enterprise Linux Server                                                  |             | morganstanley | 3            | finished
64 | Quattor                                                                          |             | morganstanley | 2            | finished
---|----------------------------------------------------------------------------------|-------------|---------------|--------------|-----------

Additional info:
It is very inconvenient to have the output truncated in interactive: false mode. Especially when there is no --page parameter specified on hammer commandline. In such case hammer should provide full output.

Comment 1 RHEL Program Management 2015-01-06 15:54:53 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Bryan Kearney 2015-04-29 17:07:23 UTC
Created redmine issue http://projects.theforeman.org/issues/10313 from this bug

Comment 4 Bryan Kearney 2015-04-30 12:02:10 UTC

*** This bug has been marked as a duplicate of bug 1142258 ***