salt icon indicating copy to clipboard operation
salt copied to clipboard

cli option '--summary' got broken after upgrade to 2015.5.1

Open yermulnik opened this issue 11 years ago • 6 comments

(jail) [root#jail_salt][w:0][j:0][.../salt/states]> salt --version
salt 2015.5.1 (Lithium)
(jail) [root#jail_salt][w:0][j:0][.../salt/states]> salt 'dt-node03' grains.get saltversion
dt-node03:
    2015.5.0
(jail) [root#jail_salt][w:0][j:0][.../salt/states]> salt 'dt-node03' --summary grains.get saltversion
dt-node03:
    2015.5.0
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in <module>
    load_entry_point('salt==2015.5.1', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 349, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 208, in run
    self._print_returns_summary(ret)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 240, in _print_returns_summary
    minion_ret = ret[each_minion].get('ret')
AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in <module>
    load_entry_point('salt==2015.5.1', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 349, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 208, in run
    self._print_returns_summary(ret)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 240, in _print_returns_summary
    minion_ret = ret[each_minion].get('ret')
AttributeError: 'str' object has no attribute 'get'
(jail) [root#jail_salt][w:0][j:0][.../salt/states]>

yermulnik avatar May 25 '15 10:05 yermulnik

@yermulnik Thank you for providing this information. I was able to reproduce this as well.

justinta avatar Jun 01 '15 22:06 justinta

Why issue was closed?

(jail) [root#jail_salt][w:9][j:0][.../salt/states]> salt --version
salt 2015.5.2 (Lithium)
(jail) [root#jail_salt][w:9][j:0][.../salt/states]> salt 'dt-bal02' --summary grains.get saltversion
dt-bal02:
    2015.5.2
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in <module>
    load_entry_point('salt==2015.5.2', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 349, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 208, in run
    self._print_returns_summary(ret)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 240, in _print_returns_summary
    minion_ret = ret[each_minion].get('ret')
AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in <module>
    load_entry_point('salt==2015.5.2', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 349, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 208, in run
    self._print_returns_summary(ret)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/salt.py", line 240, in _print_returns_summary
    minion_ret = ret[each_minion].get('ret')
AttributeError: 'str' object has no attribute 'get'
(jail) [root#jail_salt][w:9][j:0][.../salt/states]>

yermulnik avatar Jun 17 '15 07:06 yermulnik

@yermulnik - I apologize for not explaining earlier, but I closed the issue because it should be fixed now at the head of the 2015.5 branch. If you give the change in #24732 a try, this should be resolved. The fix will be available in 2015.5.3.

rallytime avatar Jun 17 '15 14:06 rallytime

Ok, thanx. I'll wait for 2015.5.3 release.

yermulnik avatar Jun 17 '15 15:06 yermulnik

This is a duplicate of #23890.

jfindlay avatar Jun 30 '15 21:06 jfindlay

Thanx!

yermulnik avatar Jul 01 '15 07:07 yermulnik