[ 
https://issues.apache.org/jira/browse/JCLOUDS-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16552224#comment-16552224
 ] 

Yang Yongsheng commented on JCLOUDS-1434:
-----------------------------------------

Hello, [~andreaturli] yes, please check the #groupNamePolicy.png, also here:
{noformat}
Enter a name up to 255 characters long. You can use ASCII characters for 
EC2-Classic security groups, or a-z, A-Z, 0-9, spaces, and 
._-:/()#,@[]+=&;{}!$* for VPC security groups. The name can't be edited after 
the security group is created.
{noformat}
will we have plan to improve here?

> create Ec2 instance failed if security group contains a pace in its name 
> -------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1434
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1434
>             Project: jclouds
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Yang Yongsheng
>            Priority: Major
>         Attachments: groupNamePolicy.png, image-2018-07-20-16-25-22-749.png
>
>
> I use the latest Jcloud, 2.1.0, create Ec2 instance with Compute API, but get 
> error if the security group name has space:
> {noformat}
> Caused by: java.lang.IllegalArgumentException: Object 'yang test1' doesn't 
> match dns naming constraints. Reason: Should have lowercase ASCII letters, 
> numbers, or dashes.
> at 
> org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74)
> at 
> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:66)
> at 
> org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36)
> at 
> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124)
> at 
> org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120)
> at 
> org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.getSecurityGroupsForTagAndOptions(CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.java:168)
> at 
> org.jclouds.aws.ec2.compute.strategy.CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.addSecurityGroups(CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java:200)
> at 
> org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.execute(CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions.java:80)
> at 
> org.jclouds.aws.ec2.compute.strategy.CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.execute(CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java:89)
> at 
> org.jclouds.aws.ec2.compute.strategy.CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.execute(CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java:56)
> at 
> org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.createKeyPairAndSecurityGroupsAsNeededThenRunInstances(EC2CreateNodesInGroupThenAddToSet.java:213)
> at 
> org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.runInstancesAndWarnOnInvisible(EC2CreateNodesInGroupThenAddToSet.java:151)
> at 
> org.jclouds.ec2.compute.strategy.EC2CreateNodesInGroupThenAddToSet.execute(EC2CreateNodesInGroupThenAddToSet.java:132)
> at 
> org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:215)
> at 
> org.jclouds.ec2.compute.EC2ComputeService.createNodesInGroup(EC2ComputeService.java:151){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to