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

Install from source fails integration tests #41

Closed
jf647 opened this issue Sep 14, 2014 · 5 comments · Fixed by #88
Closed

Install from source fails integration tests #41

jf647 opened this issue Sep 14, 2014 · 5 comments · Fixed by #88
Assignees
Milestone

Comments

@jf647
Copy link

jf647 commented Sep 14, 2014

I attempted to wrap this cookbook and install consul v0.4.0 using install_method = 'source' and source_revision = 'v0.4.0'

My test-kitchen runs failed thusly:

      - checkout ref e1d87dee26c05cea64342fadd2a728894b764aec branch v0.4.0
         * golang_package[github.com/hashicorp/consul] action install[2014-09-14T16:04:35+00:00] INFO: Processing golang_package[github.com/hashicorp/consul] action install (consul::install_source line 34)

           * bash[/usr/local/go/bin/go get -v github.com/hashicorp/consul 2> >(grep -v '(download)$' > /tmp/kitchen/cache/github.com-hashicorp-consul)] action run[2014-09-14T16:04:35+00:00] INFO: Processing bash[/usr/local/go/bin/go get -v github.com/hashicorp/consul 2> >(grep -v '(download)$' > /tmp/kitchen/cache/github.com-hashicorp-consul)] action run (/tmp/kitchen/cache/cookbooks/golang/providers/package.rb line 5)


      ================================================================================       
      Error executing action `run` on resource 'bash[/usr/local/go/bin/go get -v github.com/hashicorp/consul 2> >(grep -v '(download)$' > /tmp/kitchen/cache/github.com-hashicorp-consul)]'       
      ================================================================================       

      Mixlib::ShellOut::ShellCommandFailed       
      ------------------------------------       
      Expected process to exit with [0], but received '2'       
      ---- Begin output of "bash"  "/tmp/chef-script20140914-1390-11gnv8z" ----       
             STDOUT: 
             STDERR: 

             ---- End output of "bash"  "/tmp/chef-script20140914-1390-11gnv8z" ----
             Ran "bash"  "/tmp/chef-script20140914-1390-11gnv8z" returned 2

I logged into the kitchen instalce and tried to run the go get command by hand and got this:

vagrant@default-ubuntu-1404:/tmp/kitchen/cache$ /usr/local/go/bin/go get -v github.com/hashicorp/consul
github.com/armon/gomdb
# github.com/armon/gomdb
exec: "gcc": executable file not found in $PATH
vagrant@default-ubuntu-1404:/tmp/kitchen/cache$

I then added 'package gcc' before including the consul recipe, and the kitchen test succeeded. It appears that the gomdb package, while not requiring the C library to be on the system, does need to compile C code to work properly.

@johnbellone
Copy link
Contributor

That's a dependency of consul or just the golang package resource?

@jf647
Copy link
Author

jf647 commented Sep 14, 2014

It's failing on this resource:

golang_package[github.com/hashicorp/consul]

So it's specific to consul.

If you throw an additional kitchen suite in there with the following attributes:

default['consul']['install_method'] = 'source'
default['consul']['source_revision'] = 'v0.4.0'

It should manifest for you.

@johnbellone
Copy link
Contributor

I'll give this a whirl today.

@johnbellone johnbellone added this to the 0.5.0 milestone Oct 15, 2014
@jf647
Copy link
Author

jf647 commented Nov 12, 2014

Just to follow up, this kitchen suite:

  - name: source
    run_list:
      - recipe[consul::default]
    attributes:
      consul:
          install_method: source

still fails on 0.5.1:

root@source-ubuntu-1404:/tmp/kitchen# /usr/local/go/bin/go get -v github.com/hashicorp/consul
package github.com/hashicorp/consul: cannot download, $GOPATH not set. For more details see: go help gopath
root@source-ubuntu-1404:/tmp/kitchen# GOPATH=/opt/go GOBIN=/opt/go/bin /usr/local/go/bin/go get -v github.com/hashicorp/consul
github.com/armon/gomdb
# github.com/armon/gomdb
exec: "gcc": executable file not found in $PATH
root@source-ubuntu-1404:/tmp/kitchen#

johnbellone added a commit that referenced this issue Nov 13, 2014
This fixes #41 as well as adds support for Ubuntu 10.04 and EL7.
@johnbellone johnbellone self-assigned this Nov 14, 2014
johnbellone added a commit that referenced this issue Dec 11, 2014
This fixes #41 as well as adds support for Ubuntu 10.04 and EL7.
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 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 a pull request may close this issue.

2 participants