Skip to content

[registry-facade] Support zero-downtime updates #2601

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

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Conversation

csweichel
Copy link
Contributor

@csweichel csweichel commented Dec 18, 2020

This PR adds live socket handover support to registry-facade. Through this method we can update registry-facade without any downtime. The process is described in #2512.

To make the handover work, we have to run registry-facade in the hostNetwork. Otherwise we'd attempt to re-use a socket in a network namespace that no longer exists. Hence, by default handover support is disabled.

How to test

TODO(cw)

Open Questions

  • Kubernetes just merged support for surge rollouts in daemonSets yet (KEP, PR). It will take a while until that becomes generally available. Until then we need some other convenient way to facilitate the handover, e.g. a separate daemonSet that can be deployed prior to the update. How would that look like? Would that be its own chart?

  • /werft https

  • /werft registry-facade-handover

@csweichel csweichel marked this pull request as ready for review December 21, 2020 11:39
@geropl
Copy link
Member

geropl commented Jan 8, 2021

/werft run

👍 started the job as gitpod-build-cw-regfac-handover.30

@geropl
Copy link
Member

geropl commented Jan 8, 2021

Sorry, had trouble to test. I did:

  • kubectl exec -it ws-daemon-dmlls -- sh
  • nsenter -t 1 -p -m (-m to be able to access the hostPath socket at /var/lib/gitpod/registry-facade-staging-cw-regfac-handover)
  • after time digging found the correct registry-facade's PID
  • but /proc/469480/exe handover /var/lib/gitpod/registry-facade-staging-cw-regfac-handover returns:
Error: dial unix /var/lib/gitpod/registry-facade-staging-cw-regfac-handover/rf-handover-1610115113.sock: connect: connection refused

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, works! 🎉

Deployment and actual applications follows in separate PR.

@csweichel csweichel force-pushed the cw/regfac-handover branch 2 times, most recently from 220909e to 11691ab Compare January 11, 2021 14:47
/werft registry-facade-handover
/werft https
@csweichel csweichel merged commit 596b59f into master Jan 11, 2021
@csweichel csweichel deleted the cw/regfac-handover branch January 11, 2021 14:57
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

Successfully merging this pull request may close these issues.

2 participants