truenas / apps

GNU Lesser General Public License v3.0
76 stars 24 forks source link

Zerotier fails to migrate to 24.10-RC1 #587

Closed yichi-yang closed 1 month ago

yichi-yang commented 1 month ago

Found this line in /var/log/app_migrations.log:

[2024/10/02 10:16:41] (DEBUG) app_migrations.migrate():231 - 'zerotier' app failed to migrate successfully: 'Failed to migrate config: Failed to migrate config: Traceback (most recent call last):\n  File "/mnt/.ix-apps/truenas_catalog/trains/community/zerotier/1.0.15/migrations/migrate_from_kubernetes", line 45, in <module>\n    print(yaml.dump(migrate(yaml.safe_load(f.read()))))\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File "/mnt/.ix-apps/truenas_catalog/trains/community/zerotier/1.0.15/migrations/migrate_from_kubernetes", line 30, in migrate\n    for item in config["zerotierStorage"]["additionalStorages"]\n                ~~~~~~^^^^^^^^^^^^^^^^^^^\nKeyError: \'zerotierStorage\'\n'

Formatted traceback:

Failed to migrate config: Failed to migrate config: Traceback (most recent call last):
  File "/mnt/.ix-apps/truenas_catalog/trains/community/zerotier/1.0.15/migrations/migrate_from_kubernetes", line 45, in <module>
    print(yaml.dump(migrate(yaml.safe_load(f.read()))))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/.ix-apps/truenas_catalog/trains/community/zerotier/1.0.15/migrations/migrate_from_kubernetes", line 30, in migrate
    for item in config["zerotierStorage"]["additionalStorages"]
                ~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'zerotierStorage'
stavros-k commented 1 month ago

Hello, Did you updated your apps to the latest version before upgrading TrueNAS?

yichi-yang commented 1 month ago

Ah good point... I'm fairly sure I didn't. Edit: thanks for #589

stavros-k commented 1 month ago

In this case the fix can be easily handled. once the linked PR above is merged you can refresh the catalog and re-run the migration