Add retry for provisioning in api-lib