In writing some full buildout tests I'm running into some intermittent issues. If I register a template after zone is created, but before secondary storage vm starts, the template is pretty much guaranteed to be deleted. If I watch for the SSVM to come up, and its agent to start, then there's maybe a 50% chance that the template will be deleted, even if it successfully downloads. The odds may go down if I wait awhile after the SSVM comes up.
I noticed this ticket, but it talks about template from snapshot. I'm not sure if it's the same, but the root cause may be. I notice there's no fix release set. If it only ever happens when the zone is first being created, then it's not such a big deal, but if it happens whenever the SSVM is stopped or just started (or randomly as the issue implies), then it should be a blocker. If any template I register will get successfully downloaded and then deleted if my SSVM ever happens to be down, that's not good. https://issues.apache.org/jira/browse/CLOUDSTACK-3305