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

scheduler: fix error nextRecover shouldn't be later than nextStart #1214

Closed

Conversation

WangXiangUSTC
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC commented Nov 24, 2020

Signed-off-by: xiang xiang13225080@163.com

What problem does this PR solve?

fix issue #1207

it is easy to meet this error when create a chaos test with "scheduler": {"cron":"*/1 * * * * "}, "duration": "50s"

What is changed and how does it work?

when the chaos is the first time run, set the NextStart for it

Checklist

Tests

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

Side effects

  • Breaking backward compatibility

Related changes

  • Need to update the documentation

Does this PR introduce a user-facing change?

NONE

WangXiangUSTC and others added 4 commits November 24, 2020 13:30
Signed-off-by: xiang <xiang13225080@163.com>
Signed-off-by: xiang <xiang13225080@163.com>
@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #1214 (777b240) into master (7e9ff3f) will decrease coverage by 7.88%.
The diff coverage is 26.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1214      +/-   ##
==========================================
- Coverage   55.78%   47.89%   -7.89%     
==========================================
  Files          68       77       +9     
  Lines        4383     4756     +373     
==========================================
- Hits         2445     2278     -167     
- Misses       1768     2239     +471     
- Partials      170      239      +69     
Impacted Files Coverage Δ
api/v1alpha1/common_types.go 0.00% <0.00%> (ø)
api/v1alpha1/common_webhook.go 100.00% <ø> (ø)
api/v1alpha1/dnschaos_type.go 0.00% <0.00%> (ø)
api/v1alpha1/dnschaos_webhook.go 0.00% <0.00%> (ø)
api/v1alpha1/httpchaos_types.go 0.00% <0.00%> (ø)
api/v1alpha1/iochaos_types.go 0.00% <ø> (-40.00%) ⬇️
api/v1alpha1/jvmchaos_webhook.go 0.00% <0.00%> (ø)
api/v1alpha1/kernelchaos_types.go 0.00% <ø> (-20.00%) ⬇️
api/v1alpha1/kernelchaos_webhook.go 100.00% <ø> (+14.81%) ⬆️
api/v1alpha1/kinds.go 27.27% <ø> (+0.60%) ⬆️
... and 115 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 c7a7d15...777b240. Read the comment docs.

Signed-off-by: xiang <xiang13225080@163.com>
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

@YangKeao
Copy link
Member

YangKeao commented Nov 24, 2020

I think the twophase reconciler is too complicated. There are three parts:

  1. The basic twophase scheduler and retry logic

  2. Support pause

  3. Support updating scheduler

I will try to split them and make this scheduler easier to understand.

@WangXiangUSTC
Copy link
Contributor Author

#1221 will refine the scheduler, so this pr can be closed

@WangXiangUSTC WangXiangUSTC deleted the xiang/scheduler_fix branch November 27, 2020 02:39
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.

None yet

4 participants