Skip to content

Commit

Permalink
workflows: fix Relay pgrep check when using additional flags
Browse files Browse the repository at this point in the history
When passing additional flags to `cilium hubble port-forward`, both the
original command and `kubectl` child process might be conflated with
additional flags.

We add wildcards for matching the additional flags to both `pkill`
cleanups and `pgrep` port-forward success checks.

Fixes 00ae9fb
Follow-up to #16787

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
  • Loading branch information
nbusseneau committed Jul 8, 2021
1 parent 9c80044 commit c4e66de
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/conformance-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand All @@ -257,7 +257,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Create custom IPsec secret
run: |
Expand All @@ -280,7 +280,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-aws-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/conformance-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand All @@ -232,7 +232,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Create custom IPsec secret
run: |
Expand All @@ -255,7 +255,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/conformance-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand All @@ -216,7 +216,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Install Cilium with tunnel datapath
run: |
Expand All @@ -235,7 +235,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Restart connectivity test pods
run: |
Expand All @@ -249,7 +249,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Create custom IPsec secret
run: |
Expand All @@ -272,7 +272,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Restart connectivity test pods
run: |
Expand All @@ -287,7 +287,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Install Cilium with encryption and tunnel datapath
run: |
Expand All @@ -307,7 +307,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/conformance-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Clean up Cilium
run: |
cilium uninstall --wait
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay"
- name: Install Cilium with encryption
run: |
Expand All @@ -117,7 +117,7 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ jobs:
run: |
cilium hubble port-forward --context ${{ steps.contexts.outputs.context1 }}&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down

0 comments on commit c4e66de

Please sign in to comment.