-
Notifications
You must be signed in to change notification settings - Fork 84
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
Adds support for floating IP pools #21
Conversation
- Adds support for selecting a floating IP pool as part of the instance template. The Neutron networks available in this list are ones that are set to external:router True. - Introduces a configurable delay before launching SSH slaves. This allows the operator to work around slow availability of SSH on the slave instance.
@@ -428,6 +435,46 @@ public ListBoxModel doFillNetworkIdItems(@RelativePath("..") @QueryParameter Str | |||
return m; | |||
} | |||
|
|||
public ListBoxModel doFillFloatingIpPoolIdItems(@RelativePath("..") @QueryParameter String identity, |
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.
@Restricted(NoExternalUse.class)
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.
@olivergondza Should I add that annotation to the doFillFloatingIpPoolIdItems method? I didn't see that used anywhere else in the source and this is my first time delving into Jenkins plugin development.
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.
It is a best practice for methods that are exposed for jelly/databinding and needs to be public
. This clearly declares that it is not a part of plugin API.
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.
Thanks!
How does the problem of not available ssh manifests? |
In my case, the launch method will immediately fail due to a connection error. I'd tried setting the various retry options in the SSHLauncher and never really saw retries happening. Other attempts just have an ssh connection hanging seemingly indefinitely e.g. several minutes. Given enough time I could successfully launch the slave manually via the Jenkins UI. |
I have run into some problems with ssh Launcher not able to complete without Relaunch slave agent. It seems that when invoked from openstack plugin it is not configured to timeout/retry the connection. I prefer a way for Jenkins to detect if the slave is ready over configurable waittimes. |
Same problem here with the ssh launcher. It tries to connect before the instance is ready to accept SSH connections, either because it's launching or not even connected to the network (connection refused sometimes, no route to host other times), and it doesn't retry anymore. |
I agree that a more nuanced, intelligent approach is the right path forward for solving this. I will see if I can rework this request to address that. |
@signed8bit, I have implemented the pool selection in #46 and created #54 to cover the ssh launch problem. Closing the PR if you do not mind. |
Thanks @olivergondza I'll give the latest a go and see how it works in our environment. |
Do not hurry deploying to production, there as some things to fix before 2.1. |
Gotcha. Nope going to experiment with it in my test infrastructure first. Our target cloud has moved from Havana to Icehouse so I am curious if our SSH delay needs are as drastic as they were before. |
In my environment I ran into two problems with the latest version of the plugin. The first being the inability of jclouds to create and assign a floating IP without specifying a floating ip pool. This occurred where there were no existing IPs available in the pool. The second was Jenkins not being able to launch the node via SSH due to a variable delay in a instance with a floating IP becoming accessible over SSH. This pull request contains my changes to get the plugin working and should be useful to others.
template. The Neutron networks available in this list are ones that
are set to external:router True.
allows the operator to work around slow availability of SSH on the
slave instance.