grains.setval returned index error after upgrade from 2014.1.4 to 2014.1.5
Had a strange issue pop up. I was running 2014.1.4. I installed 2014.1.5 over the top of 2014.1.4 with a fresh checkout of v2014.1.5 from github using 'python setup.py install --force' and restarted the salt-master and salt-minion service.
I spun up two new nodes on Digital Ocean using salt-cloud and attempted to manually set a grain using salt 'nginx*' grains.setval role webserver.
I received an error for both nodes indicating something to the affect of a malformed index, though unfortunately I didn't capture it exactly. Afterwords the grains seemed to be corrupted as I received the same error when trying to apply a highstate.
I downgraded to 2014.1.4 and the error went away. I upgraded to 2014.1.5 again this morning using the same method and have not been able to reproduce the error.
It sounds like it may have been a caching issue, but its difficult to say since I haven't been able to reproduce.
Thank you, -Mike
Mike,
I'm assuming this is NOT the error you received?:
cro-13544-minion:
TypeError encountered executing grains.setval: setval() takes at least 2 arguments (1 given).
See debug log for more info. Possibly a missing arguments issue:
ArgSpec(args=['key', 'val', 'destructive'], varargs=None, keywords=None, defaults=(False,))
Correct. :) I wish I would have captured it. I have tried reproducing a few more times without success. If I can get it to pop up again I will record the details
-Mike
Sent from my iPhone. Please pardon any typographical errors.
On Jun 18, 2014, at 4:26 PM, "C. R. Oldham" [email protected] wrote:
Mike,
I'm assuming this is NOT the error you received?:
cro-13544-minion: TypeError encountered executing grains.setval: setval() takes at least 2 arguments (1 given). See debug log for more info. Possibly a missing arguments issue: ArgSpec(args=['key', 'val', 'destructive'], varargs=None, keywords=None, defaults=(False,))
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/13544#issuecomment-46502638.
That's the result of 'salt * grains.setval role', BTW.
Yep seen that before though that's not what was encountered. It had the word "index" in it and seemed to break all the modules. Will report further if I can get it to pop up again.
On Jun 18, 2014, at 4:39 PM, "C. R. Oldham" [email protected] wrote:
That's the result of 'salt * grains.setval role', BTW.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/13544#issuecomment-46503677.
Got this to pop up again. I'm wondering if this is actually related to running on Ubuntu 14.04 (i'm hearing there are some stability issues here). I will test again on Ubuntu 12.10. The actual error is:
TypeError encountered executing grains.setval: 'bool' object is not iterable. See debug log for more info. Possibly a missing arguments issue: ArgSpec(args=['key', 'val', 'destructive'], varargs=None, keywords=None, defaults=(False,))
The command is: salt 'nginx*' grains.setval role webserver
I will spin up a new Ubuntu 14.04 machine and see what I get. Thanks for pasting the actual error!
FYI on fresh install on DO I could not duplicate.
Curious to see your existing nginx machine. Did you add my key?
C. R. Oldham, Platform Engineer, SaltStack, Inc. 801-564-4673 / [email protected] / https://github.com/cro
On Jul 16, 2014, at 11:43 AM, Mike Ainsworth [email protected] wrote:
Got this to pop up again. I'm wondering if this is actually related to running on Ubuntu 14.04 (i'm hearing there are some stability issues here). I will test again on Ubuntu 12.10. The actual error is:
TypeError encountered executing grains.setval: 'bool' object is not iterable. See debug log for more info. Possibly a missing arguments issue: ArgSpec(args=['key', 'val', 'destructive'], varargs=None, keywords=None, defaults=(False,))
The command is: salt 'nginx*' grains.setval role webserver
— Reply to this email directly or view it on GitHub.
Update--fresh DO install, 2014.1.5 master and minion, salt 'cro*' grains.setval role webserver, returns the expected
cro-201415:
role: webserver
Still looking for the right sequence to duplicate Mike's error.
Mike, did you run this more than once and did it work on subsequent attempts?
On Thu, Jul 17, 2014 at 4:01 PM, C. R. Oldham [email protected] wrote:
Update--fresh DO install, 2014.1.5 master and minion, salt 'cro*' grains.setval role webserver, returns the expected
cro-201415: role: webserver
Still looking for the right sequence to duplicate Mike's error.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/13544#issuecomment-49372674.
ping @mike-ainsworth
yes and no. I updated to 2014.1.7 and all works as expected again. Not sure what cause was, but this probably isn’t worth burning any cycles on.
On Jul 17, 2014, at 4:09 PM, Mike Place [email protected] wrote:
Mike, did you run this more than once and did it work on subsequent attempts?
On Thu, Jul 17, 2014 at 4:01 PM, C. R. Oldham [email protected] wrote:
Update--fresh DO install, 2014.1.5 master and minion, salt 'cro*' grains.setval role webserver, returns the expected
cro-201415: role: webserver
Still looking for the right sequence to duplicate Mike's error.
— Reply to this email directly or view it on GitHub https://github.com/saltstack/salt/issues/13544#issuecomment-49372674.
— Reply to this email directly or view it on GitHub.
Keep us posted if it pops up again, @mike-ainsworth. For now, I guess we'll close this one.