forked from juanfont/headscale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR further improves the state management system and tries to make sure that we get all nodes in sync continously. This is greatly enabled by a previous PR dropping support for older clients that allowed us to use a Patch field only sending small diffs for client updates. It also reworks how the HA subnet router is handled and it should be a bit easier to follow now. Signed-off-by: Kristoffer Dalby <[email protected]>
- Loading branch information
Showing
33 changed files
with
2,770 additions
and
706 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
.github/workflows/test-integration-v2-TestHASubnetRouterFailover.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# DO NOT EDIT, generated with cmd/gh-action-integration-generator/main.go | ||
# To regenerate, run "go generate" in cmd/gh-action-integration-generator/ | ||
|
||
name: Integration Test v2 - TestHASubnetRouterFailover | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
TestHASubnetRouterFailover: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: satackey/action-docker-layer-caching@main | ||
continue-on-error: true | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
*.nix | ||
go.* | ||
**/*.go | ||
integration_test/ | ||
config-example.yaml | ||
- name: Run TestHASubnetRouterFailover | ||
uses: Wandalen/wretry.action@master | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
attempt_limit: 5 | ||
command: | | ||
nix develop --command -- docker run \ | ||
--tty --rm \ | ||
--volume ~/.cache/hs-integration-go:/go \ | ||
--name headscale-test-suite \ | ||
--volume $PWD:$PWD -w $PWD/integration \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
--volume $PWD/control_logs:/tmp/control \ | ||
golang:1 \ | ||
go run gotest.tools/gotestsum@latest -- ./... \ | ||
-failfast \ | ||
-timeout 120m \ | ||
-parallel 1 \ | ||
-run "^TestHASubnetRouterFailover$" | ||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: logs | ||
path: "control_logs/*.log" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: pprof | ||
path: "control_logs/*.pprof.tar" |
67 changes: 67 additions & 0 deletions
67
.github/workflows/test-integration-v2-TestNodeOnlineLastSeenStatus.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# DO NOT EDIT, generated with cmd/gh-action-integration-generator/main.go | ||
# To regenerate, run "go generate" in cmd/gh-action-integration-generator/ | ||
|
||
name: Integration Test v2 - TestNodeOnlineLastSeenStatus | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
TestNodeOnlineLastSeenStatus: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: satackey/action-docker-layer-caching@main | ||
continue-on-error: true | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
*.nix | ||
go.* | ||
**/*.go | ||
integration_test/ | ||
config-example.yaml | ||
- name: Run TestNodeOnlineLastSeenStatus | ||
uses: Wandalen/wretry.action@master | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
attempt_limit: 5 | ||
command: | | ||
nix develop --command -- docker run \ | ||
--tty --rm \ | ||
--volume ~/.cache/hs-integration-go:/go \ | ||
--name headscale-test-suite \ | ||
--volume $PWD:$PWD -w $PWD/integration \ | ||
--volume /var/run/docker.sock:/var/run/docker.sock \ | ||
--volume $PWD/control_logs:/tmp/control \ | ||
golang:1 \ | ||
go run gotest.tools/gotestsum@latest -- ./... \ | ||
-failfast \ | ||
-timeout 120m \ | ||
-parallel 1 \ | ||
-run "^TestNodeOnlineLastSeenStatus$" | ||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: logs | ||
path: "control_logs/*.log" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() && steps.changed-files.outputs.any_changed == 'true' | ||
with: | ||
name: pprof | ||
path: "control_logs/*.pprof.tar" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.