teepark / greenhouse

non-blocking IO with coroutines to mimic blocking IO with threads
BSD 3-Clause "New" or "Revised" License
36 stars 5 forks source link

Patching on Linux (RHEL6) not working? #10

Closed dsully closed 12 years ago

dsully commented 12 years ago

Good thing I started testing where I need to run as well:

When running on RHEL6, I see a couple of weird things:

$ process-deployment-queue -n -f esv4
[MainThread     ] [INFO] 2012-09-10 08:50:15,773 - Initializing v1.5.1 ...
[MainThread     ] [INFO] 2012-09-10 08:50:15,773 - Initializing DeploymentSessionManager..
[MainThread     ] [INFO] 2012-09-10 08:50:15,774 - Setting current state to: available
[Dummy-4        ] [INFO] 2012-09-10 08:50:15,842 - Looking for requests on the queue..
[MainThread     ] [INFO] 2012-09-10 08:51:09,574 - 200 GET /status (172.16.164.121) 0.78ms
[Dummy-6        ] [INFO] 2012-09-10 08:51:09,821 - Got a deploy-war request for agent-war/0.0.2000-RC1.19457 from the queue from dsully
[Dummy-10       ] [INFO] 2012-09-10 08:51:09,821 - Will process 1 request
[Dummy-12       ] [INFO] 2012-09-10 08:51:09,821 - Looking for requests on the queue..
[Dummy-15       ] [INFO] 2012-09-10 08:51:09,822 - Initializing ControlDeploymentManager v1.5.1
[Dummy-77       ] [INFO] 2012-09-10 08:51:09,837 - Validating requests..
[Dummy-111      ] [INFO] 2012-09-10 08:51:10,248 - Expanding TopologyModel: 0.21 seconds to execute.
[Dummy-128      ] [INFO] 2012-09-10 08:51:10,258 - Validating DeploymentRequest(s) against CRT..
[Dummy-131      ] [INFO] 2012-09-10 08:51:10,258 - Finished CRT validation.
[Dummy-134      ] [INFO] 2012-09-10 08:51:10,258 - Starting Topology validations..
[Dummy-167      ] [INFO] 2012-09-10 08:51:10,377 - Topology validations: 0.12 seconds to execute.
[Dummy-170      ] [INFO] 2012-09-10 08:51:10,377 - Deployment starting for CORP-ESV4 with 1 request.
[Dummy-173      ] [INFO] 2012-09-10 08:51:10,377 - cfg2 update & publish: 0.00 seconds to execute.
[Dummy-176      ] [INFO] 2012-09-10 08:51:10,378 - Checking out Topology files from Subversion...
Exception AssertionError: AssertionError() in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored

I would expect to be seeing 'GreenThread' instead of 'Dummy-N', as on my OS X box.

And the assertion error only happens on Linux. Additionally, the Tornado event loop doesn't seem to be working, I'm not getting any output on the client-side.

If I stash my greenhouse related changes, everything works fine.

Thanks

teepark commented 12 years ago

I believe you are using greenhouse.scheduler functions and greenhouse.pool.OneWayPool?

A patched threading.current_thread will always give you Dummy-N threads unless you actually create greenhouse.util.Threads, either directly or through the patched threading module.

dsully commented 12 years ago

Yes, greenhouse.scheduler and greenhouse.pool.Pool. The gist you pointed me at here: https://gist.github.com/3702310

How might that be used / integrated.. sorry it's not obvious.

Of course, a minor issue compared to the lack of output, which we're working through.

Thanks

dsully commented 12 years ago

Ok, output issue was my bug. I'll open a ticket regarding the threading AssertionError.