Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1.0
-
None
Description
Deploying servers in Rackspace fails because jclouds attempts to use the Nova legacy API to create the related security groups, and the API is no longer available:
Caused by: java.lang.IllegalArgumentException: Security groups are required, but the extension is not available in region IAD! at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:na] at org.jclouds.openstack.nova.v2_0.compute.functions.CreateSecurityGroupIfNeeded.apply(CreateSecurityGroupIfNeeded.java:101) ~[openstack-nova-2.1.0.jar:2.1.0] at org.jclouds.openstack.nova.v2_0.compute.functions.CreateSecurityGroupIfNeeded.apply(CreateSecurityGroupIfNeeded.java:57) ~[openstack-nova-2.1.0.jar:2.1.0] at org.jclouds.openstack.nova.v2_0.compute.loaders.FindSecurityGroupOrCreate.createNewSecurityGroup(FindSecurityGroupOrCreate.java:52) ~[openstack-nova-2.1.0.jar:2.1.0] at org.jclouds.openstack.nova.v2_0.compute.loaders.FindSecurityGroupOrCreate.load(FindSecurityGroupOrCreate.java:43) ~[openstack-nova-2.1.0.jar:2.1.0] at org.jclouds.openstack.nova.v2_0.compute.loaders.FindSecurityGroupOrCreate.load(FindSecurityGroupOrCreate.java:31) ~[openstack-nova-2.1.0.jar:2.1.0] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527) ~[guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319) ~[guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282) ~[guava-18.0.jar:na] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) ~[guava-18.0.jar:na] ... 35 common frames omitted
There is a workaround to configure it to internally use the Neutron API (see this blog post for details). It can be applied as follows when creating the Rackspace context:
Context neutronContext = ContextBuilder.newBuilder("rackspace-cloudnetworks-us") .credentials("username", "api-key") .overrides(<your custom properties>) .modules(<your cusrom modules>) .build(); Module neutronLink = ContextLinking.linkContext("openstack-neutron", Suppliers.ofInstance(neutronContext)); ComputeServiceContext rackspace = ContextBuilder.newBuilder("rackspace-cloudservers-us") .credentials("username", "api-key") .overrides(<your custom properties>) .modules(ImmutableSet.of(neutronLink, <your cusrom modules>)) .buidView(ComputeServiceContext.class);
However, since the cloudservers and cloudnetworks providers will always have the same configuration, jclouds should configure it by default, transparently, when creating a cloudservers context.