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

Source installs are broken #1

Closed
kevinreedy opened this issue Apr 24, 2014 · 7 comments
Closed

Source installs are broken #1

kevinreedy opened this issue Apr 24, 2014 · 7 comments
Assignees

Comments

@kevinreedy
Copy link
Contributor

End of output of kitchen test source-ubuntu-1204

[2014-04-24T22:10:26+00:00] INFO: directory[/usr/local/consul-1] sending run action to execute[unpack /tmp/kitchen/cache/consul-1.tar.gz] (delayed)
  * execute[unpack /tmp/kitchen/cache/consul-1.tar.gz] action run[2014-04-24T22:10:26+00:00] INFO: Processing execute[unpack /tmp/kitchen/cache/consul-1.tar.gz] action run (/tmp/kitchen/cache/cookbooks/ark/providers/default.rb line 281)

================================================================================
Error executing action `run` on resource 'execute[unpack /tmp/kitchen/cache/consul-1.tar.gz]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '2'
---- Begin output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
STDOUT:
STDERR: tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
       /bin/tar: Child returned status 2
       /bin/tar: Error is not recoverable: exiting now
       ---- End output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
       Ran /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 returned 2


       Resource Declaration:
       ---------------------

       # In /tmp/kitchen/cache/cookbooks/ark/providers/default.rb

       281:   execute "unpack #{new_resource.release_file}" do
       282:     command _unpack_command
       283:     cwd new_resource.path
       284:     environment new_resource.environment
       285:     notifies :run, "execute[set owner on #{new_resource.path}]"
       286:     notifies :run, "execute[autogen #{new_resource.path}]"
       287:     notifies :run, "execute[configure #{new_resource.path}]"
       288:     notifies :run, "execute[make #{new_resource.path}]"
       289:     notifies :run, "execute[make install #{new_resource.path}]"
       290:     action :nothing
       291:   end
       292:



       Compiled Resource:
       ------------------
       # Declared in /tmp/kitchen/cache/cookbooks/ark/providers/default.rb:281:in `block in class_from_file'

       execute("unpack /tmp/kitchen/cache/consul-1.tar.gz") do
         action [:nothing]
         retries 0
         retry_delay 2
         guard_interpreter :default
         command "/bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1"
         backup 5
         cwd "/usr/local/consul-1"
         environment {"PATH"=>"/usr/local/bin:/opt/go/bin:/usr/bin", "GOPATH"=>"/opt/go"}
         returns 0
         cookbook_name "consul"
       end




================================================================================
Error executing action `install_with_make` on resource 'ark[consul]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[unpack /tmp/kitchen/cache/consul-1.tar.gz] (/tmp/kitchen/cache/cookbooks/ark/providers/default.rb line 281) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
---- Begin output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
STDOUT:
STDERR: tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
---- End output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
Ran /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 returned 2


       Resource Declaration:

       ---------------------
       # In /tmp/kitchen/cache/cookbooks/consul/recipes/source_install.rb

        28: ark 'consul' do
        29:   environment env
        30:   url URI.join('https://github.com/hashicorp/consul/archive/', "#{source_version}.tar.gz").to_s
        31:   action [:install_with_make]
        32: end



       Compiled Resource:
       ------------------

       # Declared in /tmp/kitchen/cache/cookbooks/consul/recipes/source_install.rb:28:in `from_file'


       ark("consul") do
         provider Chef::Provider::Ark
         action [:install_with_make]
         updated true
         updated_by_last_action true
         retries 0
         retry_delay 2
         guard_interpreter :default
         cookbook_name "consul"
         recipe_name "source_install"
         environment {"PATH"=>"/usr/local/bin:/opt/go/bin:/usr/bin", "GOPATH"=>"/opt/go"}
         url "https://github.com/hashicorp/consul/archive/v0.1.0.tar.gz"
         extension "tar.gz"
         prefix_bin "/usr/local/bin"
         version "1"
         path "/usr/local/consul-1"
         home_dir "/usr/local/consul"
         release_file "/tmp/kitchen/cache/consul-1.tar.gz"
         strip_components 1
         owner "root"
         group 0
       end



[2014-04-24T22:10:26+00:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2014-04-24T22:10:26+00:00] ERROR: Running exception handlers
Running handlers complete

[2014-04-24T22:10:26+00:00] ERROR: Exception handlers complete
[2014-04-24T22:10:26+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 10 resources updated in 305.371971911 seconds
[2014-04-24T22:10:26+00:00] ERROR: ark[consul] (consul::source_install line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[unpack /tmp/kitchen/cache/consul-1.tar.gz] (/tmp/kitchen/cache/cookbooks/ark/providers/default.rb line 281) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'     
---- Begin output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
STDOUT:
STDERR: tar (child): gzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
---- End output of /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 ----
Ran /bin/tar xzf /tmp/kitchen/cache/consul-1.tar.gz --strip-components=1 returned 2
[2014-04-24T22:10:26+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <source-ubuntu-1204>.
>>>>>> Please see .kitchen/logs/source-ubuntu-1204.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sudo -E chef-client -z --config /tmp/kitchen/client.rb --log_level info --json-attributes /tmp/kitchen/dna.json]
>>>>>> ----------------------

I have the same results with any of the source installs. I also tried using ark version 0.8.0 rather than the latest 0.8.2, which had the same results. Are you also seeing this?

@kevinreedy
Copy link
Contributor Author

Just realized I was testing on 0.1.0 and 0.1.1 is now out. Same result on 0.1.1 though.

@johnbellone johnbellone self-assigned this Apr 25, 2014
@johnbellone
Copy link
Contributor

This looks like some kind of issue with PATH. I'll take a look.

@johnbellone
Copy link
Contributor

I believe I found the reason here. It relates to how the sudo rules are setup for the various CentOS versions. Basically when ark runs the installation the PATH kept for the sudo operation.

@johnbellone
Copy link
Contributor

This should be fixed with 45b0025 running the builds now to verify.

@johnbellone johnbellone added the bug label May 6, 2014
@johnbellone
Copy link
Contributor

And I lied. But good news is now I know whats wrong!

@johnbellone
Copy link
Contributor

This is fixed with the official 0.2.0 release (master).

Afterglow pushed a commit to Afterglow/consul-cookbook that referenced this issue Jul 11, 2016
johnbellone pushed a commit that referenced this issue Jul 12, 2016
Updated CHANGELOG.md for v2.0.0 deprecated resource
@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

No branches or pull requests

2 participants