Question on Vivaldi coordinates in Serf

Dear all,

I hope this question fits this category. Please let me know if not I will remove this post.

I have a containerlab topology which is integrated with Serf. Currently, it does the following through some scripts;

  • deploy the containerlab nodes
  • Assign IP addresses for the nodes
  • Copy necessary files to each node and generating a configuration file for the Serf agent.
  • Start Serf agents
  • Join nodes to the cluster using Serf

The problem is how can I see the Vivaldi coordinates? I tried running get-coordinate as per https://github.com/hashicorp/serf/blob/master/docs/internals/coordinates.html.markdown#working-with-coordinates but that command is not available. I want to see if there is a way to visualize the coordinates generated or get any data on the entire nodes. Inside the Coordinate directory I changed the Dimensionality to 2.

However, I could see the rtt between any given 2 nodes.

Any help on this would be highly appreciated.

UPDATE
I checked if RPC is running although it hasn’t been explicitly mentioned in the command “docker exec -d "$container" /opt/serfapp/serf agent -profile lan -config-file=/opt/serfapp/node.json

root@serf1:/opt/serfapp# netstat -tuln | grep 7373
tcp        0      0 127.0.0.1:7373          0.0.0.0:*               LISTEN

I tried the following but it gives me below error

curl http://127.0.0.1:7373/v1/agent/get-coordinate
curl: (52) Empty reply from server

The problem I am facing is how to make this command work to get the network coordinates.

Thank you!

I tried the following request from a node running serf

root@serf1:/opt/serfapp# curl -X POST -d '{"Node":"serf1"}' http://10.0.1.11:7373/v1/agent/get-coordinate
curl: (52) Empty reply from server

However, in serf2 node I got the following log message

[INFO] agent.ipc: Accepted client: 10.0.1.11:52128
[ERR] agent.ipc: failed to decode request header: msgpack decode error [pos 1]: only encoded map or array can be decoded into a struct

As per search it seems that that the Serf RPC server is not understanding the format of the request. I am clueless on getting this working and would like any help.

Thanks!

It is only accessible through RPC and needs to do some handshakes and encoding decoding stuff. Therefore, simple curl / http won’t work.