Please cherry pick to 4.1, it allows agent setup to complete properly when host is added. This might actually have something to do with all of the 'no private.network.device in agent.properties' issues popping up from the testers.
commit e08281838a428a26f1993519de96fc45a26c0920 Author: Marcus Sorensen <mar...@betterservers.com> Date: Fri Mar 1 19:26:38 2013 -0700 Summary: Add EOF to agent.properties for proper parsing Detail: lack of newline at end of file was keeping cloudstack-setup-agent from properly editing/creating new config. BUG-ID: CLOUDSTACK-1487 Signed-off-by: Marcus Sorensen <mar...@betterservers.com> 1362191198 -0700