Hi there Storjlings,
After updating Docker to the newest version (Linux Centos 7), one of my nodes is not coming back up.
$ sudo docker logs storagenode
2020-03-25T12:52:30.426Z INFO Configuration loaded from: /app/config/config.yaml
2020-03-25T12:52:30.436Z INFO Operator email: redacted
2020-03-25T12:52:30.436Z INFO operator wallet: redacted
2020-03-25T12:52:30.939Z INFO version running on version v0.34.6
2020-03-25T12:52:30.948Z INFO db.migration Database Version {“version”: 31}
Error: Error during preflight check for storagenode databases: storage node preflight database error: piece_expiration: expected schema does not match actual: &dbschema.Schema{
Tables: *dbschema.Table{
&{Name: “piece_expirations”, Columns: *dbschema.Column{&{Name: “deletion_failed_at”, Type: “TIMESTAMP”, IsNullable: true}, &{Name: “piece_expiration”, Type: “TIMESTAMP”}, &{Name: “piece_id”, Type: “BLOB”}, &{Name: “satellite_id”, Type: “BLOB”}, &{Name: “trash”, Type: “INTEGER”}}, PrimaryKey: string{“piece_id”, “satellite_id”}},
&{
Name: “test_table”,
Columns: *dbschema.Column{
&{Name: “id”, Type: “int”},
&{Name: “name”, Type: “varchar(30)”, IsNullable: true},
},
PrimaryKey: string{“id”},
},
},
Indexes: *dbschema.Index{&{Name: “idx_piece_expirations_deletion_failed_at”, Table: “piece_expirations”, Columns: string{“deletion_failed_at”}}, &{Name: “idx_piece_expirations_piece_expiration”, Table: “piece_expirations”, Columns: string{“piece_expiration”}}, &{Name: “idx_piece_expirations_trashed”, Table: “piece_expirations”, Columns: string{“satellite_id”, “trash”}, Partial: “trash = 1”}},
}
storj.io/storj/storagenode/storagenodedb.(*DB).Preflight:301
main.cmdRun:198
storj.io/storj/pkg/process.cleanup.func1.2:312
storj.io/storj/pkg/process.cleanup.func1:330
github.com/spf13/cobra.(*Command).execute:826
github.com/spf13/cobra.(*Command).ExecuteC:914
github.com/spf13/cobra.(*Command).Execute:864
storj.io/storj/pkg/process.ExecWithCustomConfig:84
storj.io/storj/pkg/process.ExecCustomDebug:66
main.main:328
runtime.main:203
I have tried to drop the test table, but sqlite3 says the following:
$ sqlite3 piece_expiration.db
$ drop table test_table;
Error: malformed database schema (idx_piece_expirations_trashed) - near “WHERE”: syntax error
After trying to follow the instructions here proposed here, it tells me that dump_all.sql does not exist.
Can you help me resolve this issue? It there a way to prevent this in the future when updating docker?
XenonOrion