Bug 1523993

Summary: [RFE] satellite-clone should provide an option to get detailed or verbose output
Product: Red Hat Satellite Reporter: Gauravi <gapatil>
Component: Satellite CloneAssignee: John Mitsch <jomitsch>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.3.0CC: ahumbe, bkearney, jomitsch, mmccune, rjerrido, sthirugn
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 20:51:03 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 Gauravi 2017-12-09 12:34:32 UTC
Description of problem:
It is difficult to understand what is being executed at back end while running below command:
# satellite-clone 
This will initiate a satellite-clone playbook using /usr/share/satellite-clone/satellite-clone-playbook.yml. Do you want to proceed? [y/n]
Running /usr/share/satellite-clone/satellite-clone-playbook.yml, output will show after playbook run
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation warnings can be 
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
 [WARNING]: Consider using unarchive module rather than running tar

Version-Release number of selected component (if applicable):
satellite-clone-1.1.4-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run below command:
   #satellite-clone

Actual results:
It shows result in one line.

Expected results:
ansible-playbook command provides -vvv option to get detailed output, similar way satellite-clone should provide a way to get the detailed output on the console.

Additional info:

Comment 1 John Mitsch 2017-12-11 15:11:11 UTC

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

Comment 2 Ashish Humbe 2017-12-13 09:28:23 UTC
Hi John,

This bz is different than 1523954,

The intention of this bz is to get a flag to debug output on the console. When we run # ansible-playbook command with -vvv option then we get detailed/debug output. Same way we need option with satellite-clone command.

In the bz 1523954: we are expecting progress bar or something like moving dots "." to indicate that script is working in the backend and not hung.

After the " [WARNING]: " message satellite-clone script takes very long time to show further details/steps output. This makes an impression to the user that command is hung so there should be some indication to the user that work is going on in the backend.

Comment 3 John Mitsch 2017-12-13 14:29:14 UTC
Thanks Ashish, a verbose flag is coming in 1.2.0 as well

Comment 5 Mike McCune 2017-12-15 21:10:13 UTC
# rpm -q satellite-clone
satellite-clone-1.2.0-1.el7sat.noarch

# satellite-clone --help

usage: satellite-clone [-h] [-v] [--start-at-task START_AT_TASK] [--step]
                       [--list-tasks]

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         verbose output
  --start-at-task START_AT_TASK
                        Start at a specific task
  --step                interactive: confirm each task before running
  --list-tasks          list tasks that will be run in the playbook

Confirmed, runs now with more verbose output

Comment 6 sthirugn@redhat.com 2018-02-12 20:27:20 UTC
Verified as per https://bugzilla.redhat.com/show_bug.cgi?id=1523954#c4.  Note that there is no verbose mode now, but the current running ansible tasks will be displayed by the satellite-clone command.

satellite-clone --help
usage: satellite-clone [-h] [--start-at-task START_AT_TASK] [--step]
                       [--list-tasks] [--flush-cache]

optional arguments:
  -h, --help            show this help message and exit
  --start-at-task START_AT_TASK
                        Start at a specific task
  --step                interactive: confirm each task before running
  --list-tasks          list tasks that will be run in the playbook
  --flush-cache         clear the fact cache and run playbook

Comment 7 John Mitsch 2018-02-12 20:37:33 UTC
Additional note - The verbose mode was removed as it does not play nicely with the Ansible playbook python module we use in the production script. I'm looking into it more, but it *may* be an issue on Ansible's end. Either way, once it is straightened out, verbose mode will be added back in

A workaround to run verbose mode is run "ansible-playbook -vvv -i /usr/share/satellite-clone/inventory /usr/share/satellite-clone/satellite-clone-playbook.yml"

Comment 8 sthirugn@redhat.com 2018-02-12 20:51:03 UTC

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