{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/753","repository_url":"https://api.github.com/repos/aws/aws-sdk-go","labels_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/753/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/753/events","html_url":"https://github.com/aws/aws-sdk-go/issues/753","id":165270220,"number":753,"title":"'cannot find package \"github.com/aws/aws-sdk-go/private/signer/v4'","user":{"login":"mattpollard","id":1894408,"avatar_url":"https://avatars.githubusercontent.com/u/1894408?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpollard","html_url":"https://github.com/mattpollard","followers_url":"https://api.github.com/users/mattpollard/followers","following_url":"https://api.github.com/users/mattpollard/following{/other_user}","gists_url":"https://api.github.com/users/mattpollard/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpollard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpollard/subscriptions","organizations_url":"https://api.github.com/users/mattpollard/orgs","repos_url":"https://api.github.com/users/mattpollard/repos","events_url":"https://api.github.com/users/mattpollard/events{/privacy}","received_events_url":"https://api.github.com/users/mattpollard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-go/labels/Feedback%20Requested","name":"Feedback Requested","color":"d4c5f9"},{"url":"https://api.github.com/repos/aws/aws-sdk-go/labels/Question","name":"Question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"jasdel","id":961963,"avatar_url":"https://avatars.githubusercontent.com/u/961963?v=3","gravatar_id":"","url":"https://api.github.com/users/jasdel","html_url":"https://github.com/jasdel","followers_url":"https://api.github.com/users/jasdel/followers","following_url":"https://api.github.com/users/jasdel/following{/other_user}","gists_url":"https://api.github.com/users/jasdel/gists{/gist_id}","starred_url":"https://api.github.com/users/jasdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasdel/subscriptions","organizations_url":"https://api.github.com/users/jasdel/orgs","repos_url":"https://api.github.com/users/jasdel/repos","events_url":"https://api.github.com/users/jasdel/events{/privacy}","received_events_url":"https://api.github.com/users/jasdel/received_events","type":"User","site_admin":false},"assignees":[{"login":"jasdel","id":961963,"avatar_url":"https://avatars.githubusercontent.com/u/961963?v=3","gravatar_id":"","url":"https://api.github.com/users/jasdel","html_url":"https://github.com/jasdel","followers_url":"https://api.github.com/users/jasdel/followers","following_url":"https://api.github.com/users/jasdel/following{/other_user}","gists_url":"https://api.github.com/users/jasdel/gists{/gist_id}","starred_url":"https://api.github.com/users/jasdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasdel/subscriptions","organizations_url":"https://api.github.com/users/jasdel/orgs","repos_url":"https://api.github.com/users/jasdel/repos","events_url":"https://api.github.com/users/jasdel/events{/privacy}","received_events_url":"https://api.github.com/users/jasdel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-13T08:55:57Z","updated_at":"2016-07-14T21:10:43Z","closed_at":"2016-07-14T21:10:42Z","body":"I'm not totally certain that this is the right place to report this, but here goes.\r\n\r\nI'm an amateur at best with installing and managing Go packages and haven't written any Go myself, so there are bound to be misunderstandings that follow. Please don't hesitate to correct me or ask for further details and I'd be happy to try and provide them for you.\r\n\r\n## Some Background\r\n\r\nI have some server instances in OpsWorks, and they run Red Hat Enterprise Linux 7.2. As part of my setup runs, I install the `golang` package so that I can use [journald-cloudwatch-logs](https://github.com/saymedia/journald-cloudwatch-logs), which sends Journald events to CloudWatch Logs so that I can monitor them in a central place. (Currently, this tool is the only piece of software on my instances that depends on Go.)\r\n\r\nAll of the server instances have Go 1.4.2 installed.\r\n\r\nI install journald-cloudwatch-logs by setting `GOPATH` and running the following from my Go workspace, and this is also done during every setup run:\r\n\r\n    /usr/bin/go get -u github.com/saymedia/journald-cloudwatch-logs\r\n\r\nThis has worked without issue for a few months. I'm under the impression that doing a `go get` for a package that's already installed doesn't cause any problems and is an idempotent action. \r\n\r\n## The Problem\r\n\r\nAs of of a couple of months ago, every few Chef runs, the setup lifecycle event in OpsWorks (where, in my environment, all of the relevant Chef cookbooks for a stack and layer that configure a server instance for its job are executed) will fail. The logs point to an issue with aws-sdk-go. Here's the Chef resource block that's running:\r\n\r\n```ruby\r\nscript 'install_journald_agent' do\r\n  interpreter 'bash'\r\n  user 'root'\r\n  cwd go['workspace_path']\r\n  environment ({\r\n    'GOPATH' => go['workspace_path']\r\n  })\r\n  code <<-EOH\r\n    /usr/bin/go get -u github.com/saymedia/journald-cloudwatch-logs\r\n  EOH\r\n  action :run\r\nend\r\n```\r\n\r\nAnd here's the output from when it fails:\r\n\r\n```\r\npackage github.com/saymedia/journald-cloudwatch-logs\r\nimports github.com/aws/aws-sdk-go/aws\r\nimports github.com/aws/aws-sdk-go/aws/awserr\r\nimports github.com/aws/aws-sdk-go/aws/credentials\r\nimports github.com/go-ini/ini\r\nimports github.com/aws/aws-sdk-go/aws/awsutil\r\nimports github.com/jmespath/go-jmespath\r\nimports github.com/aws/aws-sdk-go/aws/client\r\nimports github.com/aws/aws-sdk-go/aws/client/metadata\r\nimports github.com/aws/aws-sdk-go/aws/request\r\nimports github.com/aws/aws-sdk-go/aws/corehandlers\r\nimports github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds\r\nimports github.com/aws/aws-sdk-go/aws/ec2metadata\r\nimports github.com/aws/aws-sdk-go/aws/defaults\r\nimports github.com/aws/aws-sdk-go/private/endpoints\r\nimports github.com/aws/aws-sdk-go/aws/session\r\nimports github.com/aws/aws-sdk-go/private/protocol\r\nimports github.com/aws/aws-sdk-go/private/protocol/json/jsonutil\r\nimports github.com/aws/aws-sdk-go/private/protocol/jsonrpc\r\nimports github.com/aws/aws-sdk-go/private/protocol/rest\r\nimports github.com/aws/aws-sdk-go/private/signer/v4\r\nimports github.com/aws/aws-sdk-go/private/signer/v4\r\nimports github.com/aws/aws-sdk-go/private/signer/v4: cannot find package \"github.com/aws/aws-sdk-go/private/signer/v4\" in any of:\r\n/usr/lib/golang/src/github.com/aws/aws-sdk-go/private/signer/v4 (from $GOROOT)\r\n/usr/local/src/go/src/github.com/aws/aws-sdk-go/private/signer/v4 (from $GOPATH)\r\n```\r\n\r\nI've tried to reproduce it and I haven't managed to do so, and I've never seen it during local Chef development with Test Kitchen. It's only happened to me in OpsWorks. As far as I can remember, it's also only happened if journald-cloudwatch-logs is already installed. I don't think I've ever seen it during the initial setup on a new instance, but then again, I don't do that as frequently as I run setup on an existing instance.\r\n\r\nSince I install journald-cloudwatch-logs on all of the server instances in our small infrastructure, setup runs have become something of a game of roulette where they'll fail one time out of every five or so. Since I'm pretty new at system administration, Chef, and Amazon Web Services, I'm still in the process of improving (hopefully?) and changing our cookbooks. This, along with these intermittent failures, has cost me a bit of time reviewing failure logs to ensure that something _I've_ done isn't the cause of the failure. I've also spent some time trying to reproduce the issue, and then thinking of workarounds, as well as experimenting with how I install Go packages – all to no avail. At this point, though, this is the one outstanding issue that's confounding me and leaving me with little faith that deploying a new set of cookbooks will run successfully the first time I try after development and testing.\r\n\r\nCurrently, to get around the issue, I just run setup again (effectively running the same `go get` command a second time). That's it. I've yet to see a case where the same failure occurs two times in a row. And I could work around this by setting a Chef resource guard and not running the `go get` for journald-cloudwatch-logs if the package is already installed. However, I'd like to see the problem resolved and if it's something you're not aware of perhaps you would, too! Thats assuming the cause of this isn't something I'm doing wrong or something that I should report to the developer of journald-cloudwatch-logs.\r\n\r\nThanks for reading!"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/comments/232793567","html_url":"https://github.com/aws/aws-sdk-go/issues/753#issuecomment-232793567","issue_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/753","id":232793567,"user":{"login":"mattpollard","id":1894408,"avatar_url":"https://avatars.githubusercontent.com/u/1894408?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpollard","html_url":"https://github.com/mattpollard","followers_url":"https://api.github.com/users/mattpollard/followers","following_url":"https://api.github.com/users/mattpollard/following{/other_user}","gists_url":"https://api.github.com/users/mattpollard/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpollard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpollard/subscriptions","organizations_url":"https://api.github.com/users/mattpollard/orgs","repos_url":"https://api.github.com/users/mattpollard/repos","events_url":"https://api.github.com/users/mattpollard/events{/privacy}","received_events_url":"https://api.github.com/users/mattpollard/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T21:10:42Z","updated_at":"2016-07-14T21:10:42Z","body":"I've just configured my cookbook to delete `GOPATH/pkg/` and its contents before I `go get` the package that I'm using. Hopefully I'm not speaking too soon, but it seems as if that's solved the problem for now."}}
{"actor":{"display_login":"mattpollard"}}