24.10. Electric Eel WG Easy App migration failed

Hello,

I have upgraded a system to 24.10. but the migration from the App ‘WG Easy’ failed. It’s the only installed app. Manually running the migration script gives this error:

[{"name": "wg-easy", "error": "Failed to migrate config: Failed to migrate config: Traceback (most recent call last):\n  File \"/mnt/.ix-apps/truenas_catalog/trains/stable/wg-easy/1.0.21/migrations/migrate_from_kubernetes\", line 55, in <module>\n    print(yaml.dump(migrate(yaml.safe_load(f.read()))))\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/mnt/.ix-apps/truenas_catalog/trains/stable/wg-easy/1.0.21/migrations/migrate_from_kubernetes\", line 19, in migrate\n    \"external_host\": config[\"wgConfig\"][\"host\"],\n                     ~~~~~~^^^^^^^^^^^^\nKeyError: 'wgConfig'\n", "successfully_migrated": false}]

It seems to be a bug in the config? How can I fix this?

Looking forward for some hints on how to fix this.
Thank you!

Are there any more details in /var/log/app_lifecycle.log?

No, this file is empty.

Actually, this suggests that your version of WG Easy had not been updated for some time before attempting to migrate, which would have caused the migration to fail. You could either fresh install the app on 24.10 now that you’re here or possibly you could revert to a 24.04 boot environment, update the app to the latest version, then try to upgrade to 24.10 and migrate again. This might run into errors if some cruft is left in the .ix-apps dataset from the first migration attempt though.

fwiw, I had the exact same issue with mine. fairly sure my WG-Easy app was up-to-date before upgrading to EE.

i tried to just back up the wg0.conf and wg0.json from the existing install location (/mnt/your_systemdrivehere/ix-applications/releases/wg-easy/volumes/ix-volumes/config ) then reinstall and then re-copy those back, but i didn’t have any luck.

I ended up just re-installing from scratch.

guide here is still helpful, but the cliffnotes of what I had to change from stock, since I already have had it working in my environment before:

  1. external host = public IP address of your trueNAS server. Or the DDNS address if you have set that up.
  2. external port: 51820
  3. device name: if your network interface ID is different from stock (mine is eno1 for instance)
  4. client default address range 10.8.0.x
  5. client default dns 10.8.0.1
  6. web UI port: 51821

and then of course had to recreate entries for all the clients in the web UI.
I don’t know if restoring from a backup would work here, had I done a proper backup of those beforehand. given that the keys would change between installs, but ymmv.