Feature #6978
closedteuthology: split out tasks
0%
Description
These should probably be decouple more.
Files
Updated by Anonymous over 10 years ago
It makes sense for the teuthology program itself to be more independent of all the tasks. I am not sure what the right way of doing this is, but someone in the future may not want to have teuthology but not have all the excess tasks that they are not interested in testing. Also, we may have customers using teuthology who want to develop their own tasks but not make them publically available.
Updated by Zack Cerza almost 10 years ago
- Parent task deleted (
#8012)
Apparently this can't be a Feature and have a parent task. We need this for #8012.
Updated by Zack Cerza almost 10 years ago
- Tracker changed from Subtask to Feature
Updated by Ian Colle almost 10 years ago
- Target version changed from sprint7 to sprint8
Updated by Zack Cerza almost 10 years ago
- Status changed from New to In Progress
So, this is clearly going to be a big undertaking. I'm currently thinking, researching, and hacking together a plan which I'll post once it's at least half baked.
Updated by Zack Cerza almost 10 years ago
- crontab -> run-suites.sh (simple wrapper around update.sh and schedule_suite.sh)
- run-suites.sh -> update.sh (checks out ceph-qa-suite branch)
- run-suites.sh -> schedule_suite.sh (decides on teuthology branch)
- schedule_suite.sh -> teuthology-suite (generates job configs)
- teuthology-suite -> teuthology-schedule
- teuthology-schedule -> beanstalkd
- beanstalkd -> teuthology-worker (checks out teuthology branch)
- teuthology-worker -> teuthology (actually runs job)
Updated by Zack Cerza almost 10 years ago
- Merge teuthology tasks with ceph-qa-suite
- Create a teuthology-tasks repo and add it as a submodule to ceph-qa-suite
- Create a teuthology-tasks repo and add it as a submodule to teuthology
- Create a teuthology-tasks repo and keep it fully separate
- Could definitely work; would potentially have to re-work update.sh.
- Could work with similar caveats to the 'merge' option, but would be more complex
- Would add too much complexity IMO
- Could also work well.
I think I'm down to 'merge' or 'separate'; I'll come up with a more detailed analysis before moving forward.
Updated by Sage Weil almost 10 years ago
Zack Cerza wrote:
Here are the possibilities that I see for how to organize the new teuthology, tasks, and ceph-qa-suite:And here's what I think about them:
- Merge teuthology tasks with ceph-qa-suite
- Create a teuthology-tasks repo and add it as a submodule to ceph-qa-suite
- Create a teuthology-tasks repo and add it as a submodule to teuthology
- Create a teuthology-tasks repo and keep it fully separate
- Could definitely work; would potentially have to re-work update.sh.
- Could work with similar caveats to the 'merge' option, but would be more complex
- Would add too much complexity IMO
- Could also work well.
I think I'm down to 'merge' or 'separate'; I'll come up with a more detailed analysis before moving forward.
I'm inclined toward #1 just because it means a single repo for the tests, which are frequently updated together. Also simpler, fewer moving parts, etc.
update.sh is a hack so not too worried about that :)
Updated by Zack Cerza almost 10 years ago
Yeah, I'd been leaning toward that one.
I'm thinking it will make sense to roll run-suites.sh and update.sh into schedule_suite.sh - but I also want all that to be written in python so that it can share code with the rest of teuthology.
Edit: #6343
Updated by Sage Weil almost 10 years ago
- Target version changed from sprint8 to sprint9
Updated by Zack Cerza almost 10 years ago
Now that #6343 is done, here is what needs to happen:
- tasks need to be split from
teuthology
and added toceph-qa-suite
in atasks/
subdir teuthology-suite
needs to record whichsuite_branch
is used in job configsteuthology-worker
needs to start checking out copies ofceph-qa-suite
- the branch is either the same as the ceph branch, or thesuite_branch
passed toteuthology-suite
- I need to figure out how teuthology should import the tasks. Perhaps adding
.../ceph-qa-suite_{branch}/tasks/
tosys.path
inteuthology.run_tasks
.
The teuthology-suite
and teuthology-worker
changes will probably happen in master before anything else. If that's too scary then I can create a separate branch, and have the scheduler and workers use that branch - but that's more complicated and not necessarily more helpful.
Once that is done, I think making the run_tasks
changes might come next - so that a few jobs can be run to shake out any bugs before the actual split happens. That way, I will also be able to test the split separately in dedicated teuthology
and ceph-qa-suite
branches (let's say split_tasks
and merge_tasks
respectively) and fix the inevitable bugs. Then, we can merge those in to the respective master branches and make the corresponding changes to teuthology
's and ceph-qa-suite
's dumpling
and firefly
branches.
Updated by Zack Cerza almost 10 years ago
- Target version changed from sprint9 to sprint10
Updated by Zack Cerza almost 10 years ago
I'm doing preliminary work in this branch:
https://github.com/ceph/teuthology/compare/split_prep?expand=1
In my typical fashion, the branch contains some refactoring, enhancements to existing chunks of the framework, and unit tests for those changes. I plan to use those changes in other areas of teuthology when I touch them next.
Anyway, back to the point. So far, I have:teuthology-suite
recording thesuite_branch
and storing it in the job configteuthology-worker
usingsuite_branch
to check out a copy ofceph-qa-suite
teuthology-worker
adding theceph-qa-suite
checkout to thePYTHONPATH
of the job so it picks up the right tasks
- Get that branch reviewed and merged, and shake out bugs
- Split tasks in a
teuthology
branch and add them to aceph-qa-suite
branch - Run a few jobs to shake out bugs
- Fix the bugs
- Backport the splits to the
dumpling
andfirefly
branches ofteuthology
andceph-qa-suite
Updated by Zack Cerza almost 10 years ago
- Subject changed from Teuthology: The program vs. tasks. to teuthology: split out tasks
Updated by Zack Cerza almost 10 years ago
Zack Cerza wrote:
teuthology-worker
usingsuite_branch
to check out a copy ofceph-qa-suite
I had to remove this since it relied on GitPython, and it turns out it's buggy and unmaintained.
Updated by Zack Cerza almost 10 years ago
Updated by Zack Cerza almost 10 years ago
- Translation missing: en.field_story_points set to 16.0
Updated by Zack Cerza almost 10 years ago
Now that it seems the pre-split work is done and the bugs are all fixed, I'm working on the actual logistics of splitting out teuthology.git/teuthology/task/
, retaining its history, and moving into ceph-qa-suite.git/tasks/
.
Updated by Zack Cerza almost 10 years ago
Alright. I have the above figured out: a script that can import tasks from teuthology.git
to ceph-qa-suite.git
while retaining each file's history. It will be easy to make it also remove the tasks from teuthology.git
.
teuthology/task_util/
- move it along with the tasks? Maybetasks/util/
?- Adjusting all the references that cross the
teuthology
<->/tasks/
boundary.
Lots of tasks do things like:
from ..orchestra import run
They'll have to be modified to do (I think):
from teuthology.orchestra import run
Also, teuthology.run_tasks
does:
from .task import interactive
I think it will simply have to be:
from tasks import interactive
I think all these will have to be adjusted manually.
Updated by Zack Cerza almost 10 years ago
Maybe it's time to start that process with one of the branches. I might want to do dumpling
first since master
may have PRs and other changes come in while I'm doing all this. An outline of the process could look like:
- Create a
teuthology/split_dumpling
based onteuthology/dumpling
- Create a
teuthology/split_master
based onteuthology/master
- Create a
ceph-qa-suite/merge_dumpling
based onceph-qa-suite/dumpling
- Move
teuthology.task
andteuthology.task_util
fromteuthology
toceph-qa-suite
- Update references in
/tasks/
- Update
teuthology/split_master
to look for tasks in the right place - Port tasks in
ceph-qa-suite/merge_dumpling
to use updated APIs inteuthology/split_master
- Run some tests using
teuthology/split_master
andceph-qa-suite/merge_dumpling
- Fix bugs
- Merge
ceph-qa-suite/merge_dumpling
withceph-qa-suite/dumpling
- Delete
teuthology/split_dumpling
andteuthology/dumpling
Also, another problem to be solved is: how to handle the running of non-scheduled jobs. I suppose we'll have to use repo_utils
to fetch the ceph-qa-suite
repo; shouldn't be a big deal.
Updated by Zack Cerza almost 10 years ago
The migration script was almost done when I realized that teuthology
actually uses code from a few of the tasks. Sage and I decided that the right thing to do would be to actually keep a couple of the tasks inside teuthology
- so we'd have 'internal' tasks and 'external' tasks.
I'm going through everything right now to decide which will be which.
Updated by Zack Cerza almost 10 years ago
Note to self: Don't forget to update dumpling
tasks to reflect the movement of adjust-ulimits
to $PATH
Updated by Zack Cerza over 9 years ago
- File repo_merge.sh added
- Status changed from In Progress to Resolved
- Translation missing: en.field_story_points changed from 16.0 to 30.0
Finally done. Here are some of the relevant commits:
Add tasks to master:
https://github.com/ceph/ceph-qa-suite/commit/650607385b506bac0bdc53362910f8d3ff064759#diff-d41d8cd98f00b204e9800998ecf8427e
Remove tasks from master:
https://github.com/ceph/teuthology/commit/5b5f02ecd2c296fd5591a3d00d29f3e8a1bfdb08#diff-d41d8cd98f00b204e9800998ecf8427e
Add tasks to dumpling:
https://github.com/ceph/ceph-qa-suite/commit/06d4b78d4f20e6f3810350951a30714de5417384#diff-d41d8cd98f00b204e9800998ecf8427e
Add tasks to firefly:
https://github.com/ceph/ceph-qa-suite/commit/6967e6c61488d159a772a6574476e903ea465cc4#diff-d41d8cd98f00b204e9800998ecf8427e
I've also attached the script that I used to perform the migration.
Updated by Zack Cerza over 9 years ago
- File repo_merge.sh repo_merge.sh added
Attaching the actual script I used.