Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote-exec stops executing after running sudo systemctl start #5737

Closed
paulczar opened this issue Mar 20, 2016 · 3 comments · Fixed by #5751
Closed

remote-exec stops executing after running sudo systemctl start #5737

paulczar opened this issue Mar 20, 2016 · 3 comments · Fixed by #5751

Comments

@paulczar
Copy link

This applys to the current release v0.6.13... v0.6.8 works as expected.

This means only the first service that I ask for actually starts in the current version, whereas the earlier version it all starts up as expected.

Code Snippet

The following block in remote-exec:

    provisioner "remote-exec" {
        inline = [
            "echo '==> Services'",
            "echo '----> starting registrator'",
            "sudo systemctl start registrator.service",
            "echo '----> starting swarm-agent'",
            "sudo systemctl start swarm-agent.service",
            "echo '----> starting swarm-manager'",
            "sudo systemctl start swarm-manager.service",
        ]
    }

Run output - v0.6.13

null_resource.install_swarm.0 (remote-exec): ==> Services
null_resource.install_swarm.0 (remote-exec): ----> starting registrator
null_resource.install_swarm.2 (remote-exec): ==> Services
null_resource.install_swarm.2 (remote-exec): ----> starting registrator
null_resource.install_swarm.1 (remote-exec): ==> Services
null_resource.install_swarm.1 (remote-exec): ----> starting registrator
null_resource.install_swarm.2: Creation complete
null_resource.install_swarm.0: Creation complete
null_resource.install_swarm.1: Creation complete

Run output - v0.6.8

null_resource.install_swarm.1 (remote-exec): ==> Services
null_resource.install_swarm.1 (remote-exec): ----> starting registrator
null_resource.install_swarm.2 (remote-exec): ==> Services
null_resource.install_swarm.2 (remote-exec): ----> starting registrator
null_resource.install_swarm.0 (remote-exec): ==> Services
null_resource.install_swarm.0 (remote-exec): ----> starting registrator
null_resource.install_swarm.1 (remote-exec): ----> starting swarm-agent
null_resource.install_swarm.0 (remote-exec): ----> starting swarm-agent
null_resource.install_swarm.2 (remote-exec): ----> starting swarm-agent
null_resource.install_swarm.1 (remote-exec): ----> starting swarm-manager
null_resource.install_swarm.0 (remote-exec): ----> starting swarm-manager
null_resource.install_swarm.2 (remote-exec): ----> starting swarm-manager
null_resource.install_swarm.1: Creation complete
null_resource.install_swarm.2: Creation complete
null_resource.install_swarm.0: Creation complete
@byrnedo
Copy link

byrnedo commented Mar 21, 2016

Related to #5699

@phinze phinze self-assigned this Mar 21, 2016
phinze added a commit that referenced this issue Mar 21, 2016
The script cleanup step added in #5577 was positioned before the
`cmd.Wait()` call to ensure the command completes. This was causing
non-deterministic failures, especially for longer runnings scripts.

Fixes #5699
Fixes #5737
phinze added a commit that referenced this issue Mar 21, 2016
The script cleanup step added in #5577 was positioned before the
`cmd.Wait()` call to ensure the command completes. This was causing
non-deterministic failures, especially for longer running scripts.

Fixes #5699
Fixes #5737
phinze added a commit that referenced this issue Mar 21, 2016
The script cleanup step added in #5577 was positioned before the
`cmd.Wait()` call to ensure the command completes. This was causing
non-deterministic failures, especially for longer running scripts.

Fixes #5699
Fixes #5737
phinze added a commit that referenced this issue Mar 21, 2016
The script cleanup step added in #5577 was positioned before the
`cmd.Wait()` call to ensure the command completes. This was causing
non-deterministic failures, especially for longer running scripts.

Fixes #5699
Fixes #5737
phinze added a commit that referenced this issue Mar 21, 2016
The script cleanup step added in #5577 was positioned before the
`cmd.Wait()` call to ensure the command completes. This was causing
non-deterministic failures, especially for longer running scripts.

Fixes #5699
Fixes #5737
@phinze
Copy link
Contributor

phinze commented Mar 21, 2016

Hi @paulczar - thanks for the report and sorry for the trouble here! Looks like the attempt to clean up remote exec scripts in v0.6.13 had an unexpected race condition. Fixed on master and will be fixed in 0.6.14 to be released later today.

@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants