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

[Enhancement]: support multiple datanode/metanode instances using different port on a single node #3004

Open
1 task done
morphes1995 opened this issue Jan 17, 2024 · 2 comments · May be fixed by #3016
Open
1 task done
Assignees
Labels
enhancement New feature or request

Comments

@morphes1995
Copy link
Contributor

morphes1995 commented Jan 17, 2024

Contact Details

morphes1995@gmail.com

Is there an existing issue for this?

  • I have searched all the existing issues

What would you like to be added?

For a specified data partition or meta partition , currently, the replica members must use the same raft heartbeat port and replica port, otherwise replicas will not be able to communicate with each other.

func (mp *metaPartition) startRaft() (err error) {
  heartbeatPort, replicaPort, err = mp.getRaftPort() // all peers of this mp use same port
	for _, peer := range mp.config.Peers {
		rp := raftstore.PeerAddress{
			HeartbeatPort: heartbeatPort,
			ReplicaPort:   replicaPort,
		}
		peers = append(peers, rp)
	}
	pc := &raftstore.PartitionConfig{
		Peers:   peers,
	}
	mp.raftPartition, err = mp.config.RaftStore.CreatePartition(pc)
  return 
}

Why is this needed?

For a single node that only has one net card , in order to deploy cubeFS, we must fake some secondary IPs to satisfy the replicas port requirement.

Anything else?

None yet

@morphes1995
Copy link
Contributor Author

morphes1995 commented Jan 18, 2024

Another reason for this feature, based on which we can build a even more fully-fectured unit test system in which dn/mn not just start a http server

@xiaochunhe
Copy link
Contributor

Another reason for this feature, based on which we can build a even more fully-fectured unit test system in which dn/mn not just start a http server

good advice :) , there was a PR (#3016) recently to solve this problem

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
Development

Successfully merging a pull request may close this issue.

3 participants