Merge "Enable eventletwsgi logger with INFO severity"
diff --git a/_modules/cinderng.py b/_modules/cinderng.py
index a5c7d42..71d7c5c 100644
--- a/_modules/cinderng.py
+++ b/_modules/cinderng.py
@@ -39,7 +39,8 @@
         ),
         'endpoint_type': profile['endpoint_type'],
         'certificate': profile['certificate'],
-        'region_name': profile['region_name']
+        'region_name': profile['region_name'],
+        'retries': profile.get('retries', 5)
     }
     return credentials
 
@@ -56,7 +57,8 @@
         auth_url=cred['auth_url'],
         endpoint_type=cred['endpoint_type'],
         cacert=cred['certificate'],
-        region_name=cred['region_name']
+        region_name=cred['region_name'],
+        retries=cred['retries']
     )
     return nt
 
diff --git a/cinder/controller.sls b/cinder/controller.sls
index 7e3ecaa..60ff151 100644
--- a/cinder/controller.sls
+++ b/cinder/controller.sls
@@ -141,6 +141,17 @@
 
 {%- endfor %}
 
+cinder_syncdb:
+  cmd.run:
+  - name: 'cinder-manage db sync; sleep 5;'
+  {%- if grains.get('noservices') %}
+  - onlyif: /bin/false
+  {%- endif %}
+  - require:
+    - pkg: cinder_controller_packages
+  - require_in:
+    - service: cinder_controller_services
+
 {%- if controller.version in ('ocata','pike') %}
 
 /etc/apache2/conf-available/cinder-wsgi.conf:
@@ -161,6 +172,8 @@
   {%- if grains.get('noservices') %}
   - onlyif: /bin/false
   {%- endif %}
+  - require:
+    - pkg: cinder_controller_packages
   - watch:
     {%- if controller.message_queue.get('ssl',{}).get('enabled', False) %}
     - file: rabbitmq_ca_cinder_controller
@@ -181,6 +194,8 @@
   {%- if grains.get('noservices') %}
   - onlyif: /bin/false
   {%- endif %}
+  - require:
+    - pkg: cinder_controller_packages
   - watch:
     {%- if controller.message_queue.get('ssl',{}).get('enabled', False) %}
     - file: rabbitmq_ca_cinder_controller
@@ -212,6 +227,8 @@
   {%- if grains.get('noservices') %}
   - onlyif: /bin/false
   {%- endif %}
+  - require:
+    - pkg: cinder_controller_packages
   - watch:
     {%- if controller.message_queue.get('ssl',{}).get('enabled', False) %}
     - file: rabbitmq_ca_cinder_controller
@@ -222,15 +239,6 @@
     - file: /etc/cinder/cinder.conf
     - file: /etc/cinder/api-paste.ini
 
-cinder_syncdb:
-  cmd.run:
-  - name: 'cinder-manage db sync; sleep 5;'
-  {%- if grains.get('noservices') %}
-  - onlyif: /bin/false
-  {%- endif %}
-  - require:
-    - service: cinder_controller_services
-
 {%- if not grains.get('noservices', False) %}
 
 {%- set identity = controller.identity %}