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

Nil pointer dereference in ETCD config parsing for TT 3.x #36

Open
hackallcode opened this issue Jan 15, 2025 · 3 comments
Open

Nil pointer dereference in ETCD config parsing for TT 3.x #36

hackallcode opened this issue Jan 15, 2025 · 3 comments
Assignees

Comments

@hackallcode
Copy link
Contributor

2.0.1, tt 3.0, viper config

Image

@KaymeKaydex KaymeKaydex self-assigned this Jan 15, 2025
@KaymeKaydex
Copy link
Collaborator

looks like https://github.com/tarantool/go-vshard-router/blob/master/providers/viper/tarantool3/convert.go#L10C20-L10C25 Replicasets is nil pointer
anyway we need to check this

@KaymeKaydex
Copy link
Collaborator

KaymeKaydex commented Jan 20, 2025

Panics were initially built into the provider for incorrect parsing, it seems this may not lead to unexpected consequences. But readability will be improved in #37

@palage4a
Copy link

palage4a commented Jan 22, 2025

I encountered a similar issue. I believe the problem is that the group names are hardcoded as routers and storages, whereas the cluster configuration allows for any arbitrary names.

Additionally, based on the code, it seems mandatory to split routers and storages into separate groups, as this is how the go-vshard-router determines the role of a replicaset.

PS tarantool/tt has a lib which provides some cluster configuration possibilities. Might be useful https://github.com/tarantool/tt/blob/f13b13e8f7813e1e95765e8c3e93fdd27380bbca/lib/cluster/cluster.go#L123C1-L167C2

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

3 participants