Skip to content

[raft] Implement dssctl for cluster membership - #1777

Open
MariemBaccari wants to merge 2 commits into
interuss:masterfrom
Orbitalize:dssctl
Open

MariemBaccari wants to merge 2 commits into
interuss:masterfrom
Orbitalize:dssctl

Conversation

@MariemBaccari

@MariemBaccari MariemBaccari commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This PR partially addresses #1719. It depends on #1907 so only the last commit should be reviewed. It implements the CLI tool which sends cluster membership requests to the admin API.

Example command outputs:

> dss 2 list

aux:
  ID                    URL                     ROLE
  5984584214944223614   http://172.27.1.1:9501  leader
  7039456018058520091   http://172.27.2.1:9502  voter
  13471907039939974409  http://172.27.3.1:9503  voter
  removed IDs: [8441425251619929276]
rid:
  ID                    URL                     ROLE
  10439652153256090285  http://172.27.1.1:9501  leader
  18170893708234001536  http://172.27.2.1:9502  voter
  11084500845428996395  http://172.27.3.1:9503  voter
  removed IDs: [2528209532044653231]
scd:
  ID                    URL                     ROLE
  8150101748507923734   http://172.27.1.1:9501  leader
  11799825069385101662  http://172.27.2.1:9502  voter
  18089004189488093466  http://172.27.3.1:9503  voter

> dss 1 remove --url $(url 4)

aux: removed node 8441425251619929276
rid: removed node 2528209532044653231
scd: removed node 11749186930200284609

> dss 4 node

aux: removed (ID 8441425251619929276, http://172.27.4.1:9504)
rid: removed (ID 2528209532044653231, http://172.27.4.1:9504)
scd: removed (ID 11749186930200284609, http://172.27.4.1:9504)

Comment thread cmds/dssctl/README.md Outdated
Error: rid: 400 Bad Request: node ID 4 was removed from the group and cannot be reused (E:…)
```

A change can therefore succeed for some groups and fail for others. In that case, the command can be retried for the failed groups only with `--groups`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the example output / message seems unnatural to read no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Could you provide an example of what you have in mind ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I added a suggestion bellow, it's mostly to have the two sentences together.

(I also changed it to a full example, but that was not the original scope)

Comment thread cmds/dssctl/README.md Outdated
@@ -0,0 +1,73 @@
# dssctl

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Open question: should this be only in the docs/website part of the documentation instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I'd agree with this for the long term. Do we want to do this for the MVP though ?

@MariemBaccari MariemBaccari Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed the README.md. It will be addressed separately as part of #1747.

@MariemBaccari
MariemBaccari marked this pull request as draft October 22, 2026 13:28
@MariemBaccari MariemBaccari reopened this Nov 4, 2026
@MariemBaccari
MariemBaccari force-pushed the dssctl branch 2 times, most recently from dd0659b to d856293 Compare November 4, 2026 13:29
@MariemBaccari
MariemBaccari marked this pull request as ready for review November 4, 2026 13:29
Comment thread cmds/dssctl/README.md Outdated
Comment on lines +7 to +15
It calls the admin API served by the `core-service` of the DSS node on the Unix socket at `--admin_socket`. A DSS node using the `raft` datastore runs one Raft group per service: `aux`, `rid` and `scd`. Each group has its own members, and a node joins or leaves each of them independently. A `dssctl raft` command sends one request per selected group, all groups by default.

```
aux: added node 9145876235489012733 (http://dss4.example.com:9500)
scd: added node 3376251980046127518 (http://dss4.example.com:9500)
Error: rid: 503 Service Unavailable: failed to reach the node at http://dss4.example.com:9500 (E:…)
```

A change can therefore succeed for some groups and fail for others. In that case, the command can be retried for the failed groups only with `--groups`.

@the-glu the-glu Nov 4, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It calls the admin API served by the core-service of the DSS node on the Unix socket at --admin_socket. A DSS node using the raft datastore runs one Raft group per service: aux, rid and scd. Each group has its own members, and a node joins or leaves each of them independently. A dssctl raft command sends one request per selected group, all groups by default. A change can therefore succeed for some groups and fail for others. In that case, the command can be retried for the failed groups only with --groups.

dssctl raft add --url http://dss4.example.com:9500)

aux: added node 9145876235489012733 (http://dss4.example.com:9500)
scd: added node 3376251980046127518 (http://dss4.example.com:9500)
Error: rid: 503 Service Unavailable: failed to reach the node at http://dss4.example.com:9500 (E:…)

dssctl raft add --url http://dss4.example.com:9500) --groups rid

rid: added node 424242 (http://dss4.example.com:9500)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants