The issue here is that "startLocalizer" not only handles localizing resources, but also mkdirs/chowns the appCachedir, log dirs, etc. So we need to have some way of making sure that stuff happens once (preferably exactly once), in addition to being lazy about launching the actual localizer subprocess. Does that make any sense?
Sure. We went back and forth on this, but the operations saved by adding a fast path for init are pretty minor (one hopes) given the cost of a container. Asserting every precondition for container launch on every container launch is often redundant (particularly for MR), but making it idempotent seemed cleaner than adding all the logic to avoid it. That section also has a lot of rough patches; it's a minor crime for that neighborhood.
We definitely need to move the creation of app-dirs etc out of resource-localization.
It's a pretty inexpensive operation and pushing the dir creation into the resource localization puts all that into a single fork for the LCE (required root privs to create the userdir). But yea, it's usually waste.