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

Switch resolver to threaded variant #23164

Merged
merged 2 commits into from
May 19, 2015

Conversation

vdcow
Copy link

@vdcow vdcow commented Apr 29, 2015

Hi, guys.

We noticed that your developers tried to fix blocking DNS resolving in Tornado TCP client

9c68051

But actually this commit doesn't fix issue. Fix configures tornado.netutil.ExecutorResolver for using as default DNS Resolver. But it is useful only when you provide own 'executor=' param to constructor. TCP Client creates resolver without additional params so ExecutorResolver uses dummy_executor (DummyExecutor) (see http://tornado.readthedocs.org/en/latest/_modules/tornado/concurrent.html) that simply calls function in synchronous blocking mode. It means that your Salt application still hangs in DNS resolving call and will be unresponsive to all events until resolving is finished.

Also there is a strange comment inside commit

Configure the resolver to use a non-blocking one
Not Threaded since we need to work on python2

ThreadedResolver works fine with python2. You only need to add dependency on 'futures' package https://pypi.python.org/pypi/futures - it is backport of concurrent.futures package from python3.

@vdcow
Copy link
Author

vdcow commented Apr 29, 2015

I created additional pull request to jenkins-ci-states

vmware-archive/jenkins-ci-states#2

It is required to test this pull request since new dependency (futures) is added.

Also should I update doc/ files?

@jfindlay
Copy link
Contributor

@vladimir-didenko, documentation and test updates are very welcome, but not required. It would be great if you will also update the failing tests according to your code changes, thanks.

@jfindlay
Copy link
Contributor

@cachedout, @jacksontj

@jacksontj
Copy link
Contributor

Thanks for the fix! As mentioned in my previous PR (I think?) this actually shouldn't be an issue for us because salt-minion does the DNS resolution before getting to the channels (https://github.com/saltstack/salt/blob/develop/salt/minion.py#L114), but this will be useful once we finally move that logic into the channels (where it belongs).

@DmitryKuzmenko
Copy link
Contributor

@jfindlay, as @vladimir-didenko mentioned before it's necessary to merge jenkins-ci-states#2 first to make jenkins to handle dependencies correctly.
@jacksontj, thank you for the details.

@jfindlay
Copy link
Contributor

I could be confused, but our production jenkins currently runs states from https://github.com/saltstack/salt-jenkins.git, not https://github.com/saltstack/jenkins-ci-states.git, so a pull request against salt needing updates to the testing environment states will have to make changes to salt-jenkins so that the tests run by github will pass.

@thatch45
Copy link
Contributor

Once we figure out where this dep needs to go this can be merged!

@DmitryKuzmenko
Copy link
Contributor

@jfindlay @thatch45 I've added futures dependecy to salt-jenkins project for production builds.
saltstack/salt-ci-images#96

@s0undt3ch
Copy link
Collaborator

Jenkins-ci-states is the next, not yet ready, Jenkins state tree. Sorry for the confusion.

@DmitryKuzmenko
Copy link
Contributor

Anyway, PRs for both are ready. Just reject those that aren't needed.

@s0undt3ch
Copy link
Collaborator

No, no need to reject 😄, both will be needed...

@DmitryKuzmenko
Copy link
Contributor

Glad to hear it! =) Thank you!

@jfindlay
Copy link
Contributor

saltstack/salt-ci-images#96 has been merged.

@jfindlay
Copy link
Contributor

All that remains here is some unrelated lint.

thatch45 added a commit that referenced this pull request May 19, 2015
@thatch45 thatch45 merged commit cffa82f into saltstack:develop May 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants