Project

General

Profile

Bug #5895

Error "no such column: system_advanced.adv_system_pool" on UI -- Upgraded from 8GB to 32 GB RAM - FreeNAS-9.2.1.4-RELEASE-x64 (a688538)

Added by krantz - about 6 years ago. Updated about 3 years ago.

Status:
Closed: User Config Issue
Priority:
Nice to have
Assignee:
Josh Paetzel
Category:
GUI (new)
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I dont know what happened... added more ram to my server.

TRACEBACK:

Environment:

Software Version: FreeNAS-9.2.1.4-RELEASE-x64 (a688538)
Request Method: GET
Request URL: http://10.0.0.130/services/core/?dojo.preventCache=1408814718213

Traceback:
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/views.py" in server_error
177. tb = Advanced.objects.all().latest('id').adv_traceback
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in latest
410. return self._earliest_or_latest(field_name=field_name, direction="-")
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in _earliest_or_latest
404. return obj.get()
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in get
301. num = len(clone)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in len
77. self._fetch_all()
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all
854. self._result_cache = list(self.iterator())
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator
220. for row in compiler.results_iter():
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
710. for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
781. cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
53. return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py" in exit
99. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
53. return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
450. return Database.Cursor.execute(self, query, params)

Exception Type: OperationalError at /services/core/
Exception Value: no such column: system_advanced.adv_system_pool

error freenas.jpg (261 KB) error freenas.jpg Screenshot of error krantz -, 08/23/2014 10:39 AM
error freenas 2.jpg (264 KB) error freenas 2.jpg krantz -, 08/27/2014 09:51 PM
error freenas 3.jpg (303 KB) error freenas 3.jpg krantz -, 08/29/2014 05:04 AM
1140
1157
1172

History

#1 Updated by krantz - about 6 years ago

Here is an LS of my /data:

[root@mandragora] /data# ls -ltra
total 2092
-rw-r-----   1 root  wheel      228352 Mar 21 06:07 factory-v1.db
drwxrwxr-x   2 root  operator      512 Mar 21 06:18 .snap/
drwxr-xr-x   2 root  wheel         512 Apr 17 16:01 ssh/
drwxr-xr-x  21 root  wheel         512 Apr 18 13:28 ../
drwxrwxr-x   2 root  wheel         512 Jun  8 15:29 crash/
-rw-r--r--   1 root  wheel          47 Aug  6 09:41 0005.run_update.sh.log
-rw-r-----   1 root  wheel      258048 Aug  6 09:47 freenas-v1.db.bak
drwxr-xr-x   2 root  wheel         512 Aug 23 17:18 zfs/
-rw-r-----   1 root  operator   260096 Aug 23 17:19 freenas-v1.db
-rw-r--r--   1 root  wheel     1371618 Aug 23 18:00 rrd_dir.tar.bz2
drwxr-xr-x   6 root  wheel         512 Aug 23 18:00 ./


Hope you guys can help me on this bug.

#2 Updated by Jordan Hubbard about 6 years ago

  • Status changed from Unscreened to Closed: User Config Issue

Sounds like the USB stick went bad and corrupted the database - there's no bug to be fixed here.

#3 Updated by Josh Paetzel about 6 years ago

  • Category set to 2
  • Status changed from Closed: User Config Issue to Investigation
  • Assignee set to Josh Paetzel
  • Target version set to 49

I disagree. Sounds like database migration issues.

Can you run the following from the CLI?:

  1. /usr/local/bin/python /usr/local/www/freenasUI/manage.py migrate --all

and paste the output please?

#4 Updated by Jordan Hubbard about 6 years ago

  • Status changed from Investigation to 15

BRB: I still don't know that there's a bug we can fix here, but setting this to WFF until user pastes in the required information.

#5 Updated by krantz - about 6 years ago

Here is the requested output:

[root@mandragora] ~# /usr/local/bin/python /usr/local/www/freenasUI/manage.py migrate --all
Traceback (most recent call last):
  File "/usr/local/www/freenasUI/manage.py", line 42, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/usr/local/lib/python2.7/site-packages/south/migration/__init__.py", line 200, in migrate_app
    applied_all = check_migration_histories(applied_all, delete_ghosts, ignore_ghosts)
  File "/usr/local/lib/python2.7/site-packages/south/migration/__init__.py", line 95, in check_migration_histories
    raise exceptions.GhostMigrations(ghosts)
south.exceptions.GhostMigrations: 

 ! These migrations are in the database but not on disk:
    <services: 0113_auto__add_field_iscsitargetglobalconfiguration_iscsi_multithreaded>
    <services: 0115_auto__add_field_afp_afp_srv_dbpath>
    <services: 0117_auto__del_field_cifs_cifs_srv_easupport__del_field_cifs_cifs_srv_dosat>
    <services: 0119_auto__add_field_iscsitargetglobalconfiguration_iscsi_experimental>
    <services: 0120_nfs_srv_allow_nonroot>
    <jails: 0017_add_virtualbox_template>
    <jails: 0018_migrate_templates>
    <jails: 0019_templates_to_9_2_1_6>
    <jails: 0020_vbox_to_4_3_12>
    <jails: 0022_auto__del_field_jailmountpoint_fstype>
    <plugins: 0014_migrate_plugins>
    <sharing: 0024_auto__del_field_afp_share_afp_dbpath>
    <sharing: 0025_auto__add_field_cifs_share_cifs_default_permissions>
    <sharing: 0026_auto__del_field_cifs_share_cifs_inheritperms__del_field_cifs_share_cif>
    <storage: 0046_auto__add_field_replication_repl_compression>
    <storage: 0047_auto__add_field_replremote_ssh_no_cipher>
    <storage: 0048_auto__add_field_replremote_ssh_cipher>
    <storage: 0049_auto__del_field_replremote_ssh_fast_cipher__del_field_replremote_ssh_n>
    <system: 0067_auto__add_systemdataset>
    <system: 0068_system_dataset>
    <system: 0069_auto__del_field_advanced_adv_syslog_usedataset__del_field_advanced_adv>
    <system: 0070_remove_kmem>
 ! I'm not trusting myself; either fix this yourself by fiddling
 ! with the south_migrationhistory table, or pass --delete-ghost-migrations
 ! to South to have it delete ALL of these records (this may not be good).
[root@mandragora] ~# 

#6 Updated by Josh Paetzel about 6 years ago

Your sins will seek you out! It looks like there was a downgrade attempted at some point.

Run the following:

/usr/local/bin/python /usr/local/www/freenasUI/manage.py migrate --all --delete-ghost-migrations

#7 Updated by krantz - about 6 years ago

Hello
Here is the output again:

[root@mandragora] ~# /usr/local/bin/python /usr/local/www/freenasUI/manage.py migrate --all --delete-ghost-migrations
Running migrations for api:
- Nothing to migrate.
 - Loading initial data for api.
Installed 0 object(s) from 0 fixture(s)
Running migrations for freeadmin:
- Nothing to migrate.
 - Loading initial data for freeadmin.
Installed 0 object(s) from 0 fixture(s)
Running migrations for support:
- Nothing to migrate.
 - Loading initial data for support.
Installed 0 object(s) from 0 fixture(s)
Running migrations for storage:
- Nothing to migrate.
 - Loading initial data for storage.
Installed 0 object(s) from 0 fixture(s)
Running migrations for jails:
- Nothing to migrate.
 - Loading initial data for jails.
Installed 0 object(s) from 0 fixture(s)
Running migrations for plugins:
- Nothing to migrate.
 - Loading initial data for plugins.
Installed 0 object(s) from 0 fixture(s)
Running migrations for sharing:
- Nothing to migrate.
 - Loading initial data for sharing.
Installed 0 object(s) from 0 fixture(s)
Running migrations for system:
- Nothing to migrate.
 - Loading initial data for system.
Installed 0 object(s) from 0 fixture(s)
Running migrations for network:
- Nothing to migrate.
 - Loading initial data for network.
Installed 0 object(s) from 0 fixture(s)
Running migrations for account:
- Nothing to migrate.
 - Loading initial data for account.
Installed 0 object(s) from 0 fixture(s)
Running migrations for services:
- Nothing to migrate.
 - Loading initial data for services.
Installed 0 object(s) from 0 fixture(s)
[root@mandragora] ~# 

Is that normal?

#8 Updated by krantz - about 6 years ago

1157

Update: Same error after reboot. enclosed screenshot.

#9 Updated by Josh Paetzel about 6 years ago

Yes. Do a service django restart and try logging in to the GUI.

#10 Updated by William Grzybowski about 6 years ago

What I think happened here is that he tried an upgrade, some migration failed and he was sent back to the version previous to the upgrade, leaving the dangling migrations.

#11 Updated by Jordan Hubbard about 6 years ago

  • Status changed from 15 to Closed: User Config Issue

BRB: User should upgrade to 9.2.1.7 and all of these database / migration sync issues will be resolved.

#12 Updated by krantz - about 6 years ago

Hello

service django restart

failed. Same error. enclosed Screenshot.

Jordan suggests I upgrade to 9.2.1.7 --- however I cannot upgrade via GUI, same error.

Can you instruct me how to do it in command line?

Thanks

#13 Updated by krantz - about 6 years ago

1172

Screenshot for last error.

#14 Updated by William Grzybowski about 6 years ago

You'll need to save /data/freenas-v1.db, install fresh and try to upgrade the config from the GUI. If that doesn't work all you can do is import the volume and start again.

#15 Avatar?id=14398&size=24x24 Updated by Kris Moore about 3 years ago

  • Target version changed from 49 to N/A

Also available in: Atom PDF