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 (ssh): chmod'ing right path #1796

Merged
merged 2 commits into from
May 5, 2015

Conversation

lamdor
Copy link
Contributor

@lamdor lamdor commented May 4, 2015

We pulled and built from terraform master today and noticed that a
refactoring introduced by #1483 broke our remote-exec
provisioner. Looking into it more it looks like it wasn't chmod'ing the
correct path. So we fixed that and added some additional checking on that.

@@ -230,7 +230,7 @@ func (c *Communicator) UploadScript(path string, input io.Reader) error {
}

cmd := &remote.Cmd{
Command: fmt.Sprintf("chmod 0777 %s", c.connInfo.ScriptPath),
Command: fmt.Sprintf("chmod 0777 %s", path),
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

That seems to be more correct... waiting for response.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I just glanced at the code again, script actually holds the content of the script. Woops, seems fine as is. (only reason our build is working is because shebang is parsed as comment and the error checking is just wrong after that.

An acceptance test would be great to have here to avoid brainfarts like mine.

@spyrospph
Copy link

thx for fix

@svanharmelen
Copy link
Contributor

@rubbish good catch! Thanks!

svanharmelen pushed a commit that referenced this pull request May 5, 2015
remote-exec (ssh): chmod'ing right path
@svanharmelen svanharmelen merged commit c2695ba into hashicorp:master May 5, 2015
mitchellh added a commit that referenced this pull request May 5, 2015
Fixing a small vet warning introduced by PR #1796
catsby added a commit that referenced this pull request May 5, 2015
* master: (113 commits)
  update cHANGELOG
  update cHANGELOG
  update CHANGELOG
  website: network interface for EIP
  Update CHANGELOG.md
  terraform: provisionedby prefixed
  Added the exit code as well...
  terraform: flattenable graphNodeMissingProvisioner
  Fixing a small vet warning introduced by PR #1796
  terraform: run prune destroy on validate
  Added `SharedCredentialsProvider` and `EC2RoleProvider` as well...
  Fixing PR #1804
  providers/aws: chain credentials
  Update CHANGELOG.md
  Add docs for various iam_* resources.
  Add acceptance tests
  Implement AWS IAM resources
  Implement a hash function for string sets
  provider/aws: Shorting retry timeout for Subnets to 2 minutes, from 5
  provider/aws: Shorting retry timeout for Security Groups to 2 minutes, from 5
  ...
@ghost
Copy link

ghost commented May 3, 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 May 3, 2020
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.

5 participants