-
Notifications
You must be signed in to change notification settings - Fork 711
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
(refactor)network-chaos: upgrade pumba specs to use iproute2 containers for network chaos #991
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Signed-off-by: ksatchit <[email protected]>
Signed-off-by: ksatchit <[email protected]>
Signed-off-by: ksatchit <[email protected]>
nsathyaseelan
approved these changes
Dec 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
rahulchheda
approved these changes
Dec 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm!
ispeakc0de
approved these changes
Dec 12, 2019
LaumiH
approved these changes
Dec 12, 2019
20 tasks
ksatchit
pushed a commit
that referenced
this pull request
Dec 13, 2019
…rs for network chaos (#991) * (refactor)use newer pumba image with spec changes Signed-off-by: ksatchit <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: ksatchit [email protected]
What this PR does / why we need it:
It was observed that many base docker images are shipped without
tc
(linux traffic shaper utility) that is a necessary requirement to use pumba to inject network delays on the container)Pumba offers an alpine-based image with iproute2 (source package for tc) which it (the main pumba container/pod) can run on the host with NET_ADMIN capabilities to use the target container network stack and induce netem-based chaos (delays/loss/corruption/jitters).
With the current version of pumba used by litmus (0.4.8), the iproute2 image is expected to be available on the hosts and not pulled at runtime. Also, there are issues pertaining to unclean removal/cleanup of these containers post chaos. Using in this mode would cause us to run docker commands before and after chaos..which is undesirable. This issue is fixed with 0.6+ versions of pumba.
However, pumba 0.6+ is based on
scratch
base images without availability of a shell, docker-entrypoint etc., The chaos params needed to be burned into the kubernetes spec/artifact prior to execution. In this case, we shall not be able to use existing workflows based onkubectl exec
operations for chaos after starting pumba in--dry-run
mode.This PR modifies the network chaos lib in order to identify the node on which the target container resides post which a pumba (0.6.5) job is constructed and run for a period of TOTAL_CHAOS_DURATION with the
nodeSelector
set to the derived node, thereby inducing delay/loss for specified period after which the job ends.Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes # partially fulfills #969 (container-kill experiments continue to use pumba 0.4.8)Checklist
Special notes for your reviewer:
The PR introduces a few other changes that can be reused in other experiments.
Note:
is not defined
for variable negative logic overnot var
which is seen to fail with current ansible version in the litmuschaos ansible-runner.