salt icon indicating copy to clipboard operation
salt copied to clipboard

grains.setval returned index error after upgrade from 2014.1.4 to 2014.1.5

Open mike-ainsworth opened this issue 12 years ago • 12 comments

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-ainsworth avatar Jun 18 '14 19:06 mike-ainsworth

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,))

cro avatar Jun 18 '14 22:06 cro

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.

mike-ainsworth avatar Jun 18 '14 22:06 mike-ainsworth

That's the result of 'salt * grains.setval role', BTW.

cro avatar Jun 18 '14 22:06 cro

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.

mike-ainsworth avatar Jun 19 '14 00:06 mike-ainsworth

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

mike-ainsworth avatar Jul 16 '14 17:07 mike-ainsworth

I will spin up a new Ubuntu 14.04 machine and see what I get. Thanks for pasting the actual error!

cro avatar Jul 16 '14 18:07 cro

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.

cro avatar Jul 16 '14 22:07 cro

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.

cro avatar Jul 17 '14 22:07 cro

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.

cachedout avatar Jul 17 '14 22:07 cachedout

ping @mike-ainsworth

cro avatar Jul 17 '14 22:07 cro

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.

mike-ainsworth avatar Jul 17 '14 22:07 mike-ainsworth

Keep us posted if it pops up again, @mike-ainsworth. For now, I guess we'll close this one.

basepi avatar Jul 18 '14 16:07 basepi