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

kill_microservice not working due to naked 'body' args for functions #42

Closed
maroda opened this issue Jun 20, 2019 · 1 comment · Fixed by #43
Closed

kill_microservice not working due to naked 'body' args for functions #42

maroda opened this issue Jun 20, 2019 · 1 comment · Fixed by #43
Labels

Comments

@maroda
Copy link

maroda commented Jun 20, 2019

This looks similar to #34

It appears actions.py has several incorrect instances of body as an argument.

If I edit to read body=body as in here for kill_microservice: https://github.com/chaostoolkit/chaostoolkit-kubernetes/blob/master/chaosk8s/actions.py#L67

The deployment will correctly be deleted. Without that edit, I will get the following:

[2019-06-19 17:32:43 ERROR]   => failed: TypeError: delete_namespaced_deployment() takes 3 positional arguments but 4 were given

And the function will not run, no deployment is deleted.

This also appears two other places:

https://github.com/chaostoolkit/chaostoolkit-kubernetes/blob/master/chaosk8s/actions.py#L81

https://github.com/chaostoolkit/chaostoolkit-kubernetes/blob/master/chaosk8s/actions.py#L95

@Lawouach
Copy link
Contributor

Hi @maroda,

This is indeed likely a bug here. Looking at the API https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/ExtensionsV1beta1Api.md#delete_namespaced_deployment, the third positional argument is not body indeed.

I'll fix it.

Cheers

@Lawouach Lawouach added the bug label Jun 20, 2019
Lawouach added a commit that referenced this issue Jun 20, 2019
Closes #42

Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
Lawouach added a commit that referenced this issue Jun 20, 2019
Closes #42

Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
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.

2 participants