-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
2018.3 regression - unable to create Caller in a runner #46905
Comments
@dmurphy18 @rallytime @Ch3LL thoughts? |
We should be supported both the new 17.0 version and the older versions of pyzmq, so we need to get this fixed. @garethgreenaway Were you able to reproduce this? Looks like @golmaal is working off of the 2018.3 branch. @isbm was the one who updated the support for 17.0 somewhat recently in preparation for the 2018.3.0 release. @isbm Perhaps you know where the fix for this might be since you were in this code most recently. |
PyZMQ 15... OK, I have to look at this then. I will be anyway putting all that together for 2017.7 |
OverviewIt looks like we're also striking this bug that @golmaal reported (and note that we're also using a custom runner which makes use of salt.client.Caller). Traceback
Versions Report
|
Yuck... Sorry for this, guys. It was pretty heavily tested with 14 and then 17. Part of this because at SUSE we had 14 and then upgraded it to the latest in upcoming SLE 15 and Leap. And so I had naїve trust to ZMQ's claim it is different only after 16, but till 16 it is same as 13. But seems I have shouldn't trust that... Also strange that this popped up only now. No Beta testers around? If you are unable to wait, just upgrade your PyZMQ to 17 and libzmq (or upgrade to Leap over CentOS, then it will work flawlessly out of the box — Salt is default there now, hehe 😛 ). It has anyway quite dramatic bugfixes to ZMQ you want to have. Jokes aside, in the meanwhile I will try to fix this for you. |
Thanks @isbm! |
Some update: I cannot reproduce this anymore in import logging
import salt.client
import salt.config
from salt.client import Caller
__opts__ = salt.config.minion_config('/home/isbm/sandbox/salt/etc/minion')
__opts__['file_client'] = 'local'
def __virtual__():
return __virtualname__
def _get_logger():
'''
Get current logger.
'''
logger = logging.getLogger(__name__)
return logger
def foo():
Caller(mopts=__opts__)
_get_logger().info('%s pinged', __name__)
return True Call:
Is this problem is still relevant? |
@binocvlar BTW, the whole way of doing this sort of things in runner is wrong. You should not import modules directly, but use utils, as per documentation. |
Needless to say, there was couple of PRs regards to ZMQ from @DmitryKuzmenko and myself, so probably this was fixed in between. It just looks like totally irrelevant to the issue, because ZMQ registrar was touched indeed. And in some cases it probably was wrongly registering itself with the specific ZMQ version, and thus could not further process the I will try to look at other branches later. |
@isbm, when you write "the whole way of doing this sort of things in runner is wrong", are you saying that @golmaal's specific example is wrong? Or that ever using For context, what I've done is as follows:
Are you suggesting that instead of running the statefile via the runner, I instead run a custom utility module instead? I've read over the documentation for runners and utils, and can't see anything that seems to suggest that what I'm doing is in error. Can you please elaborate? |
@binocvlar well, I meant that you normally don't do |
As of the issue, do you still getting the problem? Since I cannot reproduce it anymore (unless my environment has something hidden I am missing and I am blind seeing it). |
@isbm - there is an
Additionally, I just sampled five runners from https://github.com/saltstack/salt/tree/develop/salt/runners , and they all contain As I mentioned earlier:
With regard to this question:
You mentioned earlier that something seems to have been fixed within the |
We import salt.client into runners all the time. https://github.com/saltstack/salt/blob/2017.7/salt/runners/salt.py#L39 The clients are not exposed through utils. |
@binocvlar we made some changes in after that package has been released, can you try using the 2018.3.1 branch and install from git to test and see if the new release is going to fix your issues? |
I have quite similar problem. I see a lot of errors like this:
Upgrading
I'm using 2018.3.3 with tcp transport protocol. |
I found another variation of this problem... and the workaround listed above doesn't seem to help. I have several runners that create caller clients. Here's a simple example:
After my recent upgrade to 2018.3.4, I made sure to have Runners which create caller clients work for me after pinning pyzmq when I run them via
Should this be considered a new issue? |
@golmaal Given the long passage of time and 2018.3.0 and Python world has moved to Python 3. Or if you are not interested in this issue anymore, please consider closing the issue. Thanks. |
@golmaal Closing this issue since no response to query about it. Please feel free to reopen with a reply to my question concerning Python 3 and the latest version of Salt if the problem still occurs. |
Description of Issue/Question
Runners which create salt.client.Caller throw exception listed below.
This stops us from upgrading to 2018.3 release.
Steps to Reproduce Issue
On a CentOS 7.4 minimally installed VM, do the following -
Make sure that following returns true -
Now create a test runner with the following -
cat /srv/_runners/test_runner.py
Running (after configuring runners etc.) the salt-run test_runner.ping returns the following exception -
If I manually update the pyzmq using pip to 17.0.0 version, this exception disappears.
Observation - By default repo.saltstack.com is supplying python-zmq version 15.3, should this be updated?
Versions Report
The text was updated successfully, but these errors were encountered: