Skip to content

Commit 3e20b58

Browse files
committed
JD, CL node DNS isolation, update troubleshooting
1 parent 99a55e5 commit 3e20b58

File tree

10 files changed

+19
-240
lines changed

10 files changed

+19
-240
lines changed

book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- [Components Cleanup](framework/components/cleanup.md)
2626
- [Components Caching](framework/components/caching.md)
2727
- [Components Resources](framework/components/resources.md)
28+
- [Containers Network Isolation](framework/components/network_isolation.md)
2829
- [Mocking Services](framework/components/mocking.md)
2930
- [Copying Files](framework/copying_files.md)
3031
- [External Environment](framework/components/external.md)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Containers Network Isolation
2+
3+
Some components can be isolated from internet. Since some of them doesn't have `iptables` and must be accessible from local host for debugging we isolate network on DNS level
4+
5+
```
6+
[jd]
7+
# JobDistributor is isolated by default, this flag MUST not be changed!
8+
no_dns = true
9+
10+
[[nodesets]]
11+
# NodeSet DNS can be isolated if needed
12+
no_dns = true
13+
```

framework/.changeset/v0.7.6.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Add troubleshooting for observability stack and file access
2+
- Add DNS isolation for CL node and JD + test

framework/components/simple_node_set/node_set.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ func sharedDBSetup(in *Input, bcOut *blockchain.Output) (*Output, error) {
136136
nodeWithNodeSetPrefixName := fmt.Sprintf("%s-%s", in.Name, nodeName)
137137

138138
nodeSpec := &clnode.Input{
139+
NoDNS: in.NoDNS,
139140
DbInput: in.DbInput,
140141
Node: &clnode.NodeInput{
141142
HTTPPort: httpPortRangeStart + i,

framework/examples/myproject/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ replace (
1111
require (
1212
github.com/block-vision/sui-go-sdk v1.0.6
1313
github.com/blocto/solana-go-sdk v1.30.0
14-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
1514
github.com/ethereum/go-ethereum v1.15.0
1615
github.com/go-resty/resty/v2 v2.16.3
1716
github.com/smartcontractkit/chainlink-testing-framework/framework v0.7.4
@@ -83,6 +82,7 @@ require (
8382
github.com/cpuguy83/dockercfg v0.3.2 // indirect
8483
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
8584
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
85+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
8686
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
8787
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
8888
github.com/dennwc/varint v1.0.0 // indirect

framework/examples/myproject/smoke.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
[data_provider]
77
port = 9111
88

9-
[jd]
10-
image = "job-distributor:0.9.0"
11-
129
[[nodesets]]
1310
name = "don"
1411
nodes = 5

framework/examples/myproject/smoke_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
package examples
22

33
import (
4-
"fmt"
54
"testing"
65

7-
"github.com/davecgh/go-spew/spew"
86
"github.com/stretchr/testify/require"
97

108
"github.com/smartcontractkit/chainlink-testing-framework/framework"
119
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
1210
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake"
13-
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/jd"
14-
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/networktest"
1511
ns "github.com/smartcontractkit/chainlink-testing-framework/framework/components/simple_node_set"
1612
)
1713

1814
type Cfg struct {
1915
BlockchainA *blockchain.Input `toml:"blockchain_a" validate:"required"`
2016
MockerDataProvider *fake.Input `toml:"data_provider" validate:"required"`
2117
NodeSets []*ns.Input `toml:"nodesets" validate:"required"`
22-
JD *jd.Input `toml:"jd" validate:"required"`
2318
}
2419

2520
func TestSmoke(t *testing.T) {
@@ -32,16 +27,6 @@ func TestSmoke(t *testing.T) {
3227
require.NoError(t, err)
3328
out, err := ns.NewSharedDBNodeSet(in.NodeSets[0], bc)
3429
require.NoError(t, err)
35-
_, err = jd.NewJD(in.JD)
36-
require.NoError(t, err)
37-
spew.Dump(in.NodeSets[0])
38-
_, err = networktest.NewNetworkTest(networktest.Input{Privileged: true, BlockInternet: true})
39-
require.NoError(t, err)
40-
dc, err := framework.NewDockerClient()
41-
require.NoError(t, err)
42-
sOut, err := dc.ExecContainer("networktest", []string{"ping", "-c", "2", "google.com"})
43-
require.NoError(t, err)
44-
fmt.Println(sOut)
4530

4631
t.Run("test something", func(t *testing.T) {
4732
for _, n := range out.CLNodes {

framework/examples/myproject_cll/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ docker build -t job-distributor:0.9.0 -f e2e/Dockerfile.e2e .
1212
Run the tests locally
1313
```
1414
CTF_CONFIGS=jd.toml go test -v -count 1 -run TestJD
15-
CTF_CONFIGS=jd_fork.toml go test -v -count 1 -run TestJDFork
1615
```

framework/examples/myproject_cll/go.mod

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ replace (
88
)
99

1010
require (
11-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
1211
github.com/smartcontractkit/chainlink-testing-framework/framework v0.0.0-00010101000000-000000000000
1312
github.com/stretchr/testify v1.10.0
1413
)
@@ -17,8 +16,6 @@ require (
1716
dario.cat/mergo v1.0.1 // indirect
1817
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
1918
github.com/Microsoft/go-winio v0.6.2 // indirect
20-
github.com/StackExchange/wmi v1.2.1 // indirect
21-
github.com/avast/retry-go/v4 v4.6.1 // indirect
2219
github.com/aws/aws-sdk-go-v2 v1.32.5 // indirect
2320
github.com/aws/aws-sdk-go-v2/config v1.28.4 // indirect
2421
github.com/aws/aws-sdk-go-v2/credentials v1.17.45 // indirect
@@ -33,65 +30,41 @@ require (
3330
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect
3431
github.com/aws/aws-sdk-go-v2/service/sts v1.33.0 // indirect
3532
github.com/aws/smithy-go v1.22.1 // indirect
36-
github.com/bits-and-blooms/bitset v1.17.0 // indirect
3733
github.com/block-vision/sui-go-sdk v1.0.6 // indirect
38-
github.com/bytedance/sonic v1.12.3 // indirect
39-
github.com/bytedance/sonic/loader v0.2.0 // indirect
4034
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
41-
github.com/cloudwego/base64x v0.1.4 // indirect
42-
github.com/cloudwego/iasm v0.2.0 // indirect
43-
github.com/consensys/bavard v0.1.22 // indirect
44-
github.com/consensys/gnark-crypto v0.14.0 // indirect
4535
github.com/containerd/log v0.1.0 // indirect
4636
github.com/containerd/platforms v0.2.1 // indirect
4737
github.com/cpuguy83/dockercfg v0.3.2 // indirect
48-
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
49-
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
50-
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
51-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
38+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5239
github.com/distribution/reference v0.6.0 // indirect
5340
github.com/docker/docker v28.0.1+incompatible // indirect
5441
github.com/docker/go-connections v0.5.0 // indirect
5542
github.com/docker/go-units v0.5.0 // indirect
5643
github.com/ebitengine/purego v0.8.2 // indirect
57-
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
58-
github.com/ethereum/go-ethereum v1.15.0 // indirect
59-
github.com/ethereum/go-verkle v0.2.2 // indirect
6044
github.com/felixge/httpsnoop v1.0.4 // indirect
61-
github.com/fsnotify/fsnotify v1.6.0 // indirect
6245
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
63-
github.com/gin-contrib/sse v0.1.0 // indirect
64-
github.com/gin-gonic/gin v1.10.0 // indirect
6546
github.com/go-logr/logr v1.4.2 // indirect
6647
github.com/go-logr/stdr v1.2.2 // indirect
6748
github.com/go-ole/go-ole v1.3.0 // indirect
6849
github.com/go-playground/locales v0.14.1 // indirect
6950
github.com/go-playground/universal-translator v0.18.1 // indirect
7051
github.com/go-playground/validator/v10 v10.22.1 // indirect
7152
github.com/go-resty/resty/v2 v2.15.3 // indirect
72-
github.com/goccy/go-json v0.10.3 // indirect
7353
github.com/gogo/protobuf v1.3.2 // indirect
7454
github.com/google/uuid v1.6.0 // indirect
75-
github.com/gorilla/websocket v1.5.1 // indirect
7655
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect
77-
github.com/holiman/uint256 v1.3.2 // indirect
78-
github.com/json-iterator/go v1.1.12 // indirect
7956
github.com/klauspost/compress v1.17.9 // indirect
80-
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
8157
github.com/leodido/go-urn v1.4.0 // indirect
8258
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
8359
github.com/magiconair/properties v1.8.9 // indirect
8460
github.com/mattn/go-colorable v0.1.13 // indirect
8561
github.com/mattn/go-isatty v0.0.20 // indirect
86-
github.com/mmcloughlin/addchain v0.4.0 // indirect
8762
github.com/moby/docker-image-spec v1.3.1 // indirect
8863
github.com/moby/patternmatcher v0.6.0 // indirect
8964
github.com/moby/sys/sequential v0.5.0 // indirect
9065
github.com/moby/sys/user v0.1.0 // indirect
9166
github.com/moby/sys/userns v0.1.0 // indirect
9267
github.com/moby/term v0.5.0 // indirect
93-
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
94-
github.com/modern-go/reflect2 v1.0.2 // indirect
9568
github.com/morikuni/aec v1.0.0 // indirect
9669
github.com/opencontainers/go-digest v1.0.0 // indirect
9770
github.com/opencontainers/image-spec v1.1.1 // indirect
@@ -100,18 +73,14 @@ require (
10073
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
10174
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
10275
github.com/rs/zerolog v1.33.0 // indirect
103-
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
10476
github.com/shirou/gopsutil/v4 v4.25.1 // indirect
10577
github.com/sirupsen/logrus v1.9.3 // indirect
106-
github.com/supranational/blst v0.3.13 // indirect
10778
github.com/testcontainers/testcontainers-go v0.36.0 // indirect
10879
github.com/tidwall/gjson v1.14.4 // indirect
10980
github.com/tidwall/match v1.1.1 // indirect
11081
github.com/tidwall/pretty v1.2.0 // indirect
11182
github.com/tklauser/go-sysconf v0.3.12 // indirect
11283
github.com/tklauser/numcpus v0.6.1 // indirect
113-
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
114-
github.com/ugorji/go/codec v1.2.12 // indirect
11584
github.com/yusufpapurcu/wmi v1.2.4 // indirect
11685
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
11786
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
@@ -121,9 +90,7 @@ require (
12190
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
12291
go.opentelemetry.io/otel/trace v1.35.0 // indirect
12392
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
124-
golang.org/x/arch v0.11.0 // indirect
12593
golang.org/x/crypto v0.32.0 // indirect
126-
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
12794
golang.org/x/net v0.34.0 // indirect
12895
golang.org/x/sync v0.10.0 // indirect
12996
golang.org/x/sys v0.31.0 // indirect
@@ -133,7 +100,5 @@ require (
133100
google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect
134101
google.golang.org/grpc v1.68.0 // indirect
135102
google.golang.org/protobuf v1.36.1 // indirect
136-
gopkg.in/guregu/null.v4 v4.0.0 // indirect
137103
gopkg.in/yaml.v3 v3.0.1 // indirect
138-
rsc.io/tmplfunc v0.0.3 // indirect
139104
)

0 commit comments

Comments
 (0)