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

UI: Server-side reschedule tracking #4254

Merged
merged 16 commits into from
May 10, 2018
Merged

Conversation

DingoEatingFuzz
Copy link
Contributor

Nomad 0.8 introduced the ability for Nomad to automatically reschedule allocations on different nodes in an effort to get jobs running in the event that it's not the job artifact, but the node that is faulty.

Now the UI has the ability to track all the times allocations were automatically rescheduled.

Allocation rows are marked with an icon to denote that it has already been rescheduled
screen shot 2018-05-04 at 7 42 48 pm

The allocation detail view shows a timeline of all reschedule events prior to the allocation
screen shot 2018-05-04 at 7 43 29 pm

If Nomad gives up rescheduling (based on the reschedule stanza in the job spec) the UI will report that too
screen shot 2018-05-04 at 7 44 23 pm

Clicking through allocations will update the timeline and always show the next allocation when not viewing the last reschedule
screen shot 2018-05-04 at 7 44 38 pm

When viewing the reschedule events timeline while rescheduling is still occurring, the UI will automatically update with the next allocation once it's scheduled and the amount of time remaining before scheduling when Nomad is intentionally delaying
screen shot 2018-05-04 at 8 02 08 pm

@@ -23,4 +23,6 @@ export default Model.extend({
job: belongsTo('job'),

modifyIndex: attr('number'),

waitUntil: attr('date'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want this as a string and then parse it out when you need to use it? Fine if the answer is "no", just wanted to call out that date parsing on models is (unless they changed that recently) eager (which could be totally fine here).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've been trying to do the things the expected way until it becomes a problem. Since evaluations don't get loaded by the thousands, I think this is okay here.

import shortUUIDProperty from '../utils/properties/short-uuid';

export default Fragment.extend({
allocation: fragmentOwner(),
Copy link
Contributor

Choose a reason for hiding this comment

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

huh TIL about fragmentOwner

// the time (precise to ms) as a date, and store the remaining ns
// as a number to deal with when it comes up.
hash.TimeNanos = hash.RescheduleTime % 1000000;
hash.Time = Math.floor(hash.RescheduleTime / 1000000);
Copy link
Contributor

Choose a reason for hiding this comment

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

👌 nice solution

Copy link
Contributor

@meirish meirish left a comment

Choose a reason for hiding this comment

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

Just had one minor comment - look really nice (code and styling). 🙌

@DingoEatingFuzz DingoEatingFuzz merged commit c35e7f6 into master May 10, 2018
@DingoEatingFuzz DingoEatingFuzz deleted the f-ui-ss-restart-tracking branch May 10, 2018 23:17
@github-actions
Copy link

github-actions bot commented Mar 4, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants