Skip to content

Commit

Permalink
add error handling, recursive calls still dont work
Browse files Browse the repository at this point in the history
  • Loading branch information
s4ke committed Oct 13, 2024
1 parent baf5cbc commit ad2a967
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions deploy/stack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
dns:
image: ghcr.io/neuroforgede/swarmdns:0.2.6
image: ghcr.io/neuroforgede/swarmdns:0.2.7
command: ["python", "-u", "dns.py"]
env_file:
- .env
Expand All @@ -18,7 +18,7 @@ services:
mode: global

exporter:
image: ghcr.io/neuroforgede/swarmdns:0.2.6
image: ghcr.io/neuroforgede/swarmdns:0.2.7
command: ["python", "-u", "exporter.py"]
env_file:
- .env
Expand All @@ -33,7 +33,7 @@ services:
mode: global

nodes:
image: ghcr.io/neuroforgede/swarmdns:0.2.6
image: ghcr.io/neuroforgede/swarmdns:0.2.7
command: ["python", "-u", "nodes.py"]
env_file:
- .env
Expand All @@ -50,7 +50,7 @@ services:
replicas: 1

merger:
image: ghcr.io/neuroforgede/swarmdns:0.2.6
image: ghcr.io/neuroforgede/swarmdns:0.2.7
command: ["python", "-u", "merger.py"]
env_file:
- .env
Expand Down
2 changes: 2 additions & 0 deletions dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ def handle_request(self, data, addr):

else:
print_debug(f"IP {request_addr} not found in any Docker network.")
reply = request.reply()
reply.header.rcode = RCODE.SERVFAIL

# Send the DNS response
self.server.sendto(reply.pack(), addr)
Expand Down

0 comments on commit ad2a967

Please sign in to comment.