fix(storage): delete storage fails if a panic occurred during initialization (#7501)
* fix(storage): store storages map when init storage panic * fix(drivers): add nil check to drop method
This commit is contained in:
@ -101,7 +101,7 @@ func initStorage(ctx context.Context, storage model.Storage, storageDriver drive
|
||||
log.Errorf("panic init storage: %s", errInfo)
|
||||
driverStorage.SetStatus(errInfo)
|
||||
MustSaveDriverStorage(storageDriver)
|
||||
storagesMap.Delete(driverStorage.MountPath)
|
||||
storagesMap.Store(driverStorage.MountPath, storageDriver)
|
||||
}
|
||||
}()
|
||||
// Unmarshal Addition
|
||||
|
Reference in New Issue
Block a user