cloudfoundry/vcap — pull request #190 by lukebakken (2012-02-27 17:35:15+00:00)
Title: Issue #189 workaround

...h realdirpath failing due to missing file.

https://github.com/cloudfoundry/vcap/issues/189

This is just a workaround for an issue we've seen in a couple of our cloud foundry environments. I don't know enough about the interaction between EM and ruby fibers or what else is involved to definitively say, but it appears that the files haven't been unzipped by the time that File.realdirpath() is called within resolve_path and you see errors like this in the CC log file:

[2012-02-27 09:24:09] cc - 22511 8376 daf8 ERROR -- resolve_path failed working_dir: '/tmp/d20120227-22511-1y7exn9', tainted_path: 'Themes/TheThemeMachine/Views/BadgeOfHonor.cshtml'
[2012-02-27 09:24:09] cc exception 22511 8376 daf8 ERROR -- Errno::ENOENT("No such file or directory - /tmp/d20120227-22511-1y7exn9/Themes/TheThemeMachine/Views", [/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:185:in `realdirpath',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:185:in `resolve_path',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:205:in `block (3 levels) in synchronize_pool_with',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:204:in `each',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:204:in `block (2 levels) in synchronize_pool_with',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:80:in `call',/home/cfadmin/cloudfoundry/vcap/cloud_controller/app/models/app_package.rb:80:in `block in blocking_defer',/home/cfadmin/.rvm/gems/ruby-1.9.2-p180/gems/eventmachine-0.12.11.cloudfoundry.3/lib/eventmachine.rb:1060:in `call',/home/cfadmin/.rvm/gems/ruby-1.9.2-p180/gems/eventmachine-0.12.11.cloudfoundry.3/lib/eventmachine.rb:1060:in `block in spawn_threadpool'])