Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Don't wait for wing to converge when running apply with --infrastructure only #475

Closed
charlieegan3 opened this issue Aug 30, 2018 · 1 comment · Fixed by #493
Closed

Comments

@charlieegan3
Copy link
Contributor

What happened:
I ran tarmak clusters apply --infrastructure-only on a cluster where wing was still running, my apply command waited for wing to complete.

What you expected to happen:
I expected to not have to wait for wing. I'd viewed this just as a kind of terraform only flag and expected it to complete when terraform was done.

How to reproduce it (as minimally and precisely as possible):
Use the --infrastructure-only flag on an apply operation while wing is still running.

Environment:

  • Kubernetes version (use kubectl version): 1.10
  • Tarmak: 0.5 alpha 2

In pkg/tarmak/terraform.go we have some logic that looks a bit like this:

func (t *Tarmak) CmdTerraformApply(args []string, ctx context.Context) error {
...
	t.cluster.Log().Info("running apply")
	// run terraform apply always, do not run it when in configuration only mode
	if !t.flags.Cluster.Apply.ConfigurationOnly {
		err := t.terraform.Apply(t.Cluster())
	}

	// upload tar gz only if terraform hasn't uploaded it yet
	if t.flags.Cluster.Apply.ConfigurationOnly {
		err := t.Cluster().UploadConfiguration()
	}

	// reapply config expect if we are in infrastructure only
	if !t.flags.Cluster.Apply.InfrastructureOnly {
		err := t.Cluster().ReapplyConfiguration()
	}

	// wait for convergance in every mode  <----------- Are we sure we want this?
	err := t.Cluster().WaitForConvergance()
}

I propose that when doing an InfrastructureOnly apply, we should skip waiting for convergence. Perhaps there's something I'm missing. What do people think?

@dippynark
Copy link
Contributor

Agreed, have been confused by that behaviour in the past

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants