-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add a new type of Job: DefragJob #2375
Conversation
Signed-off-by: Tengxiao Wang <[email protected]>
Signed-off-by: Tengxiao Wang <[email protected]>
api/api.proto
Outdated
message DefragJob { | ||
double max_duration_hours = 1; | ||
uint32 max_nodes_in_parallel = 2; | ||
repeated string nodes_select = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"nodes_select" and "node_selector" sound similar - can you rename ?
also add comments to the fields ?
do we need the schedule_id field in the job instance itself ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will change nodes_select
to select_nodes
; change node_selector
to node_label_selector
Will add comments.
The schedule_id
is needed here, because we want to keep track of on which nodes did the defrag schedule stop each time and resume from there next time. We will need to store this information under schedule data structure.
Maybe the other way also works: put the job_id into schedule data structure, and do a EnumerateSelect.
Signed-off-by: Tengxiao Wang <[email protected]>
api/api.proto
Outdated
// can coexist with ExcludeNodes but cannot coexist with IncludeNodes | ||
repeated string node_selector = 5; | ||
// RunningNodes stores the nodes on which the job is currently running | ||
repeated string running_nodes = 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for more context I would name this current_running_nodes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR is stale because it has been in review for 3 days with no activity. |
Signed-off-by: Tengxiao Wang <[email protected]>
(cherry picked from commit 759bca7) Signed-off-by: Tengxiao Wang <[email protected]>
* Add a new type of Job: DefragJob (#2375) (cherry picked from commit 759bca7) * Add defrag status data structures (#2385) (cherry picked from commit def904a) * Add generic schedule structure; add fields for defrag schedule (#2408) (cherry picked from commit 5aaf214) * Add server and APIs for defrag and schedule services (#2426) (cherry picked from commit e80fd7f) * Change OpenStorageSchedule API parameter type to string (#2454) (cherry picked from commit e4b050e)
What this PR does / why we need it:
This PR added DefragJob proto message under the Job data structure. It defines a defragmentation background job running on a cluster.
Testing Notes
Add testing output or passing unit test output here.
Special notes for your reviewer:
Add any notes for the reviewer here.