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

StressChaos extension for more stress-ng options #515

Merged
merged 7 commits into from
May 25, 2020

Conversation

huangwei2013
Copy link
Contributor

What problem does this PR solve?

metions issue #144 , a experimental intensify about how to make use of hundreds stress-ng options .

  • It's not well tested, be careful pls
  • chaos-mesh compile is a long job, be patient

What is changed and how does it work?

Check List

Tests

  • Unit test
  • E2E test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has Go code change
  • Has CI related scripts change
  • Has Terraform scripts changeg

Side effects

  • Breaking backward compatibility

Related changes

  • Need to update the documentation

Does this PR introduce a user-facing change?:

NONE

@CLAassistant
Copy link

CLAassistant commented May 15, 2020

CLA assistant check
All committers have signed the CLA.

@cwen0
Copy link
Member

cwen0 commented May 15, 2020

@huangwei2013 Thanks for your contribution, please sign CLA first.

Comment on lines +242 to +246
if in.CPUStressor.Options != nil {
for _,v := range in.CPUStressor.Options{
stressors += fmt.Sprintf(" %v ", v)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What about if user set the --cpu-load option? How would we merge the adding option and the existed option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Yiaser by stress-ng itself will take over the repeated options ( tested: later one will replace former one)

A test case is : ( --cpu is a more clear test case, Top to find there is only on Processor of "stress-ng-cpu ")
stress-ng --cpu-load 10 --cpu 2 --cpu 1

@zhouqiang-cl
Copy link
Contributor

@cwen0 @fewdan please take a look at this CI

@fewdan
Copy link
Member

fewdan commented May 18, 2020

@huangwei2013
Sorry, the code you submitted caused the CI failed. It seems that you have added a new "Options" field in stresschaos, but there is no such field in "stresschaos_types_test.go". So, can you modify "stresschaos_types_test.go" to make the code pass CI test? Thank you.
image

* MemoryStressor.Options set  "omitempty"
* CPUStressor.Options set  "omitempty"
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2020

Codecov Report

Merging #515 into master will decrease coverage by 5.18%.
The diff coverage is 40.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #515      +/-   ##
==========================================
- Coverage   61.39%   56.21%   -5.19%     
==========================================
  Files          64       67       +3     
  Lines        4069     4307     +238     
==========================================
- Hits         2498     2421      -77     
- Misses       1383     1716     +333     
+ Partials      188      170      -18     
Impacted Files Coverage Δ
controllers/kernelchaos_controller.go 0.00% <0.00%> (ø)
controllers/podchaos/types.go 65.95% <0.00%> (ø)
controllers/stresschaos_controller.go 0.00% <0.00%> (ø)
pkg/chaosdaemon/netem_linux.go 26.66% <0.00%> (ø)
pkg/chaosdaemon/netlink_linux.go 0.00% <ø> (ø)
pkg/chaosdaemon/stress_server_linux.go 0.00% <0.00%> (ø)
pkg/utils/chaosdaemon.go 51.21% <ø> (ø)
pkg/webhook/config/config.go 17.14% <ø> (-72.86%) ⬇️
pkg/webhook/config/watcher/config.go 41.66% <ø> (-58.34%) ⬇️
pkg/webhook/config/watcher/util.go 75.00% <ø> (ø)
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52fe1eb...dbf292a. Read the comment docs.

pause and start experiment by API (chaos-mesh#542)
Copy link
Member

@cwen0 cwen0 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@fewdan fewdan left a comment

Choose a reason for hiding this comment

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

LGTM

@fewdan
Copy link
Member

fewdan commented May 25, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 25, 2020

/run-all-tests

@sre-bot sre-bot merged commit a380075 into chaos-mesh:master May 25, 2020
@Gallardot Gallardot mentioned this pull request May 25, 2020
sjwsl pushed a commit to sjwsl/chaos-mesh that referenced this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants