mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(migration) datastore always marked new and migrations skipped EE-1775 (#5788)
* fix issue with broken store init * minor logic improvement * Remove fileexists logic as its redundant and handled implicitely by bolt.Open * Added re-open test on IsNew flag. Essential for migrations to be able to run
This commit is contained in:
parent
fc4ff59bfd
commit
6bd72d21a8
4 changed files with 20 additions and 25 deletions
|
@ -57,12 +57,8 @@ func initFileService(dataStorePath string) portainer.FileService {
|
|||
}
|
||||
|
||||
func initDataStore(dataStorePath string, rollback bool, fileService portainer.FileService, shutdownCtx context.Context) portainer.DataStore {
|
||||
store, err := bolt.NewStore(dataStorePath, fileService)
|
||||
if err != nil {
|
||||
log.Fatalf("failed creating data store: %v", err)
|
||||
}
|
||||
|
||||
err = store.Open()
|
||||
store := bolt.NewStore(dataStorePath, fileService)
|
||||
err := store.Open()
|
||||
if err != nil {
|
||||
log.Fatalf("failed opening store: %v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue