Project

General

Profile

Bug #11244

Upgrade failed; broke webGUI

Added by Anthony Rossi about 6 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
No priority
Assignee:
Sean Fagan
Category:
OS
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:

ASRock C2750D4I (Intel Avoton Octocore processor, 2x Intel I210 Gigabit NIC, Marvell 88SE9172 SATA 6Gb/s Controller, Marvell 88SE9230 SATA 6Gb/s Controller)
16GB ECC DRAM
4x 1TB WD Red

ChangeLog Required:
No

Description

I upgraded from FreeNAS-9.3-STABLE-201412240734 to FreeNAS-9.3-STABLE-201508250051 and the upgrade failed.
On the post-upgrade reboot, the webGUI would display this for the "System" tab and the "Network" tab on the "Global Config" button:

{"message": "Error: no such column: system_advanced.adv_boot_scrub", "events": [], "error": true}

The "Services" and "Directory" tab would show the following:

{"message": "Error: no such column: directoryservice_activedirectory.ad_netbiosname_b", "events": [], "error": true}

The "Sharing" tab loads fine, but if I go to the CIFS shares (of which I have some) I see:

Unable to load /api/v1.0/sharing/cifs status: 500

The navigation tree on the left never loads.

The /data/update.failed file contains the following:

ps: cannot mmap corefile
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
ps: empty file: Invalid argument
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:
 - Migrating forwards to 0003_auto__add_field_support_support_email.
 > support:0003_auto__add_field_support_support_email
 - Loading initial data for support.
Installed 0 object(s) from 0 fixture(s)
Running migrations for storage:
 - Migrating forwards to 0052_auto__del_field_task_task_excludesystemdataset.
 > storage:0051_auto__add_field_task_task_excludesystemdataset
 > storage:0052_auto__del_field_task_task_excludesystemdataset
 - Loading initial data for storage.
Installed 0 object(s) from 0 fixture(s)
Running migrations for tasks:
 - Migrating forwards to 0004_populate_rsync_delayupdates.
 > tasks:0003_auto__add_field_rsync_rsync_delayupdates
 > tasks:0004_populate_rsync_delayupdates
 - Migration 'tasks:0004_populate_rsync_delayupdates' is marked for no-dry-run.
 - Loading initial data for tasks.
Installed 0 object(s) from 0 fixture(s)
Running migrations for network:
 - Migrating forwards to 0018_auto__add_field_alias_alias_vip__add_field_alias_alias_v4address_b__ad.
 > network:0016_auto__add_field_interfaces_int_vip__add_field_interfaces_int_vhid__add
 > network:0017_auto__add_field_globalconfiguration_gc_hostname_b
 > network:0018_auto__add_field_alias_alias_vip__add_field_alias_alias_v4address_b__ad
 - Loading initial data for network.
Installed 0 object(s) from 0 fixture(s)
Running migrations for account:
 - Migrating forwards to 0023_auto__add_field_bsdusers_bsdusr_microsoft_account.
 > account:0023_auto__add_field_bsdusers_bsdusr_microsoft_account
 - Loading initial data for account.
Installed 0 object(s) from 0 fixture(s)
Running migrations for services:
 - Migrating forwards to 0183_auto__chg_field_fiberchanneltotarget_fc_target.
 > services:0158_auto__add_field_afp_afp_srv_homename
 > services:0159_auto__add_field_nfs_nfs_srv_v4_krb
 > services:0160_pwencrypt
 - Migration 'services:0160_pwencrypt' is marked for no-dry-run.
 > services:0161_auto__chg_field_cifs_cifs_srv_bindip
 > services:0162_auto__add_field_iscsitargetextent_iscsi_target_extent_rpm
 > services:0163_auto__add_field_ssh_ssh_host_dsa_key_cert_pub__add_field_ssh_ssh_host_
 > services:0164_nfs_srv_v4_krb_fix
 - Migration 'services:0164_nfs_srv_v4_krb_fix' is marked for no-dry-run.
 > services:0165_auto__add_field_snmp_snmp_v3__add_field_snmp_snmp_v3_username__add_fie
 > services:0165_fix_ddns_domains_delimiters
 - Migration 'services:0165_fix_ddns_domains_delimiters' is marked for no-dry-run.
 > services:0166_pwencrypt
 - Migration 'services:0166_pwencrypt' is marked for no-dry-run.
 ! 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:   (migration cannot be dry-run; cannot discover commands)
 ! 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: services:0166_pwencrypt
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 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 256, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 331, in migrate_many
    result = self.migrate(migration, database)
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 84, in run_migration
    migration_function()
  File "/usr/local/lib/python2.7/site-packages/south/migration/migrators.py", line 60, in <lambda>
    return (lambda: direction(orm))
  File "/usr/local/www/freenasUI/../freenasUI/services/migrations/0166_pwencrypt.py", line 29, in forwards
    do_encrypt(orm['services.iSCSITargetAuthCredential'], 'iscsi_target_auth_secret')
  File "/usr/local/www/freenasUI/../freenasUI/services/migrations/0166_pwencrypt.py", line 18, in do_encrypt
    setattr(obj, field, notifier().pwenc_encrypt(getattr(obj, field)))
  File "/usr/local/www/freenasUI/../freenasUI/middleware/notifier.py", line 5750, in pwenc_encrypt
    nonce = get_random_bytes(8)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/__init__.py", line 41, in get_random_bytes
    return _UserFriendlyRNG.get_random_bytes(n)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 228, in get_random_bytes
    return _get_singleton().read(n)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 215, in _get_singleton
    _singleton = _LockingUserFriendlyRNG()
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 159, in __init__
    _UserFriendlyRNG.__init__(self)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 86, in __init__
    self._ec = _EntropyCollector(self._fa)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 53, in __init__
    self._osrng = OSRNG.new()
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/OSRNG/posix.py", line 83, in new
    return DevURandomRNG(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/Crypto/Random/OSRNG/posix.py", line 44, in __init__
    f = open(self.name, "rb", 0)
IOError: [Errno 2] No such file or directory: '/dev/urandom'
Exception AttributeError: "'DevURandomRNG' object has no attribute 'closed'" in <bound method DevURandomRNG.__del__ of <Crypto.Random.OSRNG.posix.DevURandomRNG object at 0x8106c89d0>> ignored

History

#1 Updated by William Grzybowski about 6 years ago

We have ssen this before, Sean will be able to tell why.

As a workaround, can you try this:

Login via SSH as root then:

  1. cd /usr/local/www/freenasUI
  2. pyhon manage.py migrate --merge --delete-ghost-migrations

#2 Updated by Sean Fagan about 6 years ago

  • Status changed from Unscreened to Resolved

This was fixed a long time ago. We can't retroactively fix it again.

When the udpate code itself is what is broken, it takes two upgrade cycles for it to show u.

#3 Updated by Anthony Rossi about 6 years ago

Thanks for the workaround, William. That did the trick, and now the WebGUI is working again!

Ah, I see Sean. So the downlevel OS's upgrade code gets run instead of the uplevel OS.

Sorry folks for the dupe. I didn't see this exact issue in the bug tracker.

Cheers!

#4 Updated by Sean Fagan about 6 years ago

No apologies; it's just you haven't updated in a long time :).

I'm wondering if it may be worth mentioning in the documentation that an update from a significantly older version may best be done by an ISO update.

#5 Updated by Dru Lavigne almost 4 years ago

  • Target version set to Master - FreeNAS Nightlies

Also available in: Atom PDF