Need help upgrading from Indico 0.98

Strange… I wonder why it ever tries connecting to that port. You could try having ZODB listen on 9676 instead of 9675 just to see if it helps…

I thought the same thing and tried that already. If I change the port to 9676 in indico.conf and zodb.conf, the script will fail and exit with a Traceback error and not just hang. Here is the output:

(indico-env)[root@indico-test indico]# python ./bin/migration/migrate.py --prev-version 0.98
/tmp/indico-env/lib/python2.7/site-packages/pkg_resources/__init__.py:193: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,

This script will migrate your Indico DB to a new version. We recommend that
this operation be executed while the web server is down, in order to avoid
concurrency problems and DB conflicts.


Are you sure you want to execute the migration now? [y/N] y

Executing migration...

Probing DB connection... DONE!

# Reloading all plugins (0.97)
  DONE

# Create category date index without visibility. (0.98.1)
  DONE

# Initializing/updating index catalog (0.98b)

Migration failed! DB may be in  an inconsistent state:
Traceback (most recent call last):
  File "./bin/migration/migrate.py", line 1105, in main
    dry_run=args.dry_run)
  File "./bin/migration/migrate.py", line 1051, in runMigration
    task(dbi, withRBDB, prevVersion)
  File "./bin/migration/migrate.py", line 383, in catalogMigration
    Catalog.updateDB(dbi=dbi)
  File "/opt/indico/indico/core/index/catalog.py", line 98, in updateDB
    cls.create_idx(indexName, dbi, clazz)
  File "/opt/indico/indico/core/index/catalog.py", line 113, in create_idx
    new_idx.initialize(dbi=dbi)
  File "/opt/indico/MaKaC/plugins/RoomBooking/components.py", line 43, in initialize
    for room in set(CrossLocationQueries.getRooms()):
  File "/opt/indico/MaKaC/rb_location.py", line 480, in getRooms
    res = location.factory.newRoom().getRooms( **kwargs )
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/room.py", line 192, in getRooms
    roomsBTree = Room.getRoot()
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/room.py", line 122, in getRoot
    return Room.__dalManager.getRoot(_ROOMS)
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/dalManager.py", line 174, in getRoot
    return DALManager.getInstance().getRoot(name)
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/dalManager.py", line 97, in getRoot
    raise MaKaCError("Cannot connect to the room booking database")
MaKaCError: Cannot connect to the room booking database

The logs show the same “ECONNREFUSED” errors for port 9676.

I switched back to port 9675 in indico.conf and zodb.conf and the migration script hangs again (same as before). Note that I’m using a fresh copy of the Data.fs DB file for every attempt. Here is my latest attempt (back to using port 9675). Notice that port 9675 is tried first in the other.log file then it falls back to 9676:

2018-01-29 13:54:59,493 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:54:59,494 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:54:59,494 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:54:59,494 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:54:59,494 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:54:59,495 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:00,497 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:00,498 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:00,498 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:00,498 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:00,498 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:00,499 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:02,503 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:02,503 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:02,503 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:02,504 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:02,504 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:02,504 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:06,506 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:06,507 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:06,507 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:06,507 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9675): ECONNREFUSED
2018-01-29 13:55:06,507 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:06,507 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:14,517 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9675): ECONNREFUSED
2018-01-29 13:55:33,654 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:33,655 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:33,655 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:33,656 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:33,657 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:33,658 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:34,663 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:34,664 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:34,665 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:34,665 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:34,666 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:34,667 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:36,673 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:36,674 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:36,675 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:36,676 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:36,676 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:36,677 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:40,684 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:40,685 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:40,685 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:40,686 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:40,687 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:40,687 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:48,699 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:48,700 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:55:48,701 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:48,702 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:48,702 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:55:48,703 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:04,718 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:04,718 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:04,719 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:04,719 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:04,719 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:04,720 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:34,754 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:34,755 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED
2018-01-29 13:56:34,755 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:34,756 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:34,757 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('127.0.0.1', 9676): ECONNREFUSED
2018-01-29 13:56:34,757 ZEO.zrpc        : WARNING  - (11726) CW: error connecting to ('::1', 9676): ECONNREFUSED

I believe the migration is expecting a second instance of Indico running on port 9676 (Room Booking database). It’s strange, since you don’t seem to have passed --with-rb.
Are you using the Room Booking system at all? Any chances the RB plugin is active?
And if you CTRL+C while it’s stuck, do you get a useful traceback we can have a look at?

Hello.

We are not using the Room Booking database afaik. How can I disable the RB plugin? Here is the output after a CTRL-C:

(indico-env)root@indico-test indico # python ./bin/migration/migrate.py --prev-version 0.98
/tmp/indico-env/lib/python2.7/site-packages/pkg_resources/__init__.py:193: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,

This script will migrate your Indico DB to a new version. We recommend that
this operation be executed while the web server is down, in order to avoid
concurrency problems and DB conflicts.


Are you sure you want to execute the migration now? [y/N] y

Executing migration...

Probing DB connection... DONE!

# Reloading all plugins (0.97)
  DONE

# Create category date index without visibility. (0.98.1)
  DONE

# Initializing/updating index catalog (0.98b)
^C
Migration failed! DB may be in  an inconsistent state:
Traceback (most recent call last):
  File "./bin/migration/migrate.py", line 1105, in main
    dry_run=args.dry_run)
  File "./bin/migration/migrate.py", line 1051, in runMigration
    task(dbi, withRBDB, prevVersion)
  File "./bin/migration/migrate.py", line 383, in catalogMigration
    Catalog.updateDB(dbi=dbi)
  File "/opt/indico/indico/core/index/catalog.py", line 98, in updateDB
    cls.create_idx(indexName, dbi, clazz)
  File "/opt/indico/indico/core/index/catalog.py", line 113, in create_idx
    new_idx.initialize(dbi=dbi)
  File "/opt/indico/MaKaC/plugins/RoomBooking/components.py", line 43, in initialize
    for room in set(CrossLocationQueries.getRooms()):
  File "/opt/indico/MaKaC/rb_location.py", line 480, in getRooms
    res = location.factory.newRoom().getRooms( **kwargs )
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/room.py", line 192, in getRooms
    roomsBTree = Room.getRoot()
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/room.py", line 122, in getRoot
    return Room.__dalManager.getRoot(_ROOMS)
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/dalManager.py", line 174, in getRoot
    return DALManager.getInstance().getRoot(name)
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/dalManager.py", line 158, in getInstance
    instance = DBConnection(minfo)
  File "/opt/indico/MaKaC/plugins/RoomBooking/default/dalManager.py", line 62, in __init__
    realm=minfo.getRoomBookingDBRealm())
  File "/tmp/indico-env/lib/python2.7/site-packages/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/ClientStorage.py", line 420, in __init__
    self._wait(wait_timeout)
  File "/tmp/indico-env/lib/python2.7/site-packages/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/ClientStorage.py", line 437, in _wait
    self._rpc_mgr.connect(sync=1)
  File "/tmp/indico-env/lib/python2.7/site-packages/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZEO/zrpc/client.py", line 280, in connect
    self.cond.wait(self.sync_wait)
  File "/usr/lib64/python2.7/threading.py", line 362, in wait
    _sleep(delay)
KeyboardInterrupt

The easiest fix might be commenting out these two lines in /opt/indico/MaKaC/plugins/RoomBooking/components.py by prefixing them with #:

Good news. Disabling the RB module by commenting the lines in the python script seemed to do the trick. The migration is running now. I’ll post output when it’s done.

2 Likes
(indico-env)root@indico-test indico # python ./bin/migration/migrate.py --prev-version 0.98
/tmp/indico-env/lib/python2.7/site-packages/pkg_resources/__init__.py:193: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
  stacklevel=1,

This script will migrate your Indico DB to a new version. We recommend that
this operation be executed while the web server is down, in order to avoid
concurrency problems and DB conflicts.


Are you sure you want to execute the migration now? [y/N] y

Executing migration...

Probing DB connection... DONE!

# Reloading all plugins (0.97)
  DONE

# Create category date index without visibility. (0.98.1)
  DONE

# Initializing/updating index catalog (0.98b)
  DONE

# Initializing room+day => reservation index. (0.98.1)
  DONE

# Add missing location info to slots of a session that contains location or room (0.98.1)
  DONE3489 100.000000%] 999 DOE/NSF Evaluation of U.S. ATLAS Operations

# Creating new "All Requests" index (0.98.3)
  Collaboration plugin not usable - jumping task
  DONE

# Migrating Chat Room index to new structure (0.99)
  IM plugin not usable - jumping task
  DONE

# Removing TimedLinkedEvents (0.99)
  DONE

# Moving from OAI Private Harvesting to a more general IP-based ACL. (1.0)
  DONE

# Removing old CSS Templates from events (1.0)
  DONE

# Tasks: 1. Moving support info fields from conference to a dedicated class 2. Update non inherited children list 3. Update Vidyo indexes (1.0)
  DONE3489 100.000000%] 999 DOE/NSF Evaluation of U.S. ATLAS Operations

# Changing Vidyo Room Names (1.0)
  DONE

# Indexing Conference Title (1.1)
  DONE3489 100.000000%] 999 DOE/NSF Evaluation of U.S. ATLAS Operations

# Convert Avatar.linkedTo structure to use OOTreeSets and import linkedTo information into Redis (if enabled) (1.1)
Note: Some links might point to broken objects which will be skipped automatically.
  Done
  DONE

# Import linkedTo information into Redis (1.1)
  Redis not configured, skipping
  DONE

# Add Category Suggestion Task to scheduler (Redis needed) (1.2)
  Redis not configured, skipping
  DONE

# Tasks: 1. Removing Video Services from core 2. Migrates old AbstractField to new AbstractField subclasses 3. Add download e-ticket PDF link to the menu (1.2)
  DONE3489 100.000000%] 999 DOE/NSF Evaluation of U.S. ATLAS Operations

# Generate the new password with a salt (1.2)
  Processing 3695/3695
  DONE

# Remove the NiceIdentities from the avatars (1.2)
  DONE

# Convert all LDAP identities to lowercase (1.2)


  DONE

# Makes sure that all the secondary emails are lower case (otherwise it would be difficult to use indexes) (1.2)
  DONE

# Fix indexes encoding. They may be in unicode and they have to be encoded in utf-8 (1.2)
  DONE

Database Migration successful!

1 Like

Great, now you can stop ZODB, copy Data.fs, and continue on a more recent machine (CentOS7, RHEL7, etc.) with the 2.0 setup and migration: https://docs.getindico.io/en/stable/installation/upgrade_legacy/

New update: I started the 2.0 setup and migration process and got up to the point where I have to run the migration script again (going from 1.2.2 -> 2.0). My first attempt failed with the following Traceback:

(.venv)[indico@indico-test ~]$ indico-migrate postgresql:///indico file:///opt/indico-legacy/db/Data.fs --archive-dir /opt/indico-legacy/archive --storage-backend legacy --default-email default@indico-test.bnl.gov --default-currency USD --symlink-target ~/archive/legacy_symlinks/ --symlink-backend legacy-symlinks --symlink-backend legacy-symlinks
Trying to open file:///opt/indico-legacy/db/Data.fs...
Done!
Traceback (most recent call last): |/opt/indico/.venv/bin/indico-migrate:11 [<module>]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:126 [main]
 |/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:722 [__call__]
 |/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:697 [main]
 |/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:895 [invoke]
 |/opt/indico/.venv/lib/python2.7/site-packages/click/core.py:535 [invoke]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py:122 [cli]
 debug=debug, **kwargs)
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/migrate.py:106 [migrate]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/importer.py:161 [run]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/global_pre_events.py:60 [migrate]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/util.py:323 [_f]
 |/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/global_pre_events.py:110 [migrate_legal_settings]
 legal_settings.set(new, convert_to_unicode(getattr(self.makac_info, old)))

'MaKaCInfo' object has no attribute '_protectionDisclaimerProtected'

*** ERROR
*** There has been an unexpected error during the migration.
*** You may choose to post an error report on gist.github.com which you can then send to the Indico Team for bug debugging purposes.
*** The URL won't be publicly advertised and only data that was shown on the screen will be sent.

Do you wish to submit the error report? [y/N]:
Traceback (most recent call last):
  File "/opt/indico/.venv/bin/indico-migrate", line 11, in <module>
    sys.exit(main())
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py", line 126, in main
    return cli()
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/indico/.venv/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/cli.py", line 122, in cli
    debug=debug, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/migrate.py", line 106, in migrate
    **kwargs).run()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/importer.py", line 161, in run
    self.migrate()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/global_pre_events.py", line 60, in migrate
    self.migrate_legal_settings()
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/util.py", line 323, in _f
    f(self, *args, **kwargs)
  File "/opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/global_pre_events.py", line 110, in migrate_legal_settings
    legal_settings.set(new, convert_to_unicode(getattr(self.makac_info, old)))
AttributeError: 'MaKaCInfo' object has no attribute '_protectionDisclaimerProtected'

Edit /opt/indico/.venv/lib/python2.7/site-packages/indico_migrate/steps/global_pre_events.py and replace

legal_settings.set(new, convert_to_unicode(getattr(self.makac_info, old)))

with

legal_settings.set(new, convert_to_unicode(getattr(self.makac_info, old, '')))

Note that you need to restart the migration, i.e. delete the database with dropdb indico and then recreate it by running the two commands from the setup guide (createdb indico and the one right after it with the CREATE EXTENSION query)


Pleaset let me know if it works with this change; then I’ll release a fixed version of the migration script tomorrow.

Yes, it worked after making the change. The migration process is running now. We have a lot of users and events to migrate so this will probably run for a while. I’ll report back once it’s completed.

Thanks!
Rafael

Out of curiosity, how many users/events do you have?

I believe there are over 3000 users and about 3000 events. The migration UI shows its 6% done and has ~6 hours left.

Update: The migration completed successfully yesterday. I also finished up the Post-migration work and Indico 2.0 is currently running. Thanks for all your help!

Next task will be changing the Indico auth method from local to SSO. I noticed there were some options in the migration script for this. I will experiment with this now.

Quick question- if/when we introduce the new auth method, I’m assuming we would have to leave the local accounts behind. Wouldn’t this break existing “restricted” events? What would be the recommended course of action when migrating from local to SSO-style auth?

Thanks!

You don’t need to change anything in the migration script; indico.conf is all you need to edit. Check out this page in the docs.

No, the Indico accounts will stay the same - besides authenticator-specific data (e.g. a username, userid, etc. provided via SSO/LDAP), Indico also links accounts based on the email address. So if someone has an account that is using username/password and the email address foo@bar.com, logging in via SSO will ask him to attach the SSO identity to his existing account as long as SSO provides foo@bar.com as well. This is also why trusted_email on a provider may only be enabled if the emails coming from them are guaranteed to be validated/trustworthy (see the section in the docs about it).

Ok, thanks for the info. One last question, during the migration, I noticed we had many accounts that were never verified (so not valid). Is there an easy way to print these accounts and remove them?

They were already skipped during the migration.