-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Cluster human readable nodename feature #9564
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
Conversation
|
@hwware Sure. Should we be propagating the cluster node name to other nodes? |
|
@madolson do you mean propogating nodename or hostname? |
|
Yes, sorry, I meant node name. |
|
Hey @madolson , is there anything that needs to added for this PR or is it fine? |
madolson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My original thought was that the node name could be assigned by an admin, say use the EC2 instance ID or some type of container identifier. This isn't all that simpler, as we need to propagate it through the cluster. Having an identifier that is composed of the ip + port could work as a simpler version of a user defined hostname. We don't need to persist the IP + port based nodename to the nodes.conf file, since we can derive it dynamically. I still think the admin defined codename is more useful, but I think we could go either way.
I also thought it would be useful to print the "codename" in the logs wherever we print the 40 character hex identifier, since that can be hard to retroactively identify. This can be implemented regardless of how the codename is implemented.
|
Hey @madolson , I have updated the code and added the gossip functionality for the human readable name. And the node's name can be set manually by using the command: CLUSTER SETNAME. Please take a look. |
f35fd09 to
4476b94
Compare
madolson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to stay more ontop of this to see if we can merge this into 7.
|
@hwware Hey, now that the hostname extension framework is merged, do you want to follow up on this? I think it should be easy to add a new extension that is the nodename. |
Thanks Madolson, I will start working on this PR. Thanks |
4476b94 to
b1161cb
Compare
madolson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. Main comment I have is just making sure we're clear about the intention. I was thinking of it mostly as a debugging/human readable name that would be exposed in places like info and logging.
|
Hi @madolson , I agree that this can be used as debugging/human readable name that would be exposed in places like info and logging. This would be better than having a node ID when trying to debug any issue with a particular node. |
|
@zeekling we cannot easily modify the output of the command (any commands), it will be a breaking change |
ok, Another question, can you confirm the impact on large clusters.For example: the cluster has 300 masters and 300 slaves |
madolson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, only thing missing now is tests.
48a7eb4 to
0c24af6
Compare
|
@hwware We discussed this previously, but I'm going to double check no one else wants to review it, and then will merge it tomorrow. |
|
the top comment needs an update, right? |
|
Sorry for the delay, just got behind. Everything should be updated and consistent now. |
|
@hwware Will you double check the top comment and look at my last commit. I tried to write a slightly better test, simplify the code, and updated the redis.conf text. |
auxHumanNodenameGetter limited to %.40s, since we did not limit the length of config cluster-announce-human-nodename, %.40s will cause nodename data loss (we will persist it in nodes.conf). Additional modified auxHumanNodenamePresent to use sdslen. Introduced in redis#9564.
|
sporadic test failure: https://github.com/redis/redis/actions/runs/5313162983/jobs/9618669303?pr=12159 |
|
I think this should fix it: #12330. |


This PR adds the a human readable name to a node in clusters that are visible as part of error logs. This is useful so that admins and operators of Redis cluster have better visibility into failures without having to cross-reference the generated ID with some logical identifier (such as pod-ID or EC2 instance ID). This is mentioned in #8948. Specific nodenames can be set by using the variable
cluster-announce-human-nodename. The nodename is gossiped using the clusterbus extension in #9530.Dependent PRs
PR #9530 is done
PR #10536 is done