small pixel drawing of a pufferfish cascade

throw 500 on agent memebrship err
Jes Olson j3s@c3f.net
Mon, 06 Mar 2023 20:08:12 -0800
commit

485812f5ede798d62cd842a726abf6250a23fe70

parent

c259874e84bf44ab72d90210cfd9ca77e44623e9

3 files changed, 10 insertions(+), 16 deletions(-)

jump to
M agent/agent_endpoint.goagent/agent_endpoint.go

@@ -51,6 +51,8 @@ members := s.agent.Members()

json, err := s.marshalJSON(r, members) if err != nil { fmt.Println(err) + w.WriteHeader(http.StatusInternalServerError) + return } fmt.Fprintf(w, string(json)) }
A make-agent

@@ -0,0 +1,8 @@

+#!/bin/sh +# +# make a cascade test agent + +ip="127.0.0.$1" + +printf "starting agent %s...\n" "$1" +go run . agent -bind-dns $ip -bind-http $ip -bind-serf $ip -join 127.0.0.1 -node "agent $1"
D make-test-cluster

@@ -1,16 +0,0 @@

-#!/bin/sh -# -# make a little cascade cluster for development & debugging - -export CASCADE_DEBUG=true - -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT -# error case: -# CASCADE_BIND='127.0.0.1' go run . & -# sleep 5 -# CASCADE_BIND='127.0.0.2' CASCADE_JOIN='127.0.0.1' go run . & -# happy case: -CASCADE_NAME=foo CASCADE_BIND='127.0.0.1' go run . & -sleep 5 -CASCADE_NAME=bar CASCADE_BIND='127.0.0.2' CASCADE_JOIN='127.0.0.1' go run . & -wait