Repository navigation
fix(install): an upgrade makes Traefik's routes readable, and checks it serves the dashboard - #27
Merged
Merged
Conversation
…it serves the dashboard The update from 2.1 to 2.2 could leave every URL answering Traefik's own 404: 2.1 wrote the routes for Spawner alone (0640), Traefik runs without capabilities since 2.2, and Traefik 3.7 never starts its file provider again once it could not read its directory or a route. - install.sh makes the route directory and files readable (755, 644) before it starts the stack, and stops Traefik when one was not, for the stack to start it again. The entrypoint does it for the directory too. - wait_served first checks that Traefik serves the dashboard, over HTTPS with any certificate: a Traefik that routes nothing fails the installation and puts an upgrade back, rather than pass for a certificate on its way. - scripts/e2e-upgrade.sh, a new CI job: installs the latest release, deploys two environments, and upgrades to the build with install.sh over routes as 2.1 wrote them, then from the dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The update from 2.1 to 2.2 could leave every URL of a server answering Traefik's own
404 page not found, the dashboard's included. Spawner 2.1 wrote the routes for its own user (0640), Traefik runs without capabilities since 2.2, and Traefik 3.7 never starts its file provider again once it could not read its directory or a route at start. The upgrade itself passed:wait_servedwaited for a certificate and only warned.install.shmakestraefik/and its routes readable (755, 644) before it starts the stack (make_routes_readable), and stops Traefik when one was not, so that the stack starts it again. Spawner's entrypoint makes the directory readable too, for a stack the installer did not start.wait_servedfirst checks that Traefik serves the dashboard (/api/v1/healthz, over HTTPS with any certificate): a Traefik that routes nothing fails the installation and puts an upgrade back, rather than pass for a certificate on its way.scripts/e2e-upgrade.sh, a new CI job "Upgrade from the latest release": installs the latest release with its owninstall.sh(checked against itsSHA256SUMS), deploysexamples/node-postgrestwice with its CLI, a row in each database, one environment asleep, then upgrades to the build, twice: with thisinstall.sh --upgradeover routes as 2.1 wrote them (Traefik answering its 404), then from the dashboard. Each time it checks through Traefik: the backup, the routes' modes, the dashboard, a 401 without a token and the page with one, the waiting page and the wake-up, the data kept.A server still on 2.1 can then update straight to the next release. The new job is not a required check of the master ruleset yet.
Checks
CHANGELOG.mdupdated when the behaviour changesscripts/e2e-upgrade.shchanges the machine it runs on: it runs in CI only. Its first run is this pull request.