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

[Bug] operator should set coordinator and shuffle server's ports to the spec rather a fixed value #627

Closed
2 of 3 tasks
advancedxy opened this issue Feb 17, 2023 · 1 comment · Fixed by #629
Closed
2 of 3 tasks
Assignees

Comments

@advancedxy
Copy link
Contributor

advancedxy commented Feb 17, 2023

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

As reported by #620, it's related to code:

func generateMainContainerPorts(rss *unifflev1alpha1.RemoteShuffleService) []corev1.ContainerPort {
	ports := []corev1.ContainerPort{
		{
			ContainerPort: controllerconstants.ContainerCoordinatorRPCPort,
			Protocol:      corev1.ProtocolTCP,
		},
		{
			ContainerPort: controllerconstants.ContainerCoordinatorHTTPPort,
			Protocol:      corev1.ProtocolTCP,
		},
	}
	ports = append(ports, rss.Spec.Coordinator.Ports...)
	return ports
}

The coordinator and shuffle server's container port is fixed to the default constants. It should matches the port specified in the RSS spec.

Affects Version(s)

master,0.7.0

Uniffle Server Log Output

No response

Uniffle Engine Log Output

No response

Uniffle Server Configurations

No response

Uniffle Engine Configurations

No response

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@advancedxy
Copy link
Contributor Author

There's another problem about the operator:

func GenerateAddresses(rss *unifflev1alpha1.RemoteShuffleService) string {
	var names []string
	for i := 0; i < int(*rss.Spec.Coordinator.Count); i++ {
		name := GenerateNameByIndex(rss, i)
		serviceName := appendHeadless(name)
		current := fmt.Sprintf("%v:%v", serviceName, controllerconstants.ContainerShuffleServerRPCPort)
		names = append(names, current)
	}
	return strings.Join(names, ",")
}

It uses wrong constants, and it should also be updated to use the port in the spec.

advancedxy pushed a commit that referenced this issue Feb 20, 2023
### What changes were proposed in this pull request?
Set coordinator/shuffler server's container port to the fields of RSS spec

### Why are the changes needed?
Fix #627.

### Does this PR introduce _any_ user-facing change?
For RSS cluster admin, they can set custom ports for shuffle servers and coordinators.

### How was this patch tested?
Manually verified.
jerqi pushed a commit that referenced this issue Feb 21, 2023
### What changes were proposed in this pull request?
Set coordinator/shuffler server's container port to the fields of RSS spec

### Why are the changes needed?
Fix #627.

### Does this PR introduce _any_ user-facing change?
For RSS cluster admin, they can set custom ports for shuffle servers and coordinators.

### How was this patch tested?
Manually verified.
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

Successfully merging a pull request may close this issue.

2 participants