]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
openstack: rackspace does not support security groups 647/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 3 Oct 2015 23:40:47 +0000 (01:40 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 6 Oct 2015 06:52:25 +0000 (08:52 +0200)
Skip security groups if running against RackSpace and document the
restriction.

http://tracker.ceph.com/issues/13027 Fixes: #13027

Signed-off-by: Loic Dachary <loic@dachary.org>
README.rst
teuthology/openstack/__init__.py

index bd21e2dfdc0fb38aab34c2c55140429976aa8684..b8678de824ec77098099a725cc2a0f6116b7ece8 100644 (file)
@@ -351,14 +351,23 @@ otherwise need to be created via the neutron API.
 Setup OpenStack at OVH
 ----------------------
 
-It is cheaper than EnterCloudSuite but does not provide volumes (as
-of August 2015) and is therefore unfit to run teuthology tests that
-require disks attached to the instance. Each instance has a public IP
-by default.
+Each instance has a public IP by default.
 
 * `create an account <https://www.ovh.com/fr/support/new_nic.xml>`_
 * get $HOME/openrc.sh from `the horizon dashboard <https://horizon.cloud.ovh.net/project/access_and_security/?tab=access_security_tabs__api_access_tab>`_
 
+Setup OpenStack at Rackspace
+----------------------------
+
+There is no support for security groups. To workaround that
+limitation, the setup instructions must be run from an instance that
+is within the Rackspace OpenStack cluster already so it has permission
+to communicate with the instances it creates.
+
+* `create an account <https://www.rackspace.com/cloud/servers>`_
+* make sure your environment contains the requires OS_* variables for
+  ``openstack server list`` to run.
+
 Setup
 -----
 
index 400be3ca086f8a9964d16db9981950da2b7bd7f1..8a575cc29d41a5ccd72f88127fe4b2762bed9511 100644 (file)
@@ -336,7 +336,8 @@ ssh access   : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/html
         and return its IP address.
         """
         if not self.cluster_exists():
-            self.create_security_group()
+            if self.provider != 'rackspace':
+                self.create_security_group()
             self.create_cluster()
         instance_id = self.get_instance_id(self.args.name)
         return self.get_floating_ip_or_ip(instance_id)
@@ -392,7 +393,8 @@ ssh access   : ssh {identity}{username}@{ip} # logs in /usr/share/nginx/html
         if 'OS_AUTH_URL' not in os.environ:
             raise Exception('no OS_AUTH_URL environment variable')
         providers = (('cloud.ovh.net', 'ovh'),
-                     ('entercloudsuite.com', 'entercloudsuite'))
+                     ('entercloudsuite.com', 'entercloudsuite'),
+                     ('rackspacecloud.com', 'rackspace'))
         self.provider = None
         for (pattern, provider) in providers:
             if pattern in os.environ['OS_AUTH_URL']:
@@ -582,6 +584,10 @@ openstack security group rule create --proto udp --dst-port 53 teuthology # dns
         and wait for it to come up.
         """
         user_data = self.get_user_data()
+        if self.provider == 'rackspace':
+            security_group = ''
+        else:
+            security_group = " --security-group teuthology"
         instance = misc.sh(
             "openstack server create " +
             " --image '" + self.image('ubuntu', '14.04') + "' " +
@@ -589,7 +595,7 @@ openstack security group rule create --proto udp --dst-port 53 teuthology # dns
             " " + self.net() +
             " --key-name " + self.args.key_name +
             " --user-data " + user_data +
-            " --security-group teuthology" +
+            security_group + 
             " --wait " + self.args.name +
             " -f json")
         instance_id = self.get_value(json.loads(instance), 'id')