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

Terminate/Restart workers #248

Merged
merged 6 commits into from
Nov 22, 2022
Merged

Terminate/Restart workers #248

merged 6 commits into from
Nov 22, 2022

Conversation

ChrisKujawa
Copy link
Member

@ChrisKujawa ChrisKujawa commented Nov 22, 2022

With #247 we are able to deploy zeebe workers with zbchaos. With this PR we are able to restart and terminate workers, either one or all existing ones.

In this PR I also iterated over the terminate an restart commands and realized that gateway restart was missing. I added this.

Furthermore a new subcommand is added on terminate and restart for the broker, this makes it more understandable what is restarted, instead of using the root restart/terminate command for that.

I plan to do some more refactoring like extracting the duplicated code and reusing logic, but I will do this in a separate PR.


Example:

Terminate one:

$ ./zbchaos terminate worker -v
Connecting to zell-chaos
Running experiment in self-managed environment.
Terminated worker-99cd57f8b-hmhb5

Terminate all:

$ ./zbchaos terminate worker -v --all
Connecting to zell-chaos
Running experiment in self-managed environment.
Terminated worker-99cd57f8b-lfbck
Terminated worker-99cd57f8b-vjb9l

Restart one

$ ./zbchaos restart worker 
Restart worker-99cd57f8b-4ght7

Restart all

$ ./zbchaos restart worker --all
Restart worker-99cd57f8b-4ght7
Restart worker-99cd57f8b-7t2d9
Restart worker-99cd57f8b-kmrhv

New restart sub-commands:

$ ./zbchaos restart broker
Deleted zell-chaos-zeebe-2
$ ./zbchaos restart gateway
Restarted zell-chaos-zeebe-gateway-5f5c7cb8d6-9529r
$ ./zbchaos restart worker
Restart worker-99cd57f8b-cr6bs

New terminate sub-commands:

$ ./zbchaos terminate broker
Terminated zell-chaos-zeebe-0
$ ./zbchaos terminate gateway
Terminated zell-chaos-zeebe-gateway-5f5c7cb8d6-6jlxn
$ ./zbchaos terminate worker
Terminated worker-99cd57f8b-55tt2

@ChrisKujawa ChrisKujawa marked this pull request as ready for review November 22, 2022 14:46
@ChrisKujawa ChrisKujawa force-pushed the zell-terminate-workers branch from b7912ba to 52c58ed Compare November 22, 2022 14:53
go-chaos/cmd/restart.go Outdated Show resolved Hide resolved
Co-authored-by: Ole Schönburg <[email protected]>
@ChrisKujawa ChrisKujawa merged commit c075afa into main Nov 22, 2022
@ChrisKujawa ChrisKujawa deleted the zell-terminate-workers branch November 22, 2022 15:31
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.

2 participants