Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minion fails to return (can't serialize) #5055

Closed
ahammond opened this issue May 16, 2013 · 12 comments
Closed

minion fails to return (can't serialize) #5055

ahammond opened this issue May 16, 2013 · 12 comments
Assignees
Milestone

Comments

@ahammond
Copy link
Contributor

While running https://github.com/SmartReceipt/salt_hosts
I get Minion did not return. Checking /var/log/salt/minion on the minion reveals the following.

2013-05-16 17:56:11,935 [salt.state       ][INFO    ] No changes made for zookeeper03
2013-05-16 17:56:11,936 [salt.state       ][INFO    ] Executing state stateconf.set for _slsmod_hosts
2013-05-16 17:56:11,936 [salt.state       ][INFO    ] No changes made for _slsmod_hosts
2013-05-16 17:56:11,937 [salt.minion      ][WARNING ] Missing arguments executing "state.sls": ArgSpec(args=['mods', 'env', 'test', 'exclude'], varargs=None, keywords='kwargs', defaults=('base', None, None))
2013-05-16 17:56:11,937 [salt.minion      ][DEBUG   ] "Missing args" caused by exc: can't serialize <module 'hosts' from '/var/cache/salt/minion/files/base/hosts/init.sls'>
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/salt/minion.py", line 428, in _thread_return
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/salt/modules/state.py", line 323, in sls
    serial.dump(high, fp_)
  File "/usr/lib/pymodules/python2.7/salt/payload.py", line 115, in dump
    fn_.write(self.dumps(msg))
  File "/usr/lib/pymodules/python2.7/salt/payload.py", line 109, in dumps
    return msgpack.dumps(msg)
  File "_msgpack.pyx", line 169, in msgpack._msgpack.packb (msgpack/_msgpack.c:2384)
  File "_msgpack.pyx", line 153, in msgpack._msgpack.Packer.pack (msgpack/_msgpack.c:2020)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 142, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1862)
  File "_msgpack.pyx", line 136, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1761)
  File "_msgpack.pyx", line 148, in msgpack._msgpack.Packer._pack (msgpack/_msgpack.c:1956)
TypeError: can't serialize <module 'hosts' from '/var/cache/salt/minion/files/base/hosts/init.sls'>
2013-05-16 17:56:11,940 [salt.minion      ][INFO    ] Returning information for job: 20130516175605043663
@thatch45
Copy link
Member

This is a known issue that we have been working on, @s0undt3ch has been on it

@s0undt3ch
Copy link
Member

Hmm, the issue I was after, and I need to assign ticket's to me, it's getting harder to keep track ;), was regarding OrderedDict. Serialize function issues was brought up by @UtahDave and fixed by you @thatch45, I think ;)

Anyway, can that init.sls be public @ahammond, or can we get an example that triggers this?

@ghost ghost assigned s0undt3ch May 16, 2013
@s0undt3ch
Copy link
Member

Ah, hosts, #4570 ;)

@s0undt3ch
Copy link
Member

Dam, you also provided the example right on the initial comment...

@s0undt3ch
Copy link
Member

And it has too many things tailored to your needs, ie, non generic, which is making it really hard just to get the template to compile.
By the way:

from salt.utils.socket_util import IPv4Address

and not:

from salt.util.socket_util import IPv4Address

@s0undt3ch
Copy link
Member

Ok, this is a PyDSL issue, @kjkuan, can you take a look please?

@ahammond
Copy link
Contributor Author

@s0undt3ch fixed the import bug you mentioned (thanks!) and added a README for the state which might help readability.

@thatch45
Copy link
Member

I was looking in the wrong place, I found this issue, I will have it taken care of shortly

thatch45 added a commit that referenced this issue May 19, 2013
thatch45 added a commit that referenced this issue May 22, 2013
thatch45 added a commit that referenced this issue May 22, 2013
@ahammond
Copy link
Contributor Author

Do I need to upgrade my minions to pick up this fix?

@basepi
Copy link
Contributor

basepi commented May 28, 2013

I think so, but not until we release 0.15.2 (probably tomorrow)

@ahammond
Copy link
Contributor Author

Yes, I upgraded a minion to test and it works perfectly. I'm super looking forward to getting 0.15.2!!! 😄

@basepi
Copy link
Contributor

basepi commented May 28, 2013

Yes, we're looking forward to it as well, I think 0.15.2 will be one of our stablest releases yet. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants