I was running into the same issues after upgrading from 11.1-U6 to 11.2-beta2.
Thanks for the bug hexley, I was able to diagnose and fix the issue on my machine, which i'll document here...
Warning i have no idea if this is a good idea for anyone other than me to run... so know what you're doing.
Because of
@hexley's post i was able to find that my website db migration had failed. I looked at this file.
cat /data/update.failed
and saw this line at the end
Code:
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration system.0022_cert_serial is applied before its dependency system.0021_merge_20180507_1315 on database 'default'.
i then found the directory of the django site from the stack trace above and changed to it:
/usr/local/www/freenasUI
its a django site, so i ran
# ./manage.py showmigrations
.....
system
[X] 0001_initial
....
[X] 0010_syscons_to_vt
[X] 0011_auto_20180219_1615
[X] 0012_add_filesystem_model
[X] 0013_rename_consulalerts_to_alertservice
[X] 0014_alert_default_settings
[X] 0015_alert
[X] 0016_encrypt_cloud_credentials
[ ] 0021_merge_20180507_1315
[ ] 0024_rename_bes
[X] 0022_cert_serial
[ ] 0018_merge_20180409_1538
[ ] 0019_increase_motd
...
(note this isn't my real output but an example since i didn't save it)
You can see the migration status and that somehow a later migration had been ran before and earlier.
at this point i looked in settings.py to find where my database was stored
grep 'DATABASE_PATH' -A 2 settings.py
which happend to be in
/data/freenas-v1.db for me
i then hopefully backed up my database using
cp /data/freenas-v1.db /root/backup.db
and then edited the failing migration to change its dependencies
vi system/migrations/0022_cert_serial.py
i changed this line
dependencies = [
('system', '0021_merge_20180507_1315'),
]
to depend on the last successful migration, which was '0016_encrypt_cloud_credentials'
i then tried to revert the migration to the last known good one
./manage.py migrate system 0016_encrypt_cloud_credentials
this complained (but succeeded i think) that i need to make a merged migration, so i ran
./manage.py makemigrations --merge
which made a new migration
0026_merge_20180827_1833
and then i ran that migration which included everything
./manage.py migrate system 0026_merge_20180827_1833
and the ui started working.
i ran all the remaining migration using:
./manage.py migrate
and my system seemed quite happy.
Good luck