Provisioner rarely exits gracefully: could it poll instead?



Among some of the provisioning issues we are encountering, one of them is imo due to the way the provisioner works.
After the archive has been pushed to the server, it waits for the request to gracefully terminates, which can take a long time when the server is under heavy load (or even a very long time, or even a non finite time :-).

In those conditions, the provisioner almost never exits gracefully and remains stuck on the following message:

[tenant/tag] spec:{"command":"tag","tenant":"tenant","tag":"tag","package":"my-app","testData":false,"filter":null,"groups":null,"verbose":true}
[c3/c3] URL:

In this case I usually open a console, select another tag, then check the deployState and meta.timestamp in Tag.fetch(). This is time consuming and inefficient as I have to poll for the results.

I could script it but it would make more sense for the provisioner itself to be updated and to replace the endless query to api/1/Provisioner by a poll on Tag.get("tag") to check for an update and display the deployState when finished. Even if it wouldn’t solve the core provisioning issue, it would at least soften the friction for the developers.

What do you think?