jenkinsci / nomad-plugin

Nomad cloud plugin for Jenkins
https://plugins.jenkins.io/nomad/
MIT License
56 stars 41 forks source link

Allow to specify Java args for Jenkins client #26

Closed zstyblik closed 2 years ago

zstyblik commented 6 years ago

Hello,

I'm under suspicion that Jenkins Java agent is being killed in Docker Container, although I simply cannot confirm it. This seems to be happening only with one CI job so far(luckily) which runs FB's flow. When executed in unconstrained Docker Container, however via SSH, or in VM, it runs just fine.

I did read a bit and it seems that running Java in Docker Container has its own issues. Therefore, I'm wondering whether somebody else is experience such issues.

More, I believe it would be great to provide way to pass args to Java which runs Jenkins client. Perhaps, this could be a "global" option since I don't see need to specify it per instance. I understand this will make things a bit complicated.

Thanks in advance for any feedback.

zstyblik commented 6 years ago

I have found couple issues which point to this, Java being OOMK, could be the issue.

I have tried variations of command prefix export MALLOC_ARENA_MAX=4; export JAVA_OPTIONS='-Xms300M -Xmx300M -XX:MaxPermSize=128M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC' but to no avail. :(

zstyblik commented 6 years ago

Ok, we've identified that % flow; is to blame for mishaps. I still think this request is valid since Java has no notion it's running in constrained environment. I will try to come up with MR once https://github.com/jenkinsci/nomad-plugin/pull/17, https://github.com/jenkinsci/nomad-plugin/pull/23 and https://github.com/jenkinsci/nomad-plugin/pull/24 are merged.

phedoreanu commented 5 years ago

@zstyblik all PRs mentioned above are merged. Do you still want to submit your PR or should I close this issue?

multani commented 2 years ago

82 (v0.9+) makes the Nomad job completely configurable, it should now be possible to pass arbitrary Java arguments when a job is submitted.