-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
mesos module: add running tasks in service tests #19825
Conversation
@kamilchm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @offlinehacker, @benley and @qknight to be potential reviewers. |
def statusUpdate(self, driver, update): | ||
if update.state == mesos_pb2.TASK_FAILED: | ||
driver.stop() | ||
sys.exit(1) |
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 this end up logging anything useful for debugging if it fails?
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.
This looks really good! Just a few tiny comments/questions
$slave->waitForOpenPort(5051); | ||
|
||
# is slave registred? | ||
$master->waitUntilSucceeds("curl --fail http://master:5050/master/slaves". |
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.
if you're trying to reduce output clutter, you might also want to use curl -s
and grep -q
here
chmod +x $out/mesos_test.py | ||
|
||
echo "done" > test.result | ||
tar czvf $out/test.tar.gz test.result |
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.
Maybe skip the v, just do tar czf
$master->succeed("${pkgs.mesos}/bin/mesos-execute --master=master:5050". | ||
" --resources=\"cpus:0.1;mem:32\" --name=simple-docker". | ||
" --containerizer=docker --docker_image=echo". | ||
" --shell=false --command=\"done\" | grep TASK_FINISHED"); |
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.
grep -q
here too
Would I be able to run these tests on CentOS with Nix and Nixpkgs installed? If so, how? Also, does this test the |
@benley thx for comments, I fixed all. @philip-wernersbach could you provide |
@kamilchm I'll create a |
I'm going to try to expand on this work soon. I'm making decent progress on packaging Mesos 1.1.0 here: #21416 |
Motivation for this change
Mesos needs better automatic checks when upgrading. Each update can brake some kind of tasks (#19064).
I want to have tests for my use cases, where I need to spawn docker or task provided as
.tar.gz
.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)CC: @cstrahan, @kevincox, @benley, @philip-wernersbach