-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Conversation
@@ -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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/PeoplePerHour/terraform/pull/32/files (path + script) ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
thx for fix |
@rubbish good catch! Thanks! |
remote-exec (ssh): chmod'ing right path
Fixing a small vet warning introduced by PR #1796
* 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 ...
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. |
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.