saltstack / saltstack/salt

--out progress not working

Open
#54,395 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Confirmed help-wanted Outputters severity-low
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

Output progress not working => https://docs.saltstack.com/en/latest/ref/output/all/salt.output.progress.html

Steps to Reproduce Issue
sudo pip install --user progressbar
sudo salt-call state.apply --out progress   
[ERROR   ] Nested output failed: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 49, in try_printout
    printout = get_printout('nested', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
TypeError: output() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 431, in salt_call
    client.run()
  File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 57, in run
    caller.run()
  File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 154, in run
    _retcode=ret.get('retcode', 0))
  File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 96, in display_output
    display_data = try_printout(data, out, opts, **kwargs)
  File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 54, in try_printout
    printout = get_printout('raw', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
  File "/usr/bin/salt-call", line 11, in <module>
    salt_call()
  File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 431, in salt_call
    client.run()
  File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 57, in run
    caller.run()
  File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 154, in run
    _retcode=ret.get('retcode', 0))
  File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 96, in display_output
    display_data = try_printout(data, out, opts, **kwargs)
  File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 54, in try_printout
    printout = get_printout('raw', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
Versions Report
Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.11.5
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10.1
        libgit2: 0.27.8
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.27.4
         Python: 2.7.16 (default, Apr 30 2019, 15:54:43)
   python-gnupg: Not Installed
         PyYAML: 5.1
          PyZMQ: 17.0.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 5.0.2
            ZMQ: 4.3.1
 
System Versions:
           dist: fedora 30 Thirty
         locale: UTF-8
        machine: x86_64
        release: 5.2.9-200.fc30.x86_64
         system: Linux
        version: Fedora 30 Thirty

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with salt-call state.apply --out progress after installing progressbar, then inspect salt/output/__init__.py, especially try_printout and display_output, where the traceback points. Confirm the fix by running the same command and verifying that progress output completes without the nested or raw output TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.