Skip to content

Commit

Permalink
[0.3.5] fix paddle_port bug, release 0.3.5 (#94)
Browse files Browse the repository at this point in the history
* fix PADDLE_PORT env for ps

* fix port bug, release 0.3.5
  • Loading branch information
kuizhiqing authored May 19, 2023
1 parent 8c331cd commit 68230bf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Image URL to use all building/pushing image targets
IMG ?= registry.baidubce.com/paddlecloud/controller:v0.3.4
IMG ?= registry.baidubce.com/paddlecloud/controller:v0.3.5
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:maxDescLen=0,generateEmbeddedObjectMeta=true,trivialVersions=true,preserveUnknownFields=false"
CRD_OPTIONS_V1BETA1 ?= "crd:crdVersions=v1beta1,allowDangerousTypes=false,maxDescLen=0"
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ configMapGenerator:
images:
- name: controller
newName: registry.baidubce.com/paddlecloud/controller
newTag: v0.3.4
newTag: v0.3.5
3 changes: 2 additions & 1 deletion controllers/paddlejob_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ func constructConfigMap(pdj *pdv1.PaddleJob, childPods corev1.PodList) (cm *core
}
}

paddle_port := PADDLE_PORT + rand.Intn(20000)
for _, pod := range childPods.Items {
if len(strings.Split(pod.Status.PodIP, ".")) != 4 {
return nil
}
resType, idx := extractNameIndex(pod.Name)

paddle_port := PADDLE_PORT + rand.Intn(20000)
if pdj.Spec.Intranet == pdv1.Service {
resources[resType][idx] = fmt.Sprintf("%s:%d", pod.Name, PADDLE_PORT)
} else {
Expand All @@ -249,6 +249,7 @@ func constructConfigMap(pdj *pdv1.PaddleJob, childPods corev1.PodList) (cm *core
},
Data: map[string]string{
"TRAINER_PORTS_NUM": fmt.Sprintf("%d", HOST_PORT_NUM),
"PADDLE_PORT": fmt.Sprintf("%d", paddle_port),
},
}

Expand Down
2 changes: 1 addition & 1 deletion deploy/v1/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ spec:
- --leader-elect
command:
- /manager
image: registry.baidubce.com/paddlecloud/controller:v0.3.4
image: registry.baidubce.com/paddlecloud/controller:v0.3.5
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion deploy/v1beta1/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ spec:
- --leader-elect
command:
- /manager
image: registry.baidubce.com/paddlecloud/controller:v0.3.4
image: registry.baidubce.com/paddlecloud/controller:v0.3.5
imagePullPolicy: Always
livenessProbe:
httpGet:
Expand Down

0 comments on commit 68230bf

Please sign in to comment.