Auto-merge for PR #478 via VersionBot

Fix the message shown when docker gives a 500 error when starting a container
This commit is contained in:
resin-io-versionbot[bot] 2017-07-26 20:02:44 +00:00 committed by GitHub
commit 8e1a38d610
3 changed files with 12 additions and 2 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
## v6.0.4 - 2017-07-26
* Fix the message shown when docker gives a 500 error when starting a container [Pablo Carranza Velez]
## v6.0.3 - 2017-07-25
* Use a pinned build of the debian image to build base and gosuper, to avoid unnecessary rebuilds [Pablo Carranza Velez]

View File

@ -1,7 +1,7 @@
{
"name": "resin-supervisor",
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
"version": "6.0.3",
"version": "6.0.4",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@ -244,6 +244,12 @@ shouldMountKmod = (image) ->
console.error('Error getting app OS release: ', err)
return false
isExecFormatError = (err) ->
message = ''
try
message = err.json.trim()
/exec format error$/.test(message)
application.start = start = (app) ->
device.isResinOSv1().then (isV1) ->
volumes = utils.defaultVolumes(isV1)
@ -319,7 +325,7 @@ application.start = start = (app) ->
alreadyStarted = true
return
if statusCode is '500' and err.json.trim().match(/exec format error$/)
if statusCode is '500' and isExecFormatError(err)
# Provide a friendlier error message for "exec format error"
device.getDeviceType()
.then (deviceType) ->