Uploaded image for project: 'Indy Node'
  1. Indy Node
  2. INDY-1379

Migration fails in case of upgrade to version with new transactions format

    XMLWordPrintable

Details

    • Bug
    • Status: Complete
    • Highest
    • Resolution: Done
    • None
    • None
    • None
    • None
    • EV 18.11 Stability/ViewChange

    Description

      Environment:
      indy-node 1.3.428 -> 1.3.434
      (docker pool)

      Steps to Reproduce:
      1. Setup the pool with indy-node=1.3.428
      2. Upgrade the pool using POOL_UPGRADE or upgrade it using apt and apply migrations manually.

      Actual Results:
      POOL_UPGRADE was failed, migrations were not applied manually with similar error:

      >>> migrate("1.3.428","1.3.434",10)
      2018-05-30 16:53:37,046 | INFO | migration_tool.py ( 52) | migrate | Migrating from 1.3.428 to 1.3.434 on Ubuntu
      2018-05-30 16:53:37,051 | DEBUG | migration_tool.py ( 54) | migrate | Found migration scripts: ['1_0_96_to_1_0_97', '1_1_150_to_1_1_151', '1_2_188_to_1_2_189', '1_2_233_to_1_2_234', '1_2_273_to_1_2_274', '1_3_396_to_1_3_397', '1_3_428_to_1_3_429', '1_3_433_to_1_3_434', 'disabled_1_0_97_to_1_0_96', 'helper_1_0_96_to_1_0_97']
      2018-05-30 16:53:37,066 | INFO | migration_tool.py ( 61) | migrate | Following migrations will be applied: ['1_3_428_to_1_3_429', '1_3_433_to_1_3_434']
      2018-05-30 16:53:37,068 | INFO | migration_tool.py ( 63) | migrate | Applying migration 1_3_428_to_1_3_429
      2018-05-30 16:53:37,070 | INFO | migration_tool.py ( 35) | _call_migration_script | script path /usr/local/lib/python3.5/dist-packages/data/migrations/deb/1_3_428_to_1_3_429.py
      2018-05-30 16:53:39,408 | INFO | 1_3_428_to_1_3_429.py (172) | archive_old_ledger | Archive of old transaction format ledger created: /tmp/Node1_old_txn_ledger.tar.gz
      2018-05-30 16:53:40,578 | INFO | 1_3_428_to_1_3_429.py (194) | migrate_all | All txn logs migrated successfully from old to new transaction format
      2018-05-30 16:53:40,579 | INFO | 1_3_428_to_1_3_429.py (201) | migrate_all | All hash stores migrated successfully from old to new transaction format
      2018-05-30 16:53:40,586 | INFO | 1_3_428_to_1_3_429.py (208) | migrate_all | All states migrated successfully from old to new transaction format
      2018-05-30 16:53:40,587 | INFO | 1_3_428_to_1_3_429.py (215) | migrate_all | Timestamp store migrated successfully from old to new transaction format
      2018-05-30 16:53:40,587 | INFO | 1_3_428_to_1_3_429.py (222) | migrate_all | BLS signature store migrated successfully from old to new transaction format
      2018-05-30 16:53:40,587 | INFO | 1_3_428_to_1_3_429.py (231) | <module> | Migration of txns format
      2018-05-30 16:53:40,710 | INFO | migration_tool.py ( 67) | migrate | Migration 1_3_428_to_1_3_429 applied in 3.640324115753174 seconds
      2018-05-30 16:53:40,711 | INFO | migration_tool.py ( 63) | migrate | Applying migration 1_3_433_to_1_3_434
      2018-05-30 16:53:40,711 | INFO | migration_tool.py ( 35) | _call_migration_script | script path /usr/local/lib/python3.5/dist-packages/data/migrations/deb/1_3_433_to_1_3_434.py
      Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/data/migrations/deb/1_3_433_to_1_3_434.py", line 84, in <module>
      if migrate_all():
      File "/usr/local/lib/python3.5/dist-packages/data/migrations/deb/1_3_433_to_1_3_434.py", line 54, in migrate_all
      hash_store = initHashStore(config_helper.ledger_dir, "pool", config, read_only=True)
      File "/usr/local/lib/python3.5/dist-packages/storage/helper.py", line 54, in initHashStore
      read_only=read_only)
      File "/usr/local/lib/python3.5/dist-packages/plenum/persistence/db_hash_store.py", line 22, in __init__
      self.open()
      File "/usr/local/lib/python3.5/dist-packages/plenum/persistence/db_hash_store.py", line 90, in open
      self.db_type, self.dataDir, self.nodes_db_name, read_only=self._read_only)
      File "/usr/local/lib/python3.5/dist-packages/storage/helper.py", line 24, in initKeyValueStorage
      return KeyValueStorageRocksdb(dataLocation, keyValueStorageName, open, read_only)
      File "/usr/local/lib/python3.5/dist-packages/storage/kv_store_rocksdb.py", line 23, in __init__
      self.open()
      File "/usr/local/lib/python3.5/dist-packages/storage/kv_store_rocksdb.py", line 28, in open
      self._db = rocksdb.DB(self._db_path, opts, read_only=self._read_only)
      File "rocksdb/_rocksdb.pyx", line 1437, in rocksdb._rocksdb.DB.__cinit__
      File "rocksdb/_rocksdb.pyx", line 84, in rocksdb._rocksdb.check_status
      rocksdb.errors.RocksIOError: b'IO error: While opening a file for sequentially reading: /var/lib/indy/sandbox/data/Node1/pool_merkleNodes/CURRENT: No such file or directory'
      2018-05-30 16:53:42,798 | ERROR | migration_tool.py ( 44) | _call_migration_script | Migration failed: script returned 1
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.5/dist-packages/indy_node/utils/migration_tool.py", line 65, in migrate
      _call_migration_script(migration, current_platform, timeout)
      File "/usr/local/lib/python3.5/dist-packages/indy_node/utils/migration_tool.py", line 45, in _call_migration_script
      raise Exception(msg)
      Exception: Migration failed: script returned 1
      

       

      Expected Results:
      Pool upgrade should work.

      Attachments

        Issue Links

          Activity

            People

              zhigunenko.dsr NIkita Zhigunenko
              ozheregelya Olga Zheregelya
              NIkita Zhigunenko, Olga Zheregelya, Sergey Shilov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: