Comcast / traffic_control

Traffic Control CDN
https://trafficcontrol.apache.org
92 stars 81 forks source link

Federation resolver type metadata not part of a migration which prevents inserts of resolvers #786

Closed elsloo closed 8 years ago

elsloo commented 8 years ago

Exception is: [2015-11-14 00:37:07,917] [ERROR] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'type' cannot be null [for Statement "INSERT INTO federation_resolver ( ip_address, type) VALUES ( ?, ? )" with ParamValues: 0="192.168.1.1/32", 1=undef] at /opt/traffic_ops/app/lib/API/Federation.pm line 399

..because the types of RESOLVE4 and RESOLVE6 are only in the seeds.sql file and not a migration, so a new install works but an existing/upgraded environment will not.

dneuman64 commented 8 years ago

Seeds.sql should be run on upgrade and fresh install. I think the use case this didnt work is where we did an uninstall/re-install but bailed out of postinstall before the database creation and used an existing database.