From 1e4188277a7a94dfabdb57ca6b042b0b5597bd6a Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Wed, 11 Oct 2017 14:46:59 +0200 Subject: [PATCH 1/3] The WARN entries go away if we disable MDNS, but so does automagic discovery --- 10-ipfs-config.yml | 3 +++ README.md | 19 ------------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/10-ipfs-config.yml b/10-ipfs-config.yml index 60c6034..8a07e10 100644 --- a/10-ipfs-config.yml +++ b/10-ipfs-config.yml @@ -21,6 +21,9 @@ data: echo "Removing all bootstrap nodes..." echo "(see https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#private-networks)" ipfs bootstrap rm --all + + echo "Avoiding endless WARN log entries for MDNS" + ipfs config --bool Discovery.MDNS.Enabled false } # Always check for secret diff --git a/README.md b/README.md index f136817..5bf8dfa 100644 --- a/README.md +++ b/README.md @@ -34,25 +34,6 @@ kubectl -n ipfs get pods -o wide kubectl -n ipfs exec ipfs-0 -- ipfs swarm peers ``` -### Ongoing investigation - -Remains to investigate this log output -which repeats itself endlessly: -``` -DEBUG mdns: starting mdns query mdns.go:125 -DEBUG mdns: Handling MDNS entry: 172.17.0.13:4001 QmTgXq7EM2jyArCPAPKsBwdjCmbVqnypXouCxSWQNzPTrP mdns.go:147 -WARNI core: trying peer info: { [/ip4/172.17.0.13/tcp/4001]} core.go:390 -DEBUG mdns: Handling MDNS entry: 172.17.0.14:4001 QmXuE8WGu4pGNuUyz1bsMpwpZrShVDGpokSyWvCMuYCqNA mdns.go:147 -WARNI core: trying peer info: { [/ip4/172.17.0.14/tcp/4001]} core.go:390 -DEBUG core: no more bootstrap peers to create 1 connections bootstrap.go:141 -DEBUG core: bootstrap error: not enough bootstrap peers to bootstrap bootstrap.go:87 -DEBUG mdns: Handling MDNS entry: 172.17.0.12:4001 QmUKJ7Fze9kWaxgZR7vUzZzWFgcrAi6AQ3ciX7iCMKw4fn mdns.go:147 -DEBUG mdns: Handling MDNS entry: 172.17.0.10:4001 QmaoBGogYpHNBhnmpg5e6Hoerc45kdiwvgDEAk1wTrC1H2 mdns.go:147 -DEBUG mdns: got our own mdns entry, skipping mdns.go:155 -WARNI core: trying peer info: { [/ip4/172.17.0.12/tcp/4001]} core.go:390 -DEBUG mdns: mdns query complete mdns.go:138 -``` - ## Persistence Note that ipfs has no ambition to replicate all content across all nodes, From aa5ddffbf5f1050f5c8044eadd2011db8771df07 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Wed, 11 Oct 2017 15:01:47 +0200 Subject: [PATCH 2/3] Seems we get ok discovery with a 1 hr MDNS interval --- 10-ipfs-config.yml | 3 ++- 50ipfs.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/10-ipfs-config.yml b/10-ipfs-config.yml index 8a07e10..3e0fbe0 100644 --- a/10-ipfs-config.yml +++ b/10-ipfs-config.yml @@ -23,7 +23,8 @@ data: ipfs bootstrap rm --all echo "Avoiding endless WARN log entries for MDNS" - ipfs config --bool Discovery.MDNS.Enabled false + ipfs config --bool Discovery.MDNS.Enabled true + ipfs config --json Discovery.MDNS.Interval 3600 } # Always check for secret diff --git a/50ipfs.yml b/50ipfs.yml index f0b938f..a49a9a7 100644 --- a/50ipfs.yml +++ b/50ipfs.yml @@ -5,7 +5,7 @@ metadata: namespace: ipfs spec: serviceName: ipfs - replicas: 4 + replicas: 5 template: metadata: labels: From 13918a2aaf881707542e06d6fb60899e36b88295 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Wed, 11 Oct 2017 15:36:01 +0200 Subject: [PATCH 3/3] Support Prometheus service discovery, though ... from inspecting the output of curl $ipfs_api/debug/metrics/prometheus I see nothing that indicates swarm size --- 50ipfs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/50ipfs.yml b/50ipfs.yml index a49a9a7..faca5ff 100644 --- a/50ipfs.yml +++ b/50ipfs.yml @@ -10,6 +10,10 @@ spec: metadata: labels: app: ipfs + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "5001" + prometheus.io/path: "debug/metrics/prometheus" spec: initContainers: - name: init-repo