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

scale out mechanism in HTEX not compatible with kubernetes provider #853

Closed
ZhuozhaoLi opened this issue Apr 7, 2019 · 5 comments · Fixed by #1073
Closed

scale out mechanism in HTEX not compatible with kubernetes provider #853

ZhuozhaoLi opened this issue Apr 7, 2019 · 5 comments · Fixed by #1073
Assignees
Labels

Comments

@ZhuozhaoLi
Copy link
Contributor

Currently, the scale_out mechanism in HTEX is to scale out block by block, as in

for i in range(blocks):
if self.provider:
block = self.provider.submit(self.launch_cmd, 1, 1)

This is conflicted with the mechanism in kubernetes provider. In kube provider, the number of blocks refer to the number of pods, and it creates the blocks (pods) directly, as in

self.deployment_obj = self._create_deployment_object(job_name,
self.image,
deployment_name,
cmd_string=formatted_cmd,
replicas=self.init_blocks,
volumes=self.persistent_volumes)

Need to fix to make them compatible.

@ZhuozhaoLi
Copy link
Contributor Author

I am going to add a check in the executor to let kubernetes provider skip this loop below:

for i in range(blocks):
if self.provider:
block = self.provider.submit(self.launch_cmd, 1, 1)

Any better suggestion for this issue?

@benclifford
Copy link
Collaborator

@ZhuozhaoLi so that scale_out does nothing in that case?

@ZhuozhaoLi
Copy link
Contributor Author

ZhuozhaoLi commented Apr 15, 2019

@ZhuozhaoLi so that scale_out does nothing in that case?

@benclifford So the scale_out only does self.provider.submit(self.launch_cmd, 1, 1) once, rather than blocks times for kubernetes provider -- should be break the loop after once.

@benclifford
Copy link
Collaborator

Some questions that spring to mind:

Who calls scale_out?

Are they going to be happy that they didn't get the number of blocks they ask for?

What happens if they ask to scale out more blocks by calling scale_out repeatedly because you didn't scale out the right number of blocks?

Should this code throw a ValueError if it cannot do what it was asked to do rather than silently doing something else?

Architecturally it's horrible to put in class type tests all over the place - the suggested change isn't going to work for the not yet implemented SimilarToKubernetesProvider, for example.

@benclifford
Copy link
Collaborator

The result of a discussion between myself and @ZhuozhaoLi on slack was that a better representation of blocks in kubernetes might be: each block is a kubernetes pod, managed directly via parsl, rather than via a kubernetes deployment which doesn't allow pod management in the way that our block management is headed.

benclifford pushed a commit that referenced this issue Jun 19, 2019
)

fix #853.

Now kubernetes provider creates non-deployment pods for each executor, rather than deployments.
The scaling of pods will be managed by Parsl.

Refer the details to the discussions in #853


Squashed commits:
* each block in kube refers to a pod

* add docstring for pod_name

* remove dead code about create deployment

* docstring - non-deployment pod to pod

* typo in comment

* simplify container creation code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants