-
Notifications
You must be signed in to change notification settings - Fork 84
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
Modal deployment does not maintain stable name #151
Comments
cc @pawalt who added the Modal instructions. Typically, you would resolve this by storing the Tailscale state directory on some kind of persistent volume, so it doesn't register a new device. I'm not sure if that's possible with Modal? Otherwise, registering as an ephemeral node might help clean up the old registered device more quickly, but I'm not sure how quickly Modal is re-registering nodes, to know if that would work. |
@willnorris where does this data live? The example uses a persistent volume to persist the data in sqlite, so I'm surprised to hear about this: @app.cls(
image=image,
secrets=[modal.Secret.from_name("golinks")],
volumes={"/root/.config": vol},
keep_warm=1,
concurrency_limit=1,
)
class Golinks:
@modal.enter()
def start_golinks(self):
subprocess.Popen(
[
"golink",
"-verbose",
"--sqlitedb",
"/root/.config/golink.db",
]
) We'll only spin up a new container if the old one crashes, so there shouldn't be a case where two are alive simultaneously. @dmvinson In your Modal dashboard, you can go to the |
Isn't the location that golink stores its sqlite database, and state in the directory the container starts up in: @pawalt The fact that You might have fs issues, but that also depends on how Modal works, and starts up the container. I believe the container starts as non-root user for me, and I had to set the override the securityContext:
# This is needed as its a "non-root" image, and otherwise /home/nonroot cannot be written to
# https://github.com/tailscale/golink#running-in-production
# https://github.com/tailscale/golink/issues/6
# https://github.com/tailscale/golink/pull/12
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532 Good luck! |
@tiesmaster This is because my example runs as root, and I also am pretty confident the tailscale auth data is being persisted properly. The key we minted for our golinks deployment isn't reusable, so restarts/reschedules would make the auth fail if we didn't have proper persistence. |
As of today, the modal setup instructions in the readme do not work at all. First, you need atleast go 1.23.1 to build golinks. Then, when starting, the container crash loops with:
Upon inspection, /root/.config contains go telemetry. I tried to change the mount and the sqlite path to /data, which works, but then I got the same issue as op, or atleast a similar one. When I stop a machine and deploy a new app, the ts state is apparently not persisted. I guess only the sqlite carries over. |
@Miladiir should we just lock the I'm still quite confused as to why the Tailscale data isn't persisting. From the readme:
For the root users, |
¯\_(ツ)_/¯ |
Hi, I tested out the modal deployment for the golinks server. I noticed that the modal server does not seem to maintain a stable hostname. After a while, I think because Modal restarts the container, the machine reregisters itself as
go-1
instead ofgo
for example. This continues to happen.I know the Modal deployment may not be officially supported, but is there a good way to fix this so I can use Modal hosting?
The text was updated successfully, but these errors were encountered: