Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

server/terraform: create the executor next to the installer #442

Merged
merged 1 commit into from
May 2, 2017
Merged

server/terraform: create the executor next to the installer #442

merged 1 commit into from
May 2, 2017

Conversation

Quentin-M
Copy link
Contributor

@Quentin-M Quentin-M commented May 2, 2017

Rather than tmp, so users always have the assets somewhere,
regardless of whether they download them or not, and
regardless of potential system reboots.

We should probably have a flag / env variable that controls that,
but we have little time right now. Must switch to doing self-hosted etcd
cleanup for the release now.

Fixes #446

@coreosbot
Copy link

Can one of the admins verify this patch?

@@ -135,7 +147,7 @@ func TestExecutorMissingVar(t *testing.T) {
// Wait for its termination.
select {
case <-done:
case <-time.After(1 * time.Second):
case <-time.After(10 * time.Second):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, but why was this timeout increased?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jenkins executors are waaaaayyy to slooowwww sometimes and fails to execute TerraForm within a second, which usually takes about 100ms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actually on master already, we made the change at the same time with Dan. Just need to rebase for it to be gone.

@Quentin-M
Copy link
Contributor Author

Quentin-M commented May 2, 2017

I am a little afraid with this change because calling apply again with the same cluster name but different variables will overwrite these variables and try to reconcile from the existing state.. it might wipe an existing cluster. Should we still add a random number after the cluster name?

@Quentin-M
Copy link
Contributor Author

Quentin-M commented May 2, 2017

Just tested.
Worked just fine (apply, destroy).
TerraForm runs in <installer-binary-folder>/clusters/<cluster-name> now.

@ggreer
Copy link
Contributor

ggreer commented May 2, 2017

Tested on mac & it works. 👍

@ggreer
Copy link
Contributor

ggreer commented May 2, 2017

Ideally I'd like clustername + datetime as the directory name. eg: ggreer-test_2017-05-02_184520 for a cluster named "ggreer-test" booted today at 18:45:20. That way we avoid conflicts when a user picks the same name for a cluster.

Rather than tmp, so users always have the assets somewhere,
regardless of whether they download them or not, and
gardless of potential system reboots.
@ggreer
Copy link
Contributor

ggreer commented May 2, 2017

Just FYI, user experience with a conflicting cluster is not ideal:

screen shot 2017-05-02 at 13 23 57

screen shot 2017-05-02 at 13 25 38

screen shot 2017-05-02 at 13 35 21

I created a cluster named ggtest, then started over and created another one with the same name but different network settings.

The old behavior (without conflicting dir names) was to error-out early in the apply phase, and force the user to clean up their conflicting bits of infrastructure.

@Quentin-M
Copy link
Contributor Author

Quentin-M commented May 2, 2017

The timeout does not seem so related but yeah, TerraForm is trying to reconcile, and thus is deleting the networks to re-create them. Having separate folders will just make TerraForm fail in this case because things like entries in the public Route53 zone will already exist. Users will have to recycle manually the previous one.

Just changed. Hopefully this will not cause too much trouble to users when they retry on failed deployments.

bin/darwin/clusters/qmachu_2017-05-02_13-35-40/

@Quentin-M
Copy link
Contributor Author

Quentin-M commented May 2, 2017

Tests passed. Re-tested manually too.

@ggreer
Copy link
Contributor

ggreer commented May 2, 2017

Yep. New directory name works for me too.

@Quentin-M Quentin-M merged commit 4e1660b into coreos:master May 2, 2017
@Quentin-M Quentin-M deleted the assets_dir branch May 2, 2017 21:00
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 this pull request may close these issues.

3 participants