add a 5 seconds timeout to provisioner hook

This commit is contained in:
Adrien Delorme 2019-03-29 12:01:52 +01:00
parent a81abd297b
commit f7cd2b9334
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ func (h *ProvisionHook) Run(ctx context.Context, name string, ui Ui, comm Commun
for _, p := range h.Provisioners {
ts := CheckpointReporter.AddSpan(p.TypeName, "provisioner", p.Config)
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
err := p.Provisioner.Provision(ctx, ui, comm)