Fix default volume name in migrations, and do not use the legacy-container flag on containers from older supervisors (they'll be restarted anyways)

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2018-02-20 08:11:34 -08:00
parent 58fede2976
commit bb57bcc37c

View File

@ -1,8 +1,4 @@
var defaultLegacyVolume = function (appId) {
return `resin-app-${appId}`
}
var tryParse = function (obj) {
try {
return JSON.parse(obj)
@ -32,7 +28,7 @@ var singleToMulticontainerApp = function (app) {
networks: {},
volumes: {}
}
const defaultVolume = defaultLegacyVolume(appId)
const defaultVolume = 'resin-data'
newApp.volumes[defaultVolume] = {}
let updateStrategy = conf['RESIN_SUPERVISOR_UPDATE_STRATEGY']
if (updateStrategy == null) {
@ -68,7 +64,6 @@ var singleToMulticontainerApp = function (app) {
'io.resin.features.resin-api': '1',
'io.resin.update.strategy': updateStrategy,
'io.resin.update.handover-timeout': handoverTimeout,
'io.resin.legacy-container': '1'
},
environment: environment,
restart: restartPolicy,