-
Notifications
You must be signed in to change notification settings - Fork 85
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
Cannot launch GCE agents when plugin configured with JCasC #53
Comments
Here are the logs of JCasC configuring my Jenkins instance:
And the logs when I try to perform a build:
|
I would say that |
@ingwarsw I'm not too familiar with this plugin, but happy to be a guinea pig for an experimental fix, as I'm working on an ephemeral Jenkins master configured with JCasC at the moment. I see |
@robincsmith Can you try using code from #54 |
Yes - I can try building and installing that today |
This doesn't fix the other issue I mentioned (GCE slaves disconnected after a JCasC config reload), but that might be a more general issue with JCasC - it seems to remove all ephemeral nodes (coming from plugins like this one, or the Docker / Yet Another Docker plugins) when JCasC config is reloaded |
@robincsmith In your config you have |
Yes - I think that's what causes the disconnection issue |
@robincsmith I think I fixed it, see jenkinsci/configuration-as-code-plugin#804 |
Thanks @ingwarsw! I built and deployed the plugin into my local environment. With your changes, the nodes do indeed persist when I click 'Reload existing configuration' or 'Apply new configuration'. However, clicking either those buttons also results in Demon Jenkins, with the following stacktrace:
That seems to apply to ephemeral nodes added by the 'Docker' plugin. If I only have ephemeral GCE nodes active when I reload the config, no error is thrown. I guess that could be an issue with the underlying plugin? Or might it be something that can be remedied here? |
Should be an easy fix for in the docker plugin. Though depends on how long PRs sit. |
@Casz @robincsmith Docker plugin could fix it (and probably should) but I can fix It also in PR (at least I think so).. |
And personally I think that checking by |
Perhaps check isInstantiable last if the other two are |
Perhaps fix E2C while we are at it 😕 |
They should implement their nodes based on |
I'm not sure exactly where to report this, given the plethora of PRs that have been raised (thanks for that!), but my testing has confirmed the following:
|
@robincsmith see https://groups.google.com/forum/#!searchin/jenkinsci-dev/maintainer$20role$20clarification%7Csort:date/jenkinsci-dev/BLIfRisUyag/NRfv7QzdBAAJ regarding Nicolas current maintainer status. Hopefully, he is willing to review it 😅 |
🤞🤞🤞 |
👍 nice work, @Casz :-) |
@stephenashank I think it can be closed.. AFAIK all issues with JCasC was resolved.. |
Hi all,
When configuring this plugin using JCasC, GCE agent VMs will not launch. The relevant fields seems to be populated in the Jenkins 'Configure System' UI, but the VMs are not able to launch until Jenkins' configuration is saved using the UI.
Here is my JCasC configuration relating to this plugin. In my case, I'm creating a brand new Jenkins instance from scratch, as you might do when running the Jenkins master in a Docker container.
I did a comparison of
config.xml
before and after hitting save in the UI, and there's no difference in the GCE plugin configuration section, but Jenkins is suddenly able to launch GCE VMs.(For the fields marked with '#' above, I initially tried leaving out that configuration entirely from the JCasC configuration, but it got added to Jenkins'
config.xml
when I hit 'save' in the Jenkins 'Configure System' UI (and still had the same problem of no VMs launching). In order to minimise the diff between the state ofconfig.xml
before an after hitting save in the UI, I added it to the JCasC configuration.)As noted by @devqore in this JCasC issue Google Compute nodes are also being disconnected during a JCasC configuration reload - if Jenkins has more than one permanent node configured in addition to the GCE nodes.
The text was updated successfully, but these errors were encountered: