You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Ivan Krutov (JIRA)" <ji...@apache.org> on 2014/03/12 14:02:43 UTC

[jira] [Created] (JCLOUDS-496) TemplateOptions securityGroups() method doesn't work in Openstack-Nova

Ivan Krutov created JCLOUDS-496:
-----------------------------------

             Summary: TemplateOptions securityGroups() method doesn't work in Openstack-Nova
                 Key: JCLOUDS-496
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-496
             Project: jclouds
          Issue Type: Bug
    Affects Versions: 1.7.1
            Reporter: Ivan Krutov


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):
{code: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));
{code}

I'm using securityGroups = "default". What I'm seeing in the logs is:
{code}
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]})
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)