AttributeError: 'AFP' object has no attribute 'afp_srv_hometimemachine'

abrita

Cadet
Joined
Dec 20, 2014
Messages
1
Trying to upgrade from 9.10-U6 to 11.2 and the migration fails with this message in /data/update.failed, any ideas or known issues?

Code:
Applying sharing.0007_afp_share_afp_home...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/python3.6/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 345, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/migration.py", line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 189, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/usr/local/www/freenasUI/sharing/migrations/0007_afp_share_afp_home.py", line 17, in migrate_afp_home
    share.afp_timemachine = service.afp_srv_hometimemachine
AttributeError: 'AFP' object has no attribute 'afp_srv_hometimemachine'
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
This is something that should be reported here:

https://redmine.ixsystems.com/projects/freenas

They are going to want as much information as they can get in an effort to ensure this doesn't continue to happen to others.

You should be able to go back to the previous boot environment without needing to reinstall anything.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
PS. Please post back here with your ticket number.
 

DevRandom

Cadet
Joined
Dec 12, 2018
Messages
1
Hi:

Sorry to hijack this thread, but I encountered the same problem and already reported this Bug (#63888)

Though I would not recommend the way to go about tinkering with the system the way I did (comment #2 onward)
 

wilby

Cadet
Joined
Jan 19, 2019
Messages
2
Upgrade from 9.10.1-U2 to 11.2 failed with the following errors in /data/update.failed. Has anyone found a work around?


Code:
  File "/usr/local/www/freenasUI/manage.py", line 42, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 345, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/migration.py", line 129, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 189, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/usr/local/www/freenasUI/sharing/migrations/0007_afp_share_afp_home.py", line 17, in migrate_afp_home
    share.afp_timemachine = service.afp_srv_hometimemachine
AttributeError: 'AFP' object has no attribute 'afp_srv_hometimemachine'
 

jamesarm97

Cadet
Joined
Feb 1, 2019
Messages
1
Same boat here. Would really be nice to be able to boot to a working state, even if it means disabling AFP somehow to get past this. Not sure if the migration stopped because of this error or what because it will not let me into the GUI. If the other have a response or fix please post.
 

wilby

Cadet
Joined
Jan 19, 2019
Messages
2
Please check if you have AFP set up for non Time Machine Apple shares. If you do have AFP shares, please migrate them to SMB. Next, under Services -> AFP make sure "Enable Home Directories" is unchecked. This should cause Freenas to upgrade without any errors. Do post back if you still have errors or questions.
 
Top