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

Wrong mime detection #24

Open
Sdedelbrock opened this issue Feb 28, 2016 · 2 comments
Open

Wrong mime detection #24

Sdedelbrock opened this issue Feb 28, 2016 · 2 comments

Comments

@Sdedelbrock
Copy link

The following dropship config errors out:

service "cadabra-api" {
  sequentialUpdates = true
  checkInterval = "10s"

  before "script" {
    command = "initctl stop cadabra-api"
  }

  artifact "rackspace" {
    bucket = "private-binaries"
    path = "cadabra/api/api.tar.gz"
    destination = "/sites"
  }

  after "script" {
    command = "initctl start cadabra-api"
  }
}

Dropship logs:

2016/02/28 02:11:42 [INF]: Acquiring lock for cadabra-api
2016/02/28 02:11:42 [INF]: Downloading update for cadabra-api...
2016/02/28 02:11:42 [INF]: Executing "script" hook with map[command:initctl stop cadabra-api]
2016/02/28 02:11:42 [INF]: Update for cadabra-api installed successfully. [hash: b39e9351ecd98df60752ef7cf99ca878] [files written: 1]
2016/02/28 02:11:42 [INF]: Executing "script" hook with map[command:initctl start cadabra-api]
2016/02/28 02:11:42 [ERR]: Unable to execute "script" hook fork/exec /sbin/initctl: not a directory

this ends up creating a binary file (not the one in the tarball weirdly enough) at /sites (supposed to be the install directory)

@Sdedelbrock
Copy link
Author

Found the issue. This happened with the file has the content-type application/x-tar instead of application/x-gzip

@ChrisMcKenzie
Copy link
Owner

Yeah I have been contemplating the way install detection work currently it goes off of mime-type from the cdn and it appears to be very inconsistent. might be useful to have an option that allows you to set this in the artifact section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants