Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tailscale missing after firware upgrade #38

Closed
bennettp123 opened this issue Jan 18, 2023 · 11 comments
Closed

tailscale missing after firware upgrade #38

bennettp123 opened this issue Jan 18, 2023 · 11 comments

Comments

@bennettp123
Copy link
Contributor

bennettp123 commented Jan 18, 2023

Hi there,

My device just auto-updated (yes I have automatic updates enabled, yolo) from 2.4.23 to 2.4.26. Afterwards, tailscale was not installed.

Is this supposed to persist across firmware updates?

Edit: working fine after a reinstall 🤷🏻

@bennettp123
Copy link
Contributor Author

bennettp123 commented Jan 18, 2023

I suspect this is not implemented. Unifi firmware upgrades typically only retain the contents of /data (uniOS 2.x) or /mnt/data (uniOS 1.x).

I can think of two things that need to be fixed to get tailscale to persist across firmware updates:

  • reinstall the tailscale package—I thought the firmware upgrade handled this automatically, so not sure what went wrong here—perhaps it was skipped (or failed) because it was installed using dpkg instead of apt-get?
  • retain tailscale state after firmware update (/var/lib/tailscale, possibly more)

For reinstalling the package, we could probably just add that to the on_boot script

For the tailscale state, we could just replace it with a symlink to a folder in /data or /mnt/data

@notheotherben
Copy link
Member

Thanks @bennettp123, I've not yet had the chance to test this on a UniFi OS 2.x device myself, so these details are extremely helpful.

I'll see what we can put together for those issues and let you know. One of the options around state is to configure the state directory using a flag when we start tailscaled, so that may also be a good option.

@notheotherben
Copy link
Member

Just a heads up that I've added #41 with the hope that it'll ensure Tailscale is installed automatically after the OS is updated (it ensures that the correct apt source is present and we use that for installs).

I'll look at putting together something for the state directory as well (probably editing /etc/default/tailscaled to tell it to use /data/tailscale for state.

@notheotherben
Copy link
Member

Okay, I've published v2.3.2 which should address most of these issues, however I've not yet had the chance to test it against a real firmware upgrade (I've not received one since my UDM recently got updated to 2.x).

I'm hoping that the switch to using apt to install Tailscale should ensure it is re-installed after a firmware upgrade, however the /etc/default/tailscaled file might not include the required changes, in which case running /data/tailscale/manage.sh install should set things up correctly (and continue to use your original state file).

@GlitchWitch
Copy link

GlitchWitch commented Feb 14, 2023

We had our tailscale instance on our UDM go missing as well. However the upgrade was from 1.12.33 to 1.12.38. Running the latest install script seems to have solved it.

Edit: The upgrade from 1.12.38 to 2.4.27 caused tailscale to be removed again. Will update with the results of the next 2.x update.

@notheotherben
Copy link
Member

Thanks, I'm surprised that the 1.12.33 → 1.12.38 update resulted in it being removed as 1.x upgrades traditionally retained the contents of the /mnt/data partition. The upgrade from 1.x to 2.x is expected to wipe all content on the device, so that's normal - and I'll be keeping a close eye on 2.x to 2.x updates to see if they work correctly.

@mhubig
Copy link

mhubig commented Mar 21, 2023

Automatic UDM Pro update from version 1.12.38 to 2.5.17 wiped the Tailscale installation. Reinstalling with curl -sSLq https://raw.github.com/SierraSoftworks/tailscale-udm/main/install.sh | sh immediately fixed the issue.

@GlitchWitch
Copy link

GlitchWitch commented Mar 26, 2023

Just had our UDM Pro upgrade from 2.4.27 to 2.5.17, Tailscale did not stick around with it and the UDM has shown offline in the tailscale machine's list since the upgrade completed.

When we SSH in, it seems tailscale is no longer installed but the configuration remains.

Reinstalling and reissuing tailscale up allows it to connect again without any further configuration.

Is there any extra data we can provide to help with troubleshooting @notheotherben

@notheotherben
Copy link
Member

Thanks @GlitchWitch, I've put together #54 with the goal of solving the persistence issues (and implementing the auto-update functionality). That's going to require some testing (with a firmware upgrade on an eligible device). I've included testing steps in #54 and I'll look to get that PR merged once I (or someone else) has had a chance to confirm that it works correctly.

@notheotherben
Copy link
Member

Okay folks, I've got #54 tested and working on my local UDM, I'll get that packaged up and a new release out shortly.

@notheotherben
Copy link
Member

...and you'll find the release notes for v2.4.0 here.

Please let me know if you run into any issues at all with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants