puppetlabs/marionette-collective — pull request #254 by richardc (2014-10-21 09:46:02+00:00)
Title: MCO-489 Avoid clashing with puppets monkeypatch

When loading the puppet agent we load puppet library into the ruby intepreter,
which comes with it's own set of monkeypatches one of which redefines the
initialize of OpenSSL::SSL::SSLContext using the same private method,
__original_initialize.

This causes deep recursion if MCollective needs to reestablish the connection
to the middleware after loading the puppet agent:

error 2014/10/21 10:16:09: rabbitmq.rb:45:in `on_ssl_connectfail' SSL session creation with stomp+ssl://mcollective@127.0.0.1:61614 failed: stack level too deep

With this patch we change the name of the private method created by our
monkeypatch to __mcollective_original_initialize which avoids the clash/recursion.