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

Add a new type of Job: DefragJob #2375

Merged
merged 5 commits into from
Nov 29, 2023
Merged

Conversation

twang-ps
Copy link
Contributor

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.

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;
Copy link
Member

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 ?

Copy link
Contributor Author

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.

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;
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

This PR is stale because it has been in review for 3 days with no activity.

@twang-ps twang-ps merged commit 759bca7 into libopenstorage:master Nov 29, 2023
3 checks passed
twang-ps added a commit to twang-ps/openstorage that referenced this pull request Jul 9, 2024
(cherry picked from commit 759bca7)
Signed-off-by: Tengxiao Wang <[email protected]>
twang-ps added a commit that referenced this pull request Jul 10, 2024
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants