Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
eb75a330
Commit
eb75a330
authored
Apr 04, 2018
by
hangaoshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixtodo:generate an event for a missed starting window
parent
d3bed1e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
cronjob_controller.go
pkg/controller/cronjob/cronjob_controller.go
+2
-3
No files found.
pkg/controller/cronjob/cronjob_controller.go
View file @
eb75a330
...
@@ -273,9 +273,8 @@ func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobCo
...
@@ -273,9 +273,8 @@ func syncOne(sj *batchv1beta1.CronJob, js []batchv1.Job, now time.Time, jc jobCo
}
}
if
tooLate
{
if
tooLate
{
glog
.
V
(
4
)
.
Infof
(
"Missed starting window for %s"
,
nameForLog
)
glog
.
V
(
4
)
.
Infof
(
"Missed starting window for %s"
,
nameForLog
)
// TODO: generate an event for a miss. Use a warning level event because it indicates a
recorder
.
Eventf
(
sj
,
v1
.
EventTypeWarning
,
"MissSchedule"
,
"Missed scheduled time to start a job: %s"
,
scheduledTime
.
Format
(
time
.
RFC1123Z
))
// problem with the controller (restart or long queue), and is not expected by user either.
// TODO: Since we don't set LastScheduleTime when not scheduling, we are going to keep noticing
// Since we don't set LastScheduleTime when not scheduling, we are going to keep noticing
// the miss every cycle. In order to avoid sending multiple events, and to avoid processing
// the miss every cycle. In order to avoid sending multiple events, and to avoid processing
// the sj again and again, we could set a Status.LastMissedTime when we notice a miss.
// the sj again and again, we could set a Status.LastMissedTime when we notice a miss.
// Then, when we call getRecentUnmetScheduleTimes, we can take max(creationTimestamp,
// Then, when we call getRecentUnmetScheduleTimes, we can take max(creationTimestamp,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment