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

[Feature]: change ip address of nodes including masternode, metanode and datanode #3120

Open
1 task done
hooklee2000 opened this issue Feb 22, 2024 · 3 comments · May be fixed by #3268
Open
1 task done

[Feature]: change ip address of nodes including masternode, metanode and datanode #3120

hooklee2000 opened this issue Feb 22, 2024 · 3 comments · May be fixed by #3268
Assignees
Labels
enhancement New feature or request

Comments

@hooklee2000
Copy link
Contributor

hooklee2000 commented Feb 22, 2024

Contact Details

No response

Is there an existing issue for this?

  • I have searched all the existing issues

Is your feature request related to a problem? Please describe.

Somtimes we need change ip address of nodes including masternode,metanode and datanode. Current every node has fields such as NodeID,IPAddr.

Describe the solution you'd like.

We can set node's hostname as domain name.
When UseDomainName flag as true then Network communication with every node use domain name instead of ip address liking Hadoop and Greenplum cluster. we can just modify ip address of dns record online. see [Feature]: add name resolver for master sdk #2136 , it will update real ip periodly.
If we need change node's hostname,add cfs-cli command to list and change every node's ip or domain name.

Describe an alternate solution.

If using ip address only, add cfs-cli command to list and change every node's ip or domain name.

Anything else? (Additional Context)

No response

@hooklee2000 hooklee2000 added the enhancement New feature or request label Feb 22, 2024
@hooklee2000
Copy link
Contributor Author

hooklee2000 commented Mar 18, 2024

I add two api, they work well:

  • change metanode address
    id meta node id
    srcAddr source address, such as ip:port
    targetAddr target address, such as ip:port
curl -v 'http://127.0.0.1:17010/metaNode/changeAddr?id=[id]&srcAddr=[ip:port]&targetAddr=[ip:port]' | jq .
  • change datanode address
    id data node id
    srcAddr source address, such as ip:port
    targetAddr target address, such as ip:port
curl -v 'http://127.0.0.1:17010/dataNode/changeAddr?id=[id]&srcAddr=[ip:port]&targetAddr=[ip:port]' | jq .
  • if also change master ip, need to replace all kinds of *.json,then restart all service.
    if need this feature, I will create a pr.

hooklee2000 added a commit to hooklee2000/cubefs that referenced this issue Mar 18, 2024
@leonrayang
Copy link
Member

@hooklee2000 Please create the PR for this requirement that often arises in daily operations. Thank you!

@hooklee2000
Copy link
Contributor Author

I resolved the merge conflict. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants