Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

stash.tar.gz unzip fails #17

@biddster

Description

@biddster

I'm running the stash cookbook 3.1.1 on a centos 6.4 x64 machine.

Every time it fails at the same point:

================================================================================
Error executing action `create` on resource 'template[/opt/atlassian/stash/bin/setenv.sh]'
================================================================================
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory /opt/atlassian/stash/bin does not exist.

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/stash/recipes/tomcat_configuration.rb

  4: template "#{node['stash']['install_path']}/stash/bin/setenv.sh" do
  5:   source 'setenv.sh.erb'
  6:   owner  node['stash']['user']
  7:   mode   '0755'
  8:   notifies :restart, 'service[stash]', :delayed
  9: end
 10: 

Upon further investigation it appears that the ark 'stash' unzip isn't happening.

[2013-11-12T15:35:19+00:00] INFO: Processing ark[stash] action install (stash::linux_standalone line 43)
[2013-11-12T15:35:19+00:00] INFO: Processing directory[/opt/atlassian/stash-2.8.2] action create (/var/chef/cache/cookbooks/ark/providers/default.rb line 38)
[2013-11-12T15:35:19+00:00] INFO: directory[/opt/atlassian/stash-2.8.2] created directory /opt/atlassian/stash-2.8.2
[2013-11-12T15:35:19+00:00] INFO: Processing remote_file[/var/chef/cache/stash.tar.gz] action create (/var/chef/cache/cookbooks/ark/providers/default.rb line 44)
[2013-11-12T15:35:46+00:00] INFO: remote_file[/var/chef/cache/stash.tar.gz] updated
[2013-11-12T15:35:46+00:00] INFO: remote_file[/var/chef/cache/stash.tar.gz] not queuing delayed action run on execute[unpack /var/chef/cache/stash.tar.gz] (delayed), as it's already been queued
[2013-11-12T15:35:46+00:00] INFO: Processing execute[unpack /var/chef/cache/stash.tar.gz] action nothing (/var/chef/cache/cookbooks/ark/providers/default.rb line 54)
[2013-11-12T15:35:46+00:00] INFO: Processing execute[set owner on /opt/atlassian/stash-2.8.2] action nothing (/var/chef/cache/cookbooks/ark/providers/default.rb line 63)
[2013-11-12T15:35:46+00:00] INFO: Processing link[/opt/atlassian/stash] action create (/var/chef/cache/cookbooks/ark/providers/default.rb line 76)
[2013-11-12T15:35:46+00:00] INFO: link[/opt/atlassian/stash] created 

Observations when I examine the stash box:

  • stash.tar.gz is correctly downloaded to /var/chef/cache.
  • /opt/atlassian/stash is symlinked to /opt/atlassian/stash-2.8.2
  • both of the directories in the bullet above are empty

Cracking open stash.tar.gz shows me that it contains the directory atlassian-stash-2.8.2. Is the ark provider smart enough to work out the root directory in the archive and copy everything to /opt/atlassian/stash-2.8.2?

If I manually issue...

$ sudo unzip /var/chef/cache/stash.tar.gz -d /opt/atlassian/ 

...it barfs saying this

$  sudo unzip /var/chef/cache/stash.tar.gz -d /opt/atlassian/ 
Archive:  /var/chef/cache/stash.tar.gz
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /var/chef/cache/stash.tar.gz or
        /var/chef/cache/stash.tar.gz.zip, and cannot find /var/chef/cache/stash.tar.gz.ZIP, period.

Looks to me like the ark task shouldn't be using unzip for a tar.gz?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions