Bug - Archive State Module - Python exception
Since upgrading to 2014.7rc3, the archive state module throw an exception.
Comment: An exception occurred in this state: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1529, in call **cdata['kwargs']) File "/usr/lib/python2.7/dist-packages/salt/states/archive.py", line 137, in extracted file_result = file_result[file_result.keys()[0]] AttributeError: 'list' object has no attribute 'keys'''
Here is my state definition:
highshare_install_{{ application['version'] }}: archive.extracted: - name: /home/{{ website['name'] }}/{{ application['directory'] }} - source: salt://web/apps/highshare/files/highshare.{{ application['version'] }}.tar.gz - archive_format: tar - tar_options: xz
Thanks for this report. Could you please provide the output of that state run with debug logging enabled? Thanks!
Here is the full log: http://pastebin.com/ZRAfJXW0
The relevant part should start at line: 2172
Give #16690 a shot, @jfrank-quatral. Thanks!
Will do. Thanks for the support.
You're welcome. Thanks for using Salt. :]
Just downloaded the new archive.py, put it in the _states folder and synced it to a minion to try again and got the same error.
I tried to debug the problem by adding an log.error of the file_result variable and this is its output: http://pastebin.com/16b51RbM
Bah. OK. I was hoping that wouldn't lock like that but no such luck. I'll take another swing at it.
On Thu, Oct 16, 2014 at 2:54 PM, jfrank-quatral [email protected] wrote:
Just downloaded the new archive.py, put it in the _states folder and synced it to a minion to try again and got the same error.
I tried to debug the problem by adding an log.error of the file_result variable and this is its output: http://pastebin.com/16b51RbM
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/16658#issuecomment-59428778.
K, PR updated.
Now the exception is this: http://pastebin.com/kw2aL5sE
Oops. Sorry. Fixed.
On Thu, Oct 16, 2014 at 3:07 PM, jfrank-quatral [email protected] wrote:
Now the exception is this: http://pastebin.com/kw2aL5sE
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/16658#issuecomment-59430757.
Here is the new exception and the problem (state.sls is running) is still present: http://pastebin.com/bKWMvSyt
Guh, wrong try/except. It just isn't my day. :] One momenet.
Not sure if this helps, but the issue seems to be related to the _check_queue function in the state.py execution module.
Since a state is already running on this minion, it won't allow another one to be executed, thus the message: The function "state.sls" is running as PID 14671 and was started at 2014, Oct 28 14:45:38.583968 with jid 20141028144538583968
My quick fix was to add a boolean variable named concurrent to the state.single function, which is False by default. If True, then the _check_queue function is bypassed and allows the state.single function to run.
Hey, having the same issue with Salt 2014.1.13 and OpenSuse 12.2 and 13.1. With states and modules.
I can confirm the issue with 2014.1.11 packages on Ubuntu 14.04.
@annabzz @martinhoefling Thanks for the reports. It looks like the fix was only applied to the 2014.7 and develop branches, not 2014.1. Are either of you in a position to give the 2014.7.0 release a try? Packages are in stable for most distros, with the exception of Debian/Ubuntu, which should be available very soon.
@jfrank-quatral Are you still having problems with this as well? Or did the fix from @cachedout help?
@rallytime As far as I know, nothing worked for me. That is why I posted my own solution on how I managed to fix the issue, since we needed a solution in our development environment.
I wasn't sure if my fix was the correct way to solve the issue, so I didn't post try to push it upstream.
Unfortunately, we're using Debian and Ubuntu.
Am 19. November 2014 00:20:24 MEZ, schrieb Nicole Thomas [email protected]:
@annabzz @martinhoefling Thanks for the reports. It looks like the fix was only applied to the 2014.7 and develop branches, not 2014.1. Are either of you in a position to give the 2014.7.0 release a try? Packages are in stable for most distros, with the exception of Debian/Ubuntu, which should be available very soon.
@jfrank-quatral Are you still having problems with this as well? Or did the fix from @cachedout help?
Reply to this email directly or view it on GitHub: https://github.com/saltstack/salt/issues/16658#issuecomment-63564687
@jfrank-quatral I am not sure if that is the correct solution or not either. Do you have any feedback about that @cachedout?
We're running Salt 2014.7.0 with OpenSuse 13.1 and we can say it works. This is our state:
super-3.30.0:
archive.extracted:
- name: /home/soft/mgr/
- source: salt://super/files/super-3.30.0.tar.gz
- archive_format: tar
- if_missing: /home/soft/mgr/super-3.30.0/
- tar_options: xz