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

Issue 287: Deleting SegmentStore Services after Scaledown #298

Merged
merged 2 commits into from
Nov 15, 2019

Conversation

SrishT
Copy link
Contributor

@SrishT SrishT commented Nov 12, 2019

Signed-off-by: SrishT [email protected]

Change log description

When we deploy PravegaCluster with external access enabled and scale down the segmentstore to a lower instance count, the service entries for the segmentstore were not getting deleted.

Purpose of the change

Fixes #287

How to verify it

To reproduce the issue, deployed a sample Pravega Cluster with 3 segmentstore replicas and with external access enabled. Updated the number of segmentstore replicas in the spec to 1 and observed that while the extra segmentstore replicas were getting deleted, the extra segmentstore services were left behind.

$ kubectl get all
NAME                                                       READY   STATUS    RESTARTS   AGE
pod/pravega-bookie-0                                       1/1     Running   0          164m
pod/pravega-bookie-1                                       1/1     Running   0          164m
pod/pravega-bookie-2                                       1/1     Running   0          164m
pod/pravega-pravega-controller-fc6857f5-9429m              1/1     Running   0          164m
pod/pravega-pravega-segmentstore-0                         1/1     Running   0          164m

NAME                                            TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                          AGE
service/pravega-bookie-headless                 ClusterIP      None             <none>          3181/TCP                         164m
service/pravega-pravega-controller              LoadBalancer   10.100.200.216   10.247.113.80   10080:32657/TCP,9090:30330/TCP   164m
service/pravega-pravega-segmentstore-0          LoadBalancer   10.100.200.185   10.247.113.86   12345:30313/TCP                  164m
service/pravega-pravega-segmentstore-1          LoadBalancer   10.100.200.194   10.247.113.86   12345:30313/TCP                  164m
service/pravega-pravega-segmentstore-2          LoadBalancer   10.100.200.196   10.247.113.86   12345:30313/TCP                  164m
service/pravega-pravega-segmentstore-headless   ClusterIP      None             <none>          12345/TCP                        164m

Created a new operator image with the fix and tested the same scenario. This time, the extra segmentstore service entries were also deleted, as expected.

$ kubectl get all
NAME                                                       READY   STATUS    RESTARTS   AGE
pod/pravega-bookie-0                                       1/1     Running   0          11m
pod/pravega-bookie-1                                       1/1     Running   0          11m
pod/pravega-bookie-2                                       1/1     Running   0          11m
pod/pravega-pravega-controller-fc6857f5-4dnwg              1/1     Running   0          11m
pod/pravega-pravega-segmentstore-0                         1/1     Running   0          11m

NAME                                            TYPE           CLUSTER-IP       EXTERNAL-IP     PORT(S)                          AGE
service/pravega-bookie-headless                 ClusterIP      None             <none>          3181/TCP                         11m
service/pravega-pravega-controller              LoadBalancer   10.100.200.142   10.247.113.80   10080:30692/TCP,9090:30030/TCP   11m
service/pravega-pravega-segmentstore-0          LoadBalancer   10.100.200.118   10.247.113.86   12345:30313/TCP                  11m
service/pravega-pravega-segmentstore-headless   ClusterIP      None             <none>          12345/TCP                        11m

@SrishT SrishT requested a review from pbelgundi November 12, 2019 09:09
Copy link
Contributor

@pbelgundi pbelgundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis build is failing. please fix the same.
Please add unit tests to cover the new code.
Some other minor changes suggested as well.

pkg/util/pravegacluster.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pbelgundi pbelgundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pbelgundi pbelgundi merged commit 2cca78e into master Nov 15, 2019
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 this pull request may close these issues.

External Connectivity: Scaling down of segment store is not deleting services
2 participants