mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Don't remove volumes when switching into local mode
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
050c10dbb0
commit
e076622fe6
@ -875,16 +875,19 @@ module.exports = class ApplicationManager extends EventEmitter
|
||||
# Until then, this essentially does the same thing. We
|
||||
# check when every other part of the teardown for an
|
||||
# application has been complete, and then append the
|
||||
# volume removal steps
|
||||
# volume removal steps.
|
||||
# We also don't want to remove cloud volumes when
|
||||
# switching to local mode
|
||||
# multi-app warning: this will break
|
||||
currentAppIds = _.keys(current.local.apps).map((n) -> checkInt(n))
|
||||
targetAppIds = _.keys(target.local.apps).map((n) -> checkInt(n))
|
||||
oldApps = null
|
||||
if targetAppIds.length > 1
|
||||
throw new Error('Current supervisor does not support multiple applications')
|
||||
diff = _.difference(currentAppIds, targetAppIds)
|
||||
if diff.length > 0
|
||||
oldApps = diff
|
||||
if !localMode
|
||||
currentAppIds = _.keys(current.local.apps).map((n) -> checkInt(n))
|
||||
targetAppIds = _.keys(target.local.apps).map((n) -> checkInt(n))
|
||||
if targetAppIds.length > 1
|
||||
throw new Error('Current supervisor does not support multiple applications')
|
||||
diff = _.difference(currentAppIds, targetAppIds)
|
||||
if diff.length > 0
|
||||
oldApps = diff
|
||||
|
||||
nextSteps = []
|
||||
if !supervisorNetworkReady
|
||||
|
Loading…
x
Reference in New Issue
Block a user