Upgrade from 9.10.1-U4 to 11.0-U2 failed

Status
Not open for further replies.

djerf

Cadet
Joined
Aug 12, 2017
Messages
3
I thought it was time to upgrade my server that had 9.10.1-U4 but after reboot i got this message in the console:

Code:
freenas uwsgi: [freeadmin.navtree:252] Failed to generate navtree for app freenasUI.system: no such table: system_consulalerts


and there is an "update.failed" file:

Code:
=== update.failed begins ===
/usr/local/lib/migrate93/freenasUI/jails/migrations/0019_templates_to_9_2_1_6.py:9: DeprecationWarning: invalid escape sequence \.
  version_regex = re.compile('9.2.[0-9\.]+')

/usr/local/lib/migrate93/freenasUI/jails/migrations/0019_templates_to_9_2_1_6.py:12: DeprecationWarning: invalid escape sequence \.
  '(9.2[0-9\.]+?/RELEASE/(x86|x64)/jails/).+', jt.jt_url)

/usr/local/lib/migrate93/freenasUI/jails/migrations/0019_templates_to_9_2_1_6.py:19: DeprecationWarning: invalid escape sequence \.
  version_regex = re.compile('9.2.[0-9\.]+')

/usr/local/lib/migrate93/freenasUI/directoryservice/migrations/0047_migrate_kerberos_keytabs_to_principals.py:22: DeprecationWarning: invalid escape sequence \d
  '^(\d+)\s+([\w-]+(\s+\(\d+\))?)\s+([^\s]+)\s+([\d+\-]+)(\s+)?$'

/usr/local/lib/migrate93/freenasUI/contrib/IPAddressField.py:11: DeprecationWarning: invalid escape sequence \.
  ["^freenasUI\.contrib\.IPAddressField\.IPAddressField"])

/usr/local/lib/migrate93/freenasUI/contrib/IPAddressField.py:13: DeprecationWarning: invalid escape sequence \.
  ["^freenasUI\.contrib\.IPAddressField\.IP4AddressField"])

/usr/local/lib/migrate93/freenasUI/contrib/IPAddressField.py:15: DeprecationWarning: invalid escape sequence \.
  ["^freenasUI\.contrib\.IPAddressField\.IP6AddressField"])

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:164: DeprecationWarning: invalid escape sequence \.
  "^django\.db",

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:165: DeprecationWarning: invalid escape sequence \.
  "^django\.contrib\.contenttypes\.generic",

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:166: DeprecationWarning: invalid escape sequence \.
  "^django\.contrib\.localflavor",

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:167: DeprecationWarning: invalid escape sequence \w
  "^django_localflavor_\w\w",

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:172: DeprecationWarning: invalid escape sequence \.
  "^django\.contrib\.contenttypes\.generic\.GenericRelation",

/usr/local/lib/python3.6/site-packages/south/modelsinspector.py:173: DeprecationWarning: invalid escape sequence \.
  "^django\.contrib\.contenttypes\.generic\.GenericForeignKey",

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/geodjango.py:45: DeprecationWarning: invalid escape sequence \.
  add_introspection_rules(rules, ["^django\.contrib\.gis"])

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_audit_log.py:27: DeprecationWarning: invalid escape sequence \.
  ['^audit_log\.models\.fields\.LastUserField'],

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_tagging.py:20: DeprecationWarning: invalid escape sequence \.
  add_introspection_rules(rules, ["^tagging\.fields",])

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_tagging.py:23: DeprecationWarning: invalid escape sequence \.
  add_introspection_rules([], ["^tagging_autocomplete\.models\.TagAutocompleteField"])

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_taggit.py:14: DeprecationWarning: invalid escape sequence \.
  add_ignored_fields(["^taggit\.managers"])

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_objectpermissions.py:14: DeprecationWarning: invalid escape sequence \.
  add_ignored_fields(["^objectpermissions\.models\.UserPermissionRelation",

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/django_objectpermissions.py:15: DeprecationWarning: invalid escape sequence \.
  "^objectpermissions\.models\.GroupPermissionRelation"])

/usr/local/lib/python3.6/site-packages/south/introspection_plugins/annoying_autoonetoone.py:11: DeprecationWarning: invalid escape sequence \.
  add_introspection_rules([], ["^annoying\.fields\.AutoOneToOneField"])

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:63: DeprecationWarning: invalid escape sequence \.
  "\.\.|"

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:64: DeprecationWarning: invalid escape sequence \(
  "\(\)|"

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:65: DeprecationWarning: invalid escape sequence \[
  "[/.*:\[\]\(\)@=])|"

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:66: DeprecationWarning: invalid escape sequence \{
  "((?:\{[^}]+\})?[^/\[\]\(\)@=\s]+)|"

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:67: DeprecationWarning: invalid escape sequence \s
  "\s+"

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:160: DeprecationWarning: invalid escape sequence \d
  if signature == "-" and not re.match("-?\d+$", predicate[0]):

/usr/local/lib/python3.6/site-packages/lxml/_elementpath.py:169: DeprecationWarning: invalid escape sequence \d
  if signature == "-='" and not re.match("-?\d+$", predicate[0]):

/usr/local/lib/migrate93/freenasUI/sharing/migrations/0034_fix_wizard_cifs_vfsobjects.py:16: DeprecationWarning: invalid escape sequence \s
  vfsobject = re.sub("\s+|\[|\]|'", '', vfsobject)

/usr/local/lib/migrate93/freenasUI/storage/migrations/0027_zpool_guid.py:25: DeprecationWarning: invalid escape sequence \s
  vol.vol_guid = re.sub('\s+', ' ', line).split(' ')[2]

/usr/local/lib/migrate93/freenasUI/system/migrations/0029_ntpservers.py:7: DeprecationWarning: invalid escape sequence \s
  entry = re.sub('\s+', ' ', entry).strip()

/usr/local/lib/migrate93/freenasUI/freeadmin/models/fields.py:37: DeprecationWarning: invalid escape sequence \.
  add_introspection_rules([], ["^(freenasUI\.)?freeadmin\.models\.fields\..*"])

/usr/local/lib/migrate93/freenasUI/freeadmin/models/fields.py:136: DeprecationWarning: invalid escape sequence \g
  return re.sub(r'(?P<du>[0-9A-F]{2})(?!$)', '\g<du>:', value)

FATAL ERROR - The following SQL query failed: CREATE TABLE "system_cloudcredentials" ("id" integer NOT NULL PRIMARY KEY, "name" varchar(100) NOT NULL, "provider" varchar(50) NOT NULL, "attributes" text NOT NULL)
The error was: table "system_cloudcredentials" already exists
Syncing...
Creating tables ...
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)
Migrating...
Running migrations for account:
- Nothing to migrate.
 - Loading initial data for account.
Installed 0 object(s) from 0 fixture(s)
Running migrations for api:
- Nothing to migrate.
 - Loading initial data for api.
Installed 0 object(s) from 0 fixture(s)
Running migrations for jails:
 - Migrating forwards to 0038_retroactively_change_duplicate_mac_addresses.
 > jails:0037_nuke_virtualbox_from_orbit
 - Migration 'jails:0037_nuke_virtualbox_from_orbit' is marked for no-dry-run.
 > jails:0038_retroactively_change_duplicate_mac_addresses
 - Migration 'jails:0038_retroactively_change_duplicate_mac_addresses' is marked for no-dry-run.
 - 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 support:
- Nothing to migrate.
 - Loading initial data for support.
Installed 0 object(s) from 0 fixture(s)
Running migrations for directoryservice:
 - Migrating forwards to 0063_auto__add_field_activedirectory_ad_monitor_frequency__add_field_active.
 > directoryservice:0061_auto__add_field_activedirectory_ad_userdn__add_field_activedirectory_a
 > directoryservice:0062_create_kerberossettings
 - Migration 'directoryservice:0062_create_kerberossettings' is marked for no-dry-run.
 > directoryservice:0063_auto__add_field_activedirectory_ad_monitor_frequency__add_field_active
 - Loading initial data for directoryservice.
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 services:
 ! Migration services:0198_iscsi_expunge_lun_auto should not have been applied before services:0197_add_field_AFP_afp_srv_map_acls but was.
 ! Migration services:0198_iscsi_expunge_lun_auto should not have been applied before services:0197_add_field_AFP_afp_srv_map_acls but was.
 ! Migration services:0198_iscsi_expunge_lun_auto should not have been applied before services:0197_add_field_AFP_afp_srv_map_acls but was.
 - Migrating forwards to 0200_remove_obsolete_services.
 > services:0195_auto__add_field_nfs_nfs_srv_mountd_log__add_field_nfs_nfs_srv_statd_lo
 > services:0196_auto__add_field_services_ups_ups_shutdowncmd
 > services:0197_add_field_AFP_afp_srv_map_acls
 > services:0199_auto__add_field_iscsitargetglobalconfiguration_iscsi_alua
 > services:0200_remove_obsolete_services
 - Migration 'services:0200_remove_obsolete_services' is marked for no-dry-run.
 - Loading initial data for services.
Installed 0 object(s) from 0 fixture(s)
Running migrations for sharing:
 - Migrating forwards to 0035_auto__add_field_afp_share_afp_auxparams.
 > sharing:0035_auto__add_field_afp_share_afp_auxparams
 - Loading initial data for sharing.
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 system:
 - Migrating forwards to 0112_systemdataset_rrd_disable.
 > system:0103_auto__add_cloudcredentials
 ! Error found during real run of migration! Aborting.

 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had
 ! to leave it in an interim state between migrations.

! You *might* be able to recover with:  = DROP TABLE "system_cloudcredentials"; []

 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration: system:0103_auto__add_cloudcredentials
Traceback (most recent call last):
  File "/usr/local/lib/migrate93/django/db/backends/util.py", line 53, in execute
  return self.cursor.execute(sql, params)
  File "/usr/local/lib/migrate93/django/db/backends/sqlite3/base.py", line 452, in execute
  return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: table "system_cloudcredentials" already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/migrate93/src/main.py", line 30, in <module>
  run_syncdb()
  File "/usr/local/lib/migrate93/src/utils.py", line 46, in run_syncdb
  call_command('syncdb', interactive=False, merge=True, delete_ghosts=True, migrate=True)
  File "/usr/local/lib/migrate93/django/core/management/__init__.py", line 159, in call_command
  return klass.execute(*args, **defaults)
  File "/usr/local/lib/migrate93/django/core/management/base.py", line 285, in execute
  output = self.handle(*args, **options)
  File "/usr/local/lib/migrate93/django/core/management/base.py", line 415, in handle
  return self.handle_noargs(**options)
  File "/usr/local/lib/python3.6/site-packages/south/management/commands/syncdb.py", line 103, in handle_noargs
  management.call_command('migrate', **options)
  File "/usr/local/lib/migrate93/django/core/management/__init__.py", line 159, in call_command
  return klass.execute(*args, **defaults)
  File "/usr/local/lib/migrate93/django/core/management/base.py", line 285, in execute
  output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/south/management/commands/migrate.py", line 111, in handle
  ignore_ghosts = ignore_ghosts,
  File "/usr/local/lib/python3.6/site-packages/south/migration/__init__.py", line 220, in migrate_app
  success = migrator.migrate_many(target, workplan, database)
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 256, in migrate_many
  result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 331, in migrate_many
  result = self.migrate(migration, database)
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 133, in migrate
  result = self.run(migration, database)
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 114, in run
  return self.run_migration(migration, database)
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 84, in run_migration
  migration_function()
  File "/usr/local/lib/python3.6/site-packages/south/migration/migrators.py", line 60, in <lambda>
  return (lambda: direction(orm))
  File "/usr/local/lib/migrate93/freenasUI/system/migrations/0103_auto__add_cloudcredentials.py", line 14, in forwards
  ('attributes', self.gf('freenasUI.freeadmin.models.fields.DictField')()),
  File "/usr/local/lib/python3.6/site-packages/south/db/generic.py", line 47, in _cache_clear
  return func(self, table, *args, **opts)
  File "/usr/local/lib/python3.6/site-packages/south/db/generic.py", line 361, in create_table
  "columns": ', '.join([col for col in columns if col]),
  File "/usr/local/lib/python3.6/site-packages/south/db/generic.py", line 282, in execute
  cursor.execute(sql, params)
  File "/usr/local/lib/migrate93/django/db/backends/util.py", line 69, in execute
  return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/migrate93/django/db/backends/util.py", line 53, in execute
  return self.cursor.execute(sql, params)
  File "/usr/local/lib/migrate93/django/db/utils.py", line 99, in __exit__
  six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/migrate93/django/utils/six.py", line 658, in reraise
  raise value.with_traceback(tb)
  File "/usr/local/lib/migrate93/django/db/backends/util.py", line 53, in execute
  return self.cursor.execute(sql, params)
  File "/usr/local/lib/migrate93/django/db/backends/sqlite3/base.py", line 452, in execute
  return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: table "system_cloudcredentials" already exists
=== update.failed ends ===


SMB service refuse to start and when I go to the "services" menu I get this info:

Code:
=== text begins ===
Environment:

Software Version: FreeNAS-11.0-U2 (e417d8aa5)
Request Method: GET
Request URL: http://192.168.10.10/services/core/?dojo.preventCache=1502556331147


Traceback:
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  64.  return self.cursor.execute(sql, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in execute
  457.  execute = self.locked_retry(Database.Cursor.execute, query, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in locked_retry
  434.  rv = method(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  39.  response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.  response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.  response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.  return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.  return view_func(request, *args, **kwargs)
File "./freenasUI/services/views.py" in core
  78.  afp = models.AFP.objects.order_by("-id")[0]
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __getitem__
  295.  return list(qs)[0]
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __iter__
  256.  self._fetch_all()
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in _fetch_all
  1087.  self._result_cache = list(self.iterator())
File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in __iter__
  54.  results = compiler.execute_sql()
File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
  835.  cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  64.  return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/utils.py" in __exit__
  94.  six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.6/site-packages/django/utils/six.py" in reraise
  685.  raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
  64.  return self.cursor.execute(sql, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in execute
  457.  execute = self.locked_retry(Database.Cursor.execute, query, params)
File "./freenasUI/freeadmin/sqlite3_ha/base.py" in locked_retry
  434.  rv = method(self, *args, **kwargs)

Exception Type: OperationalError at /services/core/
Exception Value: no such column: services_afp.afp_srv_chmod_request
=== text ends ===



Can anyone tell me what to do to fix this?
 
D

dlavigne

Guest
You might have to upgrade to 9.10.2 first, then 11.0.

To do that, reboot into your previous installation (pick it out of the boot menu), make sure the train is set to 9.10-STABLE, update, and reboot. If that works, change the train to 11 and update. Let us know if that resolves it.
 

djerf

Cadet
Joined
Aug 12, 2017
Messages
3
You might have to upgrade to 9.10.2 first, then 11.0.

To do that, reboot into your previous installation (pick it out of the boot menu), make sure the train is set to 9.10-STABLE, update, and reboot. If that works, change the train to 11 and update. Let us know if that resolves it.

That was not an option, because that tripped a bug causing the server not to boot :(
https://bugs.freenas.org/issues/20927

Is it possible to make a clean install (11.0) and import an exported settings backup?
 

djerf

Cadet
Joined
Aug 12, 2017
Messages
3
Just made a clean install, imported my config & restarted. tons of errors like those I got after upgrading and none of my settings where restored.
Maybe I should just file this as a bug and go back to 9.10?

Edit:
I found an ISO for 9.10.2-U6, Ill try to go back to 9.10.2-U2 and upgrade to that version and see if it works better.
Now when I already "broke" my server I can spend some time trying to find a solution.

Edit 2:
I run into that bug immediately after installing 9.10.2-U6, so I guess I have to go back to 9.10.1-U4 again.
 
Last edited:
Status
Not open for further replies.
Top