Skip to content

Commit 6309d08

Browse files
Apply Docker iptables workaround and set a job timeout
1 parent 4105f05 commit 6309d08

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build-snap.yml

+22
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
sudo lxd init --auto
1919
sudo usermod --append --groups lxd $USER
2020
sg lxd -c 'lxc version'
21+
# Docker sets iptables rules that interfere with LXD or K8s.
22+
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker
23+
- name: Apply Docker iptables workaround
24+
shell: bash
25+
run: sudo iptables -I DOCKER-USER -j ACCEPT
2126
- name: Install snapcraft
2227
run: |
2328
sudo snap install snapcraft --classic
@@ -64,6 +69,7 @@ jobs:
6469
name: Test core addons
6570
runs-on: ubuntu-22.04
6671
needs: build
72+
timeout-minutes: 30
6773

6874
steps:
6975
- name: Checking out repo
@@ -76,6 +82,11 @@ jobs:
7682
sudo pip3 install -U pytest==8.3.4 sh psutil
7783
sudo apt-get -y install open-iscsi
7884
sudo systemctl enable iscsid
85+
# Docker sets iptables rules that interfere with LXD or K8s.
86+
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker
87+
- name: Apply Docker iptables workaround
88+
shell: bash
89+
run: sudo iptables -I DOCKER-USER -j ACCEPT
7990
- name: Fetch snap
8091
uses: actions/download-artifact@v4
8192
with:
@@ -127,6 +138,7 @@ jobs:
127138
name: Test core addons upgrade
128139
runs-on: ubuntu-22.04
129140
needs: build
141+
timeout-minutes: 30
130142

131143
steps:
132144
- name: Checking out repo
@@ -141,6 +153,11 @@ jobs:
141153
sudo pip3 install -U pytest sh psutil
142154
sudo apt-get -y install open-iscsi
143155
sudo systemctl enable iscsid
156+
# Docker sets iptables rules that interfere with LXD or K8s.
157+
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker
158+
- name: Apply Docker iptables workaround
159+
shell: bash
160+
run: sudo iptables -I DOCKER-USER -j ACCEPT
144161
- name: Fetch snap
145162
uses: actions/download-artifact@v4
146163
with:
@@ -197,6 +214,11 @@ jobs:
197214
sudo lxc network set lxdbr0 ipv6.address=none
198215
sudo usermod --append --groups lxd $USER
199216
sg lxd -c 'lxc version'
217+
# Docker sets iptables rules that interfere with LXD or K8s.
218+
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker
219+
- name: Apply Docker iptables workaround
220+
shell: bash
221+
run: sudo iptables -I DOCKER-USER -j ACCEPT
200222
- name: Run airgap tests
201223
run: |
202224
sudo -E bash -x -c "./tests/libs/airgap.sh --distro ubuntu:22.04 --channel $PWD/build/microk8s.snap"

0 commit comments

Comments
 (0)