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

maya without etcd? #1527

Open
aep opened this issue Oct 15, 2023 · 10 comments
Open

maya without etcd? #1527

aep opened this issue Oct 15, 2023 · 10 comments
Labels
Enhancement New feature or request help wanted Extra attention is needed

Comments

@aep
Copy link

aep commented Oct 15, 2023

mayastor uses etcd which appears to be very fragile.
is this mandatory? it doesnt appear to store much, so any k/v would work?

i can reliably take down the mayastor cluster by testing power failure events
eventually you end up with

panic: tocommit(423) is out of range [lastIndex(206)]. Was the raft log corrupted, truncated, or lost?

which appears top require manual intervention

see also #1318 (comment)

power failure is something that i'd prefer to recover from automatically.
could something like cockroachdb work?

@tiagolobocastro
Copy link
Contributor

tiagolobocastro commented Oct 16, 2023

is this mandatory? it doesnt appear to store much, so any k/v would work?

We have an interface pstor which has currently only 1 implementation (etcd) so for the moment etcd is the option.
There's a backlog item for adding a pstor service proxy which every service will connect to and this service proxy will in turn be the one talking directly to etcd. This will make it easier to add other options, other than etcd.

panic: tocommit(423) is out of range [lastIndex(206)]. Was the raft log corrupted, truncated, or lost?

Quick search indicates etcd data was deleted, are you using persistent storage for etcd?

@inful
Copy link

inful commented Nov 1, 2023

Would it not be possible to use the NATS built in K/V capability (as it seems you are already depending on NATS)?

@aep
Copy link
Author

aep commented Nov 1, 2023

I would volunteer to contribute that! Nats is battle tested in prod here.

Unfortunately currently blocked due to other issues with maya that I haven't had time to figure out yet

@tiagolobocastro
Copy link
Contributor

Interesting, I was not aware NATS had a builtin kv store! Does it have leases as well?

@inful
Copy link

inful commented Nov 3, 2023

k3s are currently adding nats as an alternative to etcd (see k3s-io/k3s#7451). That work might serve as an inspiration :)

@dm3ch
Copy link

dm3ch commented Nov 17, 2023

By the way can't be k8s api used as a KV storage to not to spin up separate KV storage?

@tiagolobocastro
Copy link
Contributor

Not at the moment, we interact with etcd directly, which can't be done with k8s etcd.

@dm3ch
Copy link

dm3ch commented Nov 17, 2023

Am I right to understand that it's possible in case of pstor driver creation?

Because I'm interested why to not use k8s as kv storage if mayastor always executed in k8s, where there's already working k8s API? :)

@tiagolobocastro
Copy link
Contributor

Mayastor is actually not tied to k8s, which is why it cannot only reply on k8s api;
Today each service may talk to etcd directly, so it becomes rather messy to have to change each service to know different storage types.

@aep
Copy link
Author

aep commented Nov 22, 2023

i'm hoping to be able to share a solution with nats soon, that is directly usable for mayastor.
~1 week maybe.

in the meantime this might help with regards to leases:
nats-io/nats-server#4803 (comment)

@tiagolobocastro tiagolobocastro added Enhancement New feature or request help wanted Extra attention is needed and removed NEW New issue labels Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants