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

feature: pause for certain duration #1016

Closed
wants to merge 33 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9197064
pause for certain duration
Yiyiyimu Oct 3, 2020
ca112cd
fix logic to get next recover
Yiyiyimu Oct 3, 2020
b786c39
check if pausetime input is legal
Yiyiyimu Oct 3, 2020
57238ac
empty pause when start
Yiyiyimu Oct 3, 2020
c15d8d7
fix typo
Yiyiyimu Oct 3, 2020
b8e12d9
requeue for pausetime
Yiyiyimu Oct 3, 2020
b4e10f4
rm duplicate logic
Yiyiyimu Oct 3, 2020
6be26fe
merge master
Yiyiyimu Oct 24, 2020
bdd628b
fix check
Yiyiyimu Oct 24, 2020
0e91edd
merge master
Yiyiyimu Nov 28, 2020
29f6cbb
fix check
Yiyiyimu Nov 28, 2020
805d3a6
WIP in pausing for multi cycles
Yiyiyimu Nov 30, 2020
7397c39
use scheduler.autoresume to set resume time
Yiyiyimu Dec 3, 2020
79c77e8
Merge branch 'master' of https://github.com/chaos-mesh/chaos-mesh int…
Yiyiyimu Dec 3, 2020
bb3431d
refine e2e test
Yiyiyimu Dec 3, 2020
2dc27d7
fix CI
Yiyiyimu Dec 3, 2020
56e4066
fix typo
Yiyiyimu Dec 3, 2020
0137c95
merge master
Yiyiyimu Dec 16, 2020
29256f8
compatible with state machine
Yiyiyimu Dec 16, 2020
57c26b0
test with fault
Yiyiyimu Dec 17, 2020
55313b8
fix: only set autoResume once
Yiyiyimu Dec 17, 2020
ec67061
merge master
Yiyiyimu Dec 21, 2020
7c91b35
fix: change SetPause() to RecoverPause()
Yiyiyimu Dec 21, 2020
1512c0d
Merge branch 'master' into pause-time
cwen0 Dec 22, 2020
579461d
fix grammar
Yiyiyimu Dec 29, 2020
ae08433
Merge branch 'pause-time' of https://github.com/yiyiyimu/chaos-mesh i…
Yiyiyimu Dec 29, 2020
0236b90
use two separate annotation key as pause & pauseDuration
Yiyiyimu Dec 29, 2020
2eb8813
fix CI
Yiyiyimu Dec 29, 2020
19cf31d
Merge branch 'master' into pause-time
zhouqiang-cl Jan 11, 2021
664fb2f
Merge branch 'master' into pause-time
cwen0 Jan 13, 2021
d62dba3
Merge branch 'master' into pause-time
Yiyiyimu Feb 17, 2021
90b09a0
generate for new chaos
Yiyiyimu Feb 18, 2021
3384df0
fix check
Yiyiyimu Feb 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
const (
// PauseAnnotationKey defines the annotation used to pause a chaos
PauseAnnotationKey = "experiment.chaos-mesh.org/pause"
// PauseDurationAnnotationKey defines the annotation used to pause a chaos for certain duration
PauseDurationAnnotationKey = "experiment.chaos-mesh.org/pauseDuration"
)

// LabelSelectorRequirements is list of LabelSelectorRequirement
Expand Down Expand Up @@ -174,6 +176,10 @@ type ScheduleStatus struct {
// Next time when this action will be recovered
// +optional
NextRecover *metav1.Time `json:"nextRecover,omitempty"`

// Time when this action will be auto resumed
// +optional
AutoResume *metav1.Time `json:"autoResume,omitempty"`
}

// ExperimentPhase is the current status of chaos experiment.
Expand Down Expand Up @@ -218,6 +224,9 @@ type InnerSchedulerObject interface {
GetNextRecover() time.Time
SetNextRecover(time.Time)

GetAutoResume() time.Time
SetAutoResume(time.Time)

GetScheduler() *SchedulerSpec
}

Expand All @@ -227,6 +236,8 @@ type InnerSchedulerObject interface {
type InnerObject interface {
IsDeleted() bool
IsPaused() bool
GetPause() string
RecoverPause()
GetChaos() *ChaosInstance
StatefulObject
}
Expand Down