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

Safekeeper listing API, storcon commands, deletion API, deleted state #9981

Open
Tracked by #8614
jcsp opened this issue Dec 3, 2024 · 0 comments
Open
Tracked by #8614

Safekeeper listing API, storcon commands, deletion API, deleted state #9981

jcsp opened this issue Dec 3, 2024 · 0 comments
Assignees

Comments

@jcsp
Copy link
Collaborator

jcsp commented Dec 3, 2024

Prerequisite: #8698

Proposed API: RFC section:

API implementation

  1. POST /control/v1/safekeepers -> storcon: boilerplate to upsert safekeeper records on deploy #8879
  2. GET /control/v1/safekeepers -> storcon: add safekeeper list API #10089
  3. GET /control/v1/safekeepers/:node_id -> storcon: boilerplate to upsert safekeeper records on deploy #8879
  4. PUT /control/v1/safekepers/:node_id/status

Other tasks

github-merge-queue bot pushed a commit that referenced this issue Dec 12, 2024
This adds an API to the storage controller to list safekeepers
registered to it.

This PR does a `diesel print-schema > storage_controller/src/schema.rs`
because of an inconsistency between up.sql and schema.rs, introduced by
[this](2c142f1)
commit, so there is some updates of `schema.rs` due to that. As a
followup to this, we should maybe think about running `diesel
print-schema` in CI.

Part of #9981
github-merge-queue bot pushed a commit that referenced this issue Dec 18, 2024
Add a `safekeepers` subcommand to `storcon_cli` that allows listing the
safekeepers.

```
$ curl -X POST --url http://localhost:1234/control/v1/safekeeper/42 --data \
  '{"active":true, "id":42, "created_at":"2023-10-25T09:11:25Z", "updated_at":"2024-08-28T11:32:43Z","region_id":"neon_local","host":"localhost","port":5454,"http_port":0,"version":123,"availability_zone_id":"us-east-2b"}'
$ cargo run --bin storcon_cli  -- --api http://localhost:1234 safekeepers
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s
     Running `target/debug/storcon_cli --api 'http://localhost:1234' safekeepers`
+----+---------+-----------+------+-----------+------------+
| Id | Version | Host      | Port | Http Port | AZ Id      |
+==========================================================+
| 42 | 123     | localhost | 5454 | 0         | us-east-2b |
+----+---------+-----------+------+-----------+------------+
```

Also:

* Don't return the raw `SafekeeperPersistence` struct that contains the
raw database presentation, but instead a new
`SafekeeperDescribeResponse` struct.
* The `SafekeeperPersistence` struct leaves out the `active` field on
purpose because we want to deprecate it and replace it with a
`scheduling_policy` one.

Part of #9981
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

No branches or pull requests

2 participants