Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust monitor-net settings #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

frenchu
Copy link

@frenchu frenchu commented Feb 18, 2024

Assigning a static address for monitor-net can lead to an issue. User can run other compose projects and create custom networks. By default docker will assign random network addresses automatically. When user already has a docker network with the same address as monitor-net address, rocketpool services are not starting:

 ✘ Network rocketpool_monitor-net  Error                                                                                                     0.0s
failed to create network rocketpool_monitor-net: Error response from daemon: cannot create network b5fe819f2eb9d83d916309fcacde43fc22a08368ab9f083be13ac9e0baaa5891 (br-b5fe819f2eb9): conflicts with network dff50a78ca4140c6ccef48a845397cbea6a38833bb1b35f4b68bd6777dd4bd7f (br-dff50a78ca41): networks have overlapping IPv4
exit status 1

Moreover, Grafana service can be isolated from containers in rocketpool_net and connected to monitor-net with Prometheus service.

More details in the pull request comments.

@@ -20,8 +20,8 @@ services:
- "{{.RocketPoolDirectory}}/grafana-prometheus-datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml"
- "grafana-storage:/var/lib/grafana"
networks:
- net
- monitor-net
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run Grafana service in monitor-net for better network isolation.

@@ -28,16 +28,7 @@ services:
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
# Bridge so node-exporter can get the real NIC details
# See https://stackoverflow.com/a/66689508 for more info
Copy link
Author

@frenchu frenchu Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stackoverflow solution refered in the comment is obselete by now. Adding "host.docker.internal:host-gateway" as an extra host is enough alone. The stackoverflow answer was updated to reflect that.

ipam:
driver: default
config:
- subnet: 172.23.0.0/16
Copy link
Author

@frenchu frenchu Feb 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RocketPool docs don't assume any particular network address for monitoring, so docker compose can assign network address for monitor-net by itself. The network address should not change later during RP node operation, since the networks are not recreated on starting/stopping RocketPool services. For current node operators the address will also not change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant