-
-
Notifications
You must be signed in to change notification settings - Fork 101
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 the name of its dockerhost machine to the list of labels of a static docker container in Jenkins #2975
Comments
I guess this also acts as a way to schedule jenkins jobs on containers of a specific dockerhost machine, for troubleshooting purposes etc |
Using Python's Jenkins API im able to get the following list
The API doesnt look like it has a method for updating a nodes config |
It does have a method called reconfig_node, which needs an xml input file ( https://python-jenkins.readthedocs.io/en/latest/api.html#jenkins.Jenkins.reconfig_node ) , I wonder if grabbing the nodes existing config as an xml file, updating the file, then using it to reconfig the node, would be a workable approach.. |
We could definitely benefit from having some way of tracking this, and the label is probably the most effective, even though I'm not a great fan of having such long labels! (Although I'm about to propose making it longer!)
As you've seen there are a few ways to approach collating this information (and the one I've used - finding the IP address and then searching for every other system with the same IP isn't as useful or open as what's being proposed here unless that's what your API calls are doing under the covers) I did wonder whether we could do it in nagios but a jenkins label is potentially the most useful. I'd recommend following the same label format used for selecting test machines and using a "three dots" separated label of Related: There may be benefit in having a tag to indicate that a host is a docker static container. While you could filter on the |
Yep https://ci.adoptium.net/label/hw.dockerhost.dockerhost-equinix-ubuntu2004-armv8-1/ Done |
A bit of confusion with dockerhost-osuosl-ubuntu2204-aarch64-1. Its in Jenkins, https://ci.adoptium.net/computer/dockerhost-osuosl-ubuntu2204-aarch64-1/, has no containers in Jenkins, and is not in the inventory.yml. I can ssh into it, and it has one centos8 container running
@sxa @steelhead31 Any idea about this machine? |
It doesnt ring any bells, this seems to mention it.. #2808 (comment) |
I suspect that was there for initial testing of testing and has now been superceded by the other dockerhost machine. We should probably create an issue for it to be set up with some real containers - CentOS8 isn't a supported OS any more so I'd suggest that container is not particularly useful. Feel free to create an issue to set it up properly since it seems possible that it's not being used at present. |
For the alpine containers on any of these dockerhosts, I've changed their labels to |
Created the issue here #2991 This issue can be closed |
For example, on https://ci.adoptium.net/computer/test-docker-ubuntu2004-armv7l-1/ I have added the label
dockerhost:dockerhost-equinix-ubuntu2004-armv8-1hw.dockerhost.dockerhost-equinix-ubuntu2004-armv8-1 so that I can list the static docker containers hosted on dockerhost-equinix-ubuntu2004-armv8-1 in jenkins.Adding
dockerhost-equinix-ubuntu2004-armv8-1
as a label (without the dockerhost:) will not work; jenkins jobs scheduled to run on dockerhost-equinix-ubuntu2004-armv8-1 will instead run on any static docker container that hasdockerhost-equinix-ubuntu2004-armv8-1
as a label, so I feel thatdockerhost:dockerhost-equinix-ubuntu2004-armv8-1
is more appropriate.I would like to implement this on the existing static docker containers in Jenkins, as well as make it standard practice when creating new static containers.
If anyone has any ideas for improvement, please feel free to share
The text was updated successfully, but these errors were encountered: