Stork Upgrade from 0.22 -> 1.0 fails DB migration
name: Bug report
about: Stork 1.0 Upgrade
Describe the bug Attempting to upgrade from Stork 0.22 to Stork 1.0 fails with:
INFO[2021-12-13 19:22:33] connection.go:73 checking connection to database
FATA[2021-12-13 19:22:33] main.go:27 unexpected error: ERROR #23502 column "daemon_id" contains null values
problem with migrating database
isc.org/stork/server/database.Migrate
/tmp/build/backend/server/database/migrations.go:87
isc.org/stork/server/database.MigrateToLatest
/tmp/build/backend/server/database/migrations.go:96
isc.org/stork/server/database.NewPgDB
/tmp/build/backend/server/database/connection.go:138
isc.org/stork/server.NewStorkServer
/tmp/build/backend/server/server.go:104
main.main
/tmp/build/backend/cmd/stork-server/main.go:25
runtime.main
/tmp/build/tools/1.15.5/go/src/runtime/proc.go:204
runtime.goexit
/tmp/build/tools/1.15.5/go/src/runtime/asm_amd64.s:1374
in the stork.log file.
Running a stork-tool db-up returns:
INFO[2021-12-13 20:20:56] connection.go:73 checking connection to database
FATA[2021-12-13 20:20:56] main.go:105 problem with migrating database: ERROR #23502 column "daemon_id" contains null values
To Reproduce Steps to reproduce the behavior:
- Install Stork 0.22 with Kea 2.0 agents
- Install Stork 1.0 and attempt to start
Expected behavior I would expect a clean migration to the new version.
Environment:
- Stork: 0.22 -> 1.0.0.211208110147
- OS: Ubuntu 18.04 Docker
- Kea version: 2.0
- Running in a Docker container using cloudsmith packages
Additional Information stork.env has nothing uncommented from default. ENV variables are set as follows:
STORK_REST_HOST=0.0.0.0
STORK_DATABASE_USER_NAME=stork
STORK_DATABASE_PASSWORD=REDACTED
STORK_DATABASE_PORT=5432
STORK_VERSION=1.0.0.211208110147
STORK_REST_STATIC_FILES_DIR=/usr/share/stork/www
STORK_DATABASE_HOST=stork-db