Issues/24 and other fixes#25
Conversation
|
@rafaduran I was wondering if you could take a look at this please? |
|
@jantman I'm sorry but I haven't got any notification on this and I've just saw it, I wouldn't had time to look at it anyway... However, next week I will be plenty of time, so I will look on this then; hopefully sooner if I can. |
|
@rafaduran Ok thanks. Next week is fine... I'm pretty busy for the next week or so, and we're coming up on the US holiday season, so I probably won't be doing a lot of work with it until the beginning of the new year. I just wanted to bring your attention to it... I'm going to be resuming work with this in a few weeks. |
|
After not working on this for a while I've got a few issues with me test environment I needed to fix before looking at this, so I couldn't start looking at this until now. |
|
I'm still getting issues with integration tests, specially with SSL security provider; I couldn't find the problem yet... |
|
@rafaduran are you referring to the Travis job (linked here) or something else? I might be able to spot it if I look through the output... |
|
@jantman I'm having two different kind of issues:
Latter issue I think may be related to the use threading.Condition in the listener, leading in some way to a deadlock. In ntteurope/kombu-stomp I've also had to solve a similar problem, using a generator in that case, so I considering changing how the listener works (I think the generator is a much better solution than threading.Condition). However, I'm just guessing... travis-ci will be fine (hopefully) when this is solved. |
|
@rafaduran this branch seems to work fine for me, except for the ruby sym ":"s - on my branch I see result dicts returned with keys "body", "hash", "senderagent", etc. but on yours I see ":body", ":hash", ":senderagent", etc. - that's a bit unclean, but it works, and I can work with it, so I'd say it's good for me. I haven't been using the integration tests, as they don't seem to accurately reflect my environment; I've been running directly against my Puppet-based mco instance. |
|
@jantman you see the keys with leading colon ( :body, :hash, ...) because of my last change. This is required because depending on Puppet and/or Ruby versions (not really sure which one), Ruby symbols can be serialized as ":symbol" or "!ruby/sym symbol" and since PyYAML treats the former as an string, the latter must be translated into string too for compatibility reasons. I think this is ready now, so I will check do some final checks (test coverage, documentation,..) and I will merge and release as soon as I can. |
|
@rafaduran ok, thanks. Personally I think it would be nice if pymco stripped that out before returning results to the user (i.e. both ":symbol" and "!ruby/sym symbol" are returned as "symbol") but I supposed that could get confusing for the user to debug... |
|
@jantman I did one last change (hopefully) before merging and it would be great if you can re-test it, could you please pull from my branch and test it again? It's mostly minor changes but I'm also using Python ssl PEM to DER functionality; if it works fine, I'd rather use it, thought I have no integration tests for that yet. |
|
@rafaduran Ok, I'm running that at 5078dd9 ... I don't know why I didn't remember this before, but... I tried this before as well, and spent quite a while on it, before I decided to use PyCrypto. This does not work for me: I'd tried this exact same thing in jantman@40135e9 and found that, unfortunately, There's also one other remaining issue from my point of view, the requirements - pycrypto and PyYAML aren't installed by pip, so scripts fail and then I have to install them manually. Ideally I think they should just be included in the requirements. I think I remember you having some concerns about that... maybe this is a good place to use setuptools extras? I'd be happy to cut another PR with an example of how to do that if you're not familiar with it. |
|
@jantman ok, I will remove last commit and I will use your implementation for PEM to DER conversion. About pycrypto and PyYAML in requirements, pycrypto is already in |
This is the squashed commit for pull request #25 and includes: * fixes #20 by adding a bunch of logging * fixes #22 * fixes #24 by making sure that messages are properly base64 decoded when received * fixes another issue by converting PEM server certificates to the required DER format * fixes an issue where Config.getboolean doesn't recognize 'yes' as a True value * if the Listener thread gets an exception decoding the message, catch and log it. Otherwise, the python process locks up and needs to be manually killed (issue with uncaught exceptions in threads) * added some TODO for related things still to be done
|
This is now merged. |
This rolls together a number of fixes I'm working on:
With all of this work, the 'simple_action.py' example now works in my environment.