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
Allow slave process to use the slave memory specified in the configuration #30
Conversation
plugins » mesos-plugin #74 SUCCESS |
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
@@ -312,7 +312,7 @@ private void createMesosTask(Offer offer, Request request) { | |||
CommandInfo | |||
.newBuilder() | |||
.setValue( | |||
String.format(SLAVE_COMMAND_FORMAT, request.request.mem, | |||
String.format(SLAVE_COMMAND_FORMAT, request.request.slaveJarMem, |
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.
I'm confused. Why is the slave being started with "slaveJarMem" instead of "request.request.mem"? Don't we have to account for Jenkins executor's memory? Do Jenkins executors get their own JVM?
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.
Yes, when executors execute builds, they are spurned as new processes.
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.
I see. Thanks.
Also, please squash the commits. |
Can you rebase and address comments? If you don't want to create and pass "Resources" object in this review, you could just pass "numExecutors, slaveCpus, slaveMem, execuorCpus and executorMem" around instead of "cpus, mem and slaveJarMem". I think thats cleaner. |
plugins » mesos-plugin #85 FAILURE |
plugins » mesos-plugin #90 SUCCESS |
|
||
public SlaveRequest(JenkinsSlave slave, double cpus, int mem, String label, String jvmArgs) { | ||
public SlaveRequest(JenkinsSlave slave, double cpus, int mem, String label, String jvmArgs, int slaveMem) { |
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.
Lets make 'slaveMem' the 4th argument (after "mem") instead of last.
Hey Chris. Made some minor comments. Once you fix them and squash all the commits into one, I will merge it. Thanks! |
Chris, if you can rebase and squash the commits (after addressing the comments) i can merge it and release 0.3. |
This PR is quite stale at this point. Please send a new one if this fix is still needed. |
Summary: This enables the plugin to actually run builds on Mesos. I validated the behavior manually since a full integration test requires some work with the Jenkins fixture. To get everything working I added a template for pod specs that is configured by users and introduced the provisioning strategy. We also go back to Java 8 since some Jenkins components do not support Java 11 yet. JIRA issues: DCOS_OSS-5056
Jenkins Slave Memory wasn't used to start slave process.