Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.7.1
Description
I contributed security groups support to JClouds plugin (which is currently using JClouds 1.7.1) by inserting the following lines (https://github.com/jenkinsci/jclouds-plugin/blob/master/jclouds-plugin/src/main/java/jenkins/plugins/jclouds/compute/JCloudsSlaveTemplate.java):
TemplateBuilder templateBuilder = getCloud().getCompute().templateBuilder(); //Some code here... Template template = templateBuilder.build(); TemplateOptions options = template.getOptions(); options.securityGroups(securityGroups); //Other options here... NodeMetadata nodeMetadata = getOnlyElement(getCloud().getCompute().createNodesInGroup(name, 1, template));
I'm using securityGroups = "default". What I'm seeing in the logs is:
INFO: >> running 1 node group(rhel-fog) location(Yandex-Search-SAS1) image(Yandex-Search-SAS1/861ddce1-5023-4f82-b791-886ede63c4c6) hardwareProfile(Yandex-Search-SAS1/301b9023-9450-4c1e-8bca-c3d801cf1ef6) options({loginUser=root, loginPasswordPresent=true, loginPrivateKeyPresent=true, scriptPresent=true, securityGroups=[default], userMetadata={Name=rhel-fog}, networks=[7425cc8f-2def-4a7b-8aaa-08c573903920], autoAssignFloatingIp=false, userData=[B@7e05fb0b}) Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: >> creating securityGroup {zoneId=Yandex-Search-SAS1, name=jclouds-rhel-fog, ports=[22]} Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << created securityGroup(SecurityGroup{id=edfda750-c6a8-422a-ac6f-f5510a3c575d, tenantId=6dbfa7e218d84383ae9d2529bf97e187, name=jclouds-rhel-fog, description=jclouds-rhel-fog, rules=null}) Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: >> authorizing securityGroup(SecurityGroup{id=edfda750-c6a8-422a-ac6f-f5510a3c575d, tenantId=6dbfa7e218d84383ae9d2529bf97e187, name=jclouds-rhel-fog, description=jclouds-rhel-fog, rules=null}) permission to 0.0.0.0/0 on port 22 Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: << authorized securityGroup(SecurityGroup{id=edfda750-c6a8-422a-ac6f-f5510a3c575d, tenantId=6dbfa7e218d84383ae9d2529bf97e187, name=jclouds-rhel-fog, description=jclouds-rhel-fog, rules=null}) permission to 0.0.0.0/0 on port 22 Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: >> adding node location(Yandex-Search-SAS1) name(rhel-fog-f21) image(861ddce1-5023-4f82-b791-886ede63c4c6) hardware(301b9023-9450-4c1e-8bca-c3d801cf1ef6) Mar 12, 2014 3:01:28 PM org.jclouds.logging.jdk.JDKLogger logInfo INFO: >> creating new server zone(Yandex-Search-SAS1) name(rhel-fog-f21) image(861ddce1-5023-4f82-b791-886ede63c4c6) flavor(301b9023-9450-4c1e-8bca-c3d801cf1ef6) options({securityGroupNames=[jclouds-rhel-fog], metadata={Name=rhel-fog, jclouds-group=rhel-fog}, userData=, networks=[7425cc8f-2def-4a7b-8aaa-08c573903920]})