Skip to content

Commit

Permalink
remove dispatcher and reliable:
Browse files Browse the repository at this point in the history
- still integration test failing due to lack of
  support for SCMP handling and more
  • Loading branch information
JordiSubira committed May 17, 2023
1 parent 53c741d commit 66ef8b7
Show file tree
Hide file tree
Showing 110 changed files with 121 additions and 9,019 deletions.
5 changes: 1 addition & 4 deletions .golangcilint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,4 @@ issues:
^control/colibri/reservation/reservationdbtest/reservationdbtest.go$|\
^control/colibri/reservation/segment/reservation_test.go$|\
^control/colibri/reservation/sqlite/db_test.go$|\
^control/colibri/reservationstore/store.go$|\
^pkg/sock/reliable/reconnect/conn_io_test.go$|\
^pkg/sock/reliable/reconnect/network_test.go$|\
^pkg/sock/reliable/reconnect/reconnecter_test.go$"
^control/colibri/reservationstore/store.go$|\"
1 change: 0 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ pkg_tar(
srcs = [
"//control/cmd/control",
"//daemon/cmd/daemon",
"//dispatcher/cmd/dispatcher",
"//gateway/cmd/gateway",
"//router/cmd/router",
"//scion-pki/cmd/scion-pki",
Expand Down
1 change: 0 additions & 1 deletion acceptance/common/topogen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def container_loaders(tester, gateway):
images = {
"control:latest": "//docker:control",
"daemon:latest": "//docker:daemon",
"dispatcher:latest": "//docker:dispatcher",
"tester:latest": tester,
"posix-router:latest": "//docker:posix_router",
}
Expand Down
16 changes: 15 additions & 1 deletion acceptance/hidden_paths/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,20 @@ class Test(base.TestTopogen):

http_server_port = 9099

_testers = {
"2": "tester_1-ff00_0_2",
"3": "tester_1-ff00_0_3",
"4": "tester_1-ff00_0_4",
"5": "tester_1-ff00_0_5",
}
_ases = {
"2": "1-ff00:0:2",
"3": "1-ff00:0:3",
"4": "1-ff00:0:4",
"5": "1-ff00:0:5",
}


def setup_prepare(self):
super().setup_prepare()

Expand Down Expand Up @@ -114,7 +128,7 @@ def setup_start(self):
server_thread.start()

super().setup_start()
time.sleep(4) # Give applications time to download configurations
time.sleep(10) # Give applications time to download configurations

server.shutdown()

Expand Down
24 changes: 0 additions & 24 deletions acceptance/sig_short_exp_time/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ sh_test(
srcs = ["test"],
data = [
"docker-compose.yml",
":dispatcher1.tar",
":dispatcher2.tar",
":sig1.tar",
":sig2.tar",
":udpproxy.tar",
Expand All @@ -24,28 +22,6 @@ container_image(
base = "//tools/udpproxy",
)

container_image(
name = "dispatcher1",
base = "//docker:dispatcher",
cmd = [
"--config",
"/disp.toml",
],
entrypoint = ["/app/dispatcher"],
files = ["testdata/1-ff00_0_110/dispatcher/disp.toml"],
)

container_image(
name = "dispatcher2",
base = "//docker:dispatcher",
cmd = [
"--config",
"/disp.toml",
],
entrypoint = ["/app/dispatcher"],
files = ["testdata/1-ff00_0_111/dispatcher/disp.toml"],
)

container_image(
name = "sig1",
base = "//docker:posix_gateway",
Expand Down
40 changes: 12 additions & 28 deletions acceptance/sig_short_exp_time/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,58 +42,42 @@ services:
ipv4_address: 242.254.100.4
bridge2:
ipv4_address: 242.254.200.4
dispatcher1:
container_name: dispatcher1
image: bazel/acceptance/sig_short_exp_time:dispatcher1
networks:
bridge1:
ipv4_address: 242.254.100.2
volumes:
- vol_scion_disp_sig1-ff00_0_110:/run/shm/dispatcher:rw
dispatcher2:
container_name: dispatcher2
image: bazel/acceptance/sig_short_exp_time:dispatcher2
networks:
bridge2:
ipv4_address: 242.254.200.2
volumes:
- vol_scion_disp_sig1-ff00_0_111:/run/shm/dispatcher:rw
sig1:
cap_add:
- NET_ADMIN
container_name: sig1
depends_on:
- dispatcher1
image: bazel/acceptance/sig_short_exp_time:sig1
network_mode: service:dispatcher1
networks:
bridge1:
ipv4_address: 242.254.100.2
privileged: true
volumes:
- vol_scion_disp_sig1-ff00_0_110:/run/shm/dispatcher:rw
- /dev/net/tun:/dev/net/tun
sig2:
cap_add:
- NET_ADMIN
container_name: sig2
depends_on:
- dispatcher2
image: bazel/acceptance/sig_short_exp_time:sig2
network_mode: service:dispatcher2
networks:
bridge2:
ipv4_address: 242.254.200.2
privileged: true
volumes:
- vol_scion_disp_sig1-ff00_0_111:/run/shm/dispatcher:rw
- /dev/net/tun:/dev/net/tun
tester1:
container_name: tester1
image: alpine
network_mode: service:dispatcher1
networks:
bridge1:
ipv4_address: 242.254.100.10
privileged: true
tester2:
container_name: tester2
image: alpine
network_mode: service:dispatcher2
networks:
bridge2:
ipv4_address: 242.254.200.10
privileged: true
version: '2.4'
volumes:
vol_logs: null
vol_scion_disp_sig1-ff00_0_110: null
vol_scion_disp_sig1-ff00_0_111: null
8 changes: 3 additions & 5 deletions acceptance/sig_short_exp_time/test
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,16 @@
# | |
# | +---------------------------------------------+ |
# +---+ pathb +----
# | 242.254.100.3:50000 <-> 242.254.200.4:50000 |
# | 242.254.100.4:50000 <-> 242.254.200.4:50000 |
# +---------------------------------------------+

run_test() {(set -e
# Register with the docker daemon the docker images bazel created
docker image load -i acceptance/sig_short_exp_time/udpproxy.tar
docker image load -i acceptance/sig_short_exp_time/dispatcher1.tar
docker image load -i acceptance/sig_short_exp_time/dispatcher2.tar
docker image load -i acceptance/sig_short_exp_time/sig1.tar
docker image load -i acceptance/sig_short_exp_time/sig2.tar

docker-compose -f acceptance/sig_short_exp_time/docker-compose.yml up -d dispatcher1 dispatcher2 sig1 sig2 patha pathb
docker-compose -f acceptance/sig_short_exp_time/docker-compose.yml up -d sig1 sig2 patha pathb

# Set up forward route on network stack 1 and 2 through the sig tunnel
# device. The route is a property of the network stack, and persists after
Expand Down Expand Up @@ -103,7 +101,7 @@ RC=$?
OUTPUT_DIR=$TEST_UNDECLARED_OUTPUTS_DIR
mkdir -p $OUTPUT_DIR/logs

for CNTR in sig1 sig2 dispatcher1 dispatcher2; do
for CNTR in sig1 sig2; do
docker-compose -f acceptance/sig_short_exp_time/docker-compose.yml logs "$CNTR" > "$OUTPUT_DIR/logs/$CNTR.log"
done

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[dispatcher]
id = "disp_1-ff00_0_110"

[log.console]
level = "debug"
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[dispatcher]
id = "disp_1-ff00_0_111"

[log.console]
level = "debug"
12 changes: 0 additions & 12 deletions acceptance/topo_cs_reload/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ go_test(
"docker-compose.yml",
"testdata/topology_reload.json",
":control.tar",
":dispatcher.tar",
":invalid_changed_ip",
":invalid_changed_port",
":testdata/gen_crypto.sh",
Expand All @@ -36,17 +35,6 @@ go_test(
],
)

container_image(
name = "dispatcher",
base = "//docker:dispatcher",
cmd = [
"--config",
"/disp.toml",
],
entrypoint = ["/app/dispatcher"],
files = ["testdata/disp.toml"],
)

container_image(
name = "control",
base = "//docker:control",
Expand Down
17 changes: 3 additions & 14 deletions acceptance/topo_cs_reload/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,14 @@ networks:
config:
- subnet: 242.253.100.0/24
services:
topo_cs_reload_dispatcher:
container_name: topo_cs_reload_dispatcher
image: bazel/acceptance/topo_cs_reload:dispatcher
networks:
bridge1:
ipv4_address: 242.253.100.2
volumes:
- vol_topo_cs_reload_disp:/run/shm/dispatcher:rw
topo_cs_reload_control_srv:
container_name: topo_cs_reload_control_srv
image: bazel/acceptance/topo_cs_reload:control
depends_on:
- topo_cs_reload_dispatcher
volumes:
- vol_topo_cs_reload_disp:/run/shm/dispatcher:ro
- "${TOPO_CS_RELOAD_CONFIG_DIR}/certs:/certs:ro"
- "${TOPO_CS_RELOAD_CONFIG_DIR}/keys:/keys:ro"
- "${TOPO_CS_RELOAD_CONFIG_DIR}/crypto:/crypto:ro"
network_mode: service:topo_cs_reload_dispatcher
networks:
bridge1:
ipv4_address: 242.253.100.2
version: '2.4'
volumes:
vol_topo_cs_reload_disp: null
2 changes: 0 additions & 2 deletions acceptance/topo_cs_reload/reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func setupTest(t *testing.T) testState {
s.mustExec(t, "tar", "-xf", "crypto.tar", "-C", tmpDir)
// first load the docker images from bazel into the docker deamon, the
// tars are in the same folder as this test runs in bazel.
s.mustExec(t, "docker", "image", "load", "-i", "dispatcher.tar")
s.mustExec(t, "docker", "image", "load", "-i", "control.tar")
// now start the docker containers
s.mustExec(t, "docker-compose", "-f", "docker-compose.yml", "up", "-d")
Expand All @@ -119,7 +118,6 @@ func (s testState) teardownTest(t *testing.T) {
require.NoError(t, os.MkdirAll(fmt.Sprintf("%s/logs", outdir), os.ModePerm|os.ModeDir))
// collect logs
for service, file := range map[string]string{
"topo_cs_reload_dispatcher": "disp.log",
"topo_cs_reload_control_srv": "control.log",
} {
cmd := exec.Command("docker-compose", "-f", "docker-compose.yml", "logs", "--no-color",
Expand Down
1 change: 0 additions & 1 deletion acceptance/topo_cs_reload/testdata/cs.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[general]
reconnect_to_dispatcher = true
config_dir = "/"
id = "cs1-ff00_0_110-1"

Expand Down
5 changes: 0 additions & 5 deletions acceptance/topo_cs_reload/testdata/disp.toml

This file was deleted.

1 change: 0 additions & 1 deletion acceptance/topo_cs_reload/testdata/sd.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[general]
reconnect_to_dispatcher = true
config_dir = "/"
id = "sd1-ff00_0_110"

Expand Down
12 changes: 0 additions & 12 deletions acceptance/topo_daemon_reload/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ go_test(
data = [
"testdata/topology_reload.json",
":daemon.tar",
":dispatcher.tar",
":docker-compose.yml",
"//acceptance/topo_common:invalid_reloads",
"//acceptance/topo_common:topology",
Expand All @@ -23,17 +22,6 @@ go_test(
],
)

container_image(
name = "dispatcher",
base = "//docker:dispatcher",
cmd = [
"--config",
"/disp.toml",
],
entrypoint = ["/app/dispatcher"],
files = ["testdata/disp.toml"],
)

container_image(
name = "daemon",
base = "//docker:daemon",
Expand Down
14 changes: 3 additions & 11 deletions acceptance/topo_daemon_reload/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ networks:
config:
- subnet: 242.254.100.0/24
services:
topo_daemon_reload_dispatcher:
container_name: topo_daemon_reload_dispatcher
image: bazel/acceptance/topo_daemon_reload:dispatcher
networks:
bridge1:
ipv4_address: 242.254.100.2
volumes:
- vol_topo_daemon_reload_disp:/run/shm/dispatcher:rw
topo_daemon_reload_daemon:
container_name: topo_daemon_reload_daemon
image: bazel/acceptance/topo_daemon_reload:daemon
networks:
bridge1:
ipv4_address: 242.254.100.2
volumes:
- vol_topo_daemon_reload_disp:/run/shm/dispatcher:ro
- vol_topo_daemon_reload_certs:/certs:ro
network_mode: service:topo_daemon_reload_dispatcher
version: '2.4'
volumes:
vol_topo_daemon_reload_disp: null
vol_topo_daemon_reload_certs: null
6 changes: 2 additions & 4 deletions acceptance/topo_daemon_reload/reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ func TestSDTopoReload(t *testing.T) {
func setupTest(t *testing.T) {
// first load the docker images from bazel into the docker deamon, the
// tars are in the same folder as this test runs in bazel.
mustExec(t, "docker", "image", "load", "-i", "dispatcher.tar")
mustExec(t, "docker", "image", "load", "-i", "daemon.tar")
// now start the docker containers
mustExec(t, "docker-compose", "-f", "docker-compose.yml", "up",
"-d", "topo_daemon_reload_dispatcher", "topo_daemon_reload_daemon")
"-d", "topo_daemon_reload_daemon")
// wait a bit to make sure the containers are ready.
time.Sleep(time.Second / 2)
t.Log("Test setup done")
Expand All @@ -82,8 +81,7 @@ func teardownTest(t *testing.T) {
require.NoError(t, os.MkdirAll(fmt.Sprintf("%s/logs", outdir), os.ModePerm|os.ModeDir))
// collect logs
for service, file := range map[string]string{
"topo_daemon_reload_dispatcher": "disp.log",
"topo_daemon_reload_daemon": "daemon.log",
"topo_daemon_reload_daemon": "daemon.log",
} {
cmd := exec.Command("docker-compose", "-f", "docker-compose.yml", "logs", "--no-color",
service)
Expand Down
5 changes: 0 additions & 5 deletions acceptance/topo_daemon_reload/testdata/disp.toml

This file was deleted.

1 change: 0 additions & 1 deletion acceptance/topo_daemon_reload/testdata/sd.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[general]
reconnect_to_dispatcher = true
config_dir = "/"
id = "sd1-ff00_0_110"

Expand Down
2 changes: 1 addition & 1 deletion acceptance/trc_update/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _run(self):

for cs in cs_services:
self.dc.start_container(cs)
time.sleep(5)
time.sleep(20)

logger.info('==> Check connectivity')
end2end("-d", "-outDir", artifacts)
Expand Down
Loading

0 comments on commit 66ef8b7

Please sign in to comment.