Wrong mime detection
Opened this issue · 2 comments
Sdedelbrock commented
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 commented
Found the issue. This happened with the file has the content-type application/x-tar
instead of application/x-gzip
ChrisMcKenzie commented
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.