Skip to content

Commit

Permalink
conformance-ipsec-e2e: run leak check before/after key rotation
Browse files Browse the repository at this point in the history
This is because we saw a racing issue if leak detection covers the whole
rotation + conn-disrupt-check: cilium connectivity will remove
conn-disrupt pods in the end of connectivity test, leaving some linger
packets recognized as leaked traffic.

This commit avoids the issue by running leak checks separately for key
rotation and after-rotation test.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
Signed-off-by: gray <gray.liang@isovalent.com>
  • Loading branch information
julianwiedmann authored and pchaigno committed Jun 10, 2024
1 parent 230c200 commit 4e2a66d
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/conformance-ipsec-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ jobs:
--junit-property github_job_step="Run tests (${{ join(matrix.*, ', ') }})" \
--flush-ct
- name: Assert that no unencrypted packets are leaked
uses: ./.github/actions/bpftrace/check

- name: Start unencrypted packets check for key rotation
uses: ./.github/actions/bpftrace/start
with:
script: ./.github/actions/bpftrace/scripts/check-ipsec-leaks.bt
args: ${{ steps.bpftrace-params.outputs.params }} "false"

- name: Setup conn-disrupt-test before rotating (${{ join(matrix.*, ', ') }})
uses: ./.github/actions/conn-disrupt-test-setup

Expand All @@ -349,12 +358,31 @@ jobs:
key-type-two: ${{ matrix.key-type-two }}
encryption-overlay: ${{ matrix.encryption-overlay }}

- name: Assert that no unencrypted packets are leaked during key rotation
uses: ./.github/actions/bpftrace/check

- name: Check conn-disrupt-test after rotating (${{ join(matrix.*, ', ') }})
uses: ./.github/actions/conn-disrupt-test-check

- name: Start unencrypted packets check for tests
uses: ./.github/actions/bpftrace/start
with:
full-test: 'true'
script: ./.github/actions/bpftrace/scripts/check-ipsec-leaks.bt
args: ${{ steps.bpftrace-params.outputs.params }} "true"

- name: Assert that no unencrypted packets are leaked
- name: Run tests (${{ join(matrix.*, ', ') }})
shell: bash
run: |
mkdir -p cilium-junits
./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \
--sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \
--sysdump-output-filename "cilium-sysdump-${{ matrix.name }}-<ts>" \
--junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \
--junit-property github_job_step="Run tests (${{ join(matrix.*, ', ') }})" \
--flush-ct
- name: Assert that no unencrypted packets are leaked during tests
uses: ./.github/actions/bpftrace/check

- name: Fetch artifacts
Expand Down

0 comments on commit 4e2a66d

Please sign in to comment.