mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-22 06:57:49 +00:00
Remove volumes when removing a container
This commit is contained in:
parent
e03858d483
commit
10350c3d4a
@ -1,3 +1,4 @@
|
||||
* Remove volumes when removing a container [Pablo]
|
||||
* Refactor the still undocumented special env vars into RESIN_SUPERVISOR_ [Pablo]
|
||||
* Implement several update strategies (kill before download, 0-downtime) [Pablo]
|
||||
* Fix the error that comes up when no ip addresses are returned by gosuper [Praneeth]
|
||||
|
@ -97,7 +97,7 @@ application.kill = kill = (app, updateDB = true) ->
|
||||
.then ->
|
||||
container.stopAsync(t: 10)
|
||||
.then ->
|
||||
container.removeAsync()
|
||||
container.removeAsync(v: true)
|
||||
# Bluebird throws OperationalError for errors resulting in the normal execution of a promisified function.
|
||||
.catch Promise.OperationalError, (err) ->
|
||||
# Get the statusCode from the original cause and make sure statusCode its definitely a string for comparison
|
||||
@ -105,7 +105,7 @@ application.kill = kill = (app, updateDB = true) ->
|
||||
statusCode = '' + err.statusCode
|
||||
# 304 means the container was already stopped - so we can just remove it
|
||||
if statusCode is '304'
|
||||
return container.removeAsync()
|
||||
return container.removeAsync(v: true)
|
||||
# 404 means the container doesn't exist, precisely what we want! :D
|
||||
if statusCode is '404'
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user