Safeguard against stale ProcessManager metadata re-use.

Review Request #3047 - Created Oct. 27, 2015 and submitted

Information
Kris Wilson
pants
kwlzn/stale_metadata
2414, 2462
fee8a87...
Reviewers
pants-reviews
nhoward_tw, zundel
  • Add a new pants.util.dirutil.rm_rf helper to safely remove both files and/or directories.
  • Improve ProcessManager.purge_metadata().
  • Add purge_metadata() calls to daemonization methods to resolve race.
  • Test maintenance.

Fixes #2414

https://travis-ci.org/pantsbuild/pants/builds/87760402


before:

[illuminati pants (master)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch master
INFO] Launched server with pid 55478 at http://localhost:57469
[illuminati pants (master)]$ kill -9 55478
[illuminati pants (master)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch master
INFO] Launched server with pid 55478 at http://localhost:57469
[illuminati pants (master)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch master
INFO] Server already running with pid 55546 at http://localhost:57470
[illuminati pants (master)]$

after:

[illuminati pants (kwlzn/stale_metadata)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch kwlzn/stale_metadata
INFO] Launched server with pid 55053 at http://localhost:57390
[illuminati pants (kwlzn/stale_metadata)]$ kill -9 55053
[illuminati pants (kwlzn/stale_metadata)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch kwlzn/stale_metadata
INFO] Launched server with pid 55116 at http://localhost:57392
[illuminati pants (kwlzn/stale_metadata)]$ PANTS_DEV=1 ./pants server
INFO] Detected git repository at /Users/kwilson/dev/pants on branch kwlzn/stale_metadata
INFO] Server already running with pid 55116 at http://localhost:57392

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Kris Wilson
Kris Wilson
Nick Howard (Twitter)
Kris Wilson
Kris Wilson
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Nick! submitted @ 61624077fad6258f8500c7a8d41f1cd79eeb98ba

Loading...