Browse Source

Make API services with apache the default

Run api services with httpd+mod_wsgi in devstack.
This also skips sighup tests conditionally.

Change-Id: I6631f1fecb906ae0c4bb96a2f868117eff045aa0
Closes-Bug: #1656617
rabi 2 years ago
parent
commit
6ef5fa9adc
2 changed files with 19 additions and 4 deletions
  1. 1
    1
      devstack/lib/heat
  2. 18
    3
      heat_integrationtests/functional/test_reload_on_sighup.py

+ 1
- 1
devstack/lib/heat View File

@@ -40,7 +40,7 @@ GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-hea
40 40
 GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
41 41
 
42 42
 # Toggle for deploying Heat-API under HTTPD + mod_wsgi
43
-HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-False}
43
+HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-True}
44 44
 
45 45
 HEAT_DIR=$DEST/heat
46 46
 HEAT_FILES_DIR=$HEAT_DIR/devstack/files

+ 18
- 3
heat_integrationtests/functional/test_reload_on_sighup.py View File

@@ -10,6 +10,8 @@
10 10
 #    License for the specific language governing permissions and limitations
11 11
 #    under the License.
12 12
 
13
+import re
14
+import subprocess
13 15
 import time
14 16
 
15 17
 import eventlet
@@ -26,6 +28,13 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
26 28
         self.config_file = "/etc/heat/heat.conf"
27 29
         super(ReloadOnSighupTest, self).setUp()
28 30
 
31
+    def _is_mod_wsgi_daemon(self, service):
32
+        process = ''.join(['wsgi:', service[:9]]).replace('_', '-')
33
+        s = subprocess.Popen(["ps", "ax"], stdout=subprocess.PIPE)
34
+        for x in s.stdout:
35
+            if re.search(process, x):
36
+                return True
37
+
29 38
     def _set_config_value(self, service, key, value):
30 39
         config = configparser.ConfigParser()
31 40
 
@@ -116,11 +125,17 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
116 125
         # revert all the changes made
117 126
         self._change_config(service, new_workers, old_workers)
118 127
 
128
+    def _reload_on_sighup(self, service):
129
+        if not self._is_mod_wsgi_daemon(service):
130
+            self._reload(service)
131
+        else:
132
+            self.skipTest('Skipping Test, Service running under httpd.')
133
+
119 134
     def test_api_reload_on_sighup(self):
120
-        self._reload('heat_api')
135
+        self._reload_on_sighup('heat_api')
121 136
 
122 137
     def test_api_cfn_reload_on_sighup(self):
123
-        self._reload('heat_api_cfn')
138
+        self._reload_on_sighup('heat_api_cfn')
124 139
 
125 140
     def test_api_cloudwatch_on_sighup(self):
126
-        self._reload('heat_api_cloudwatch')
141
+        self._reload_on_sighup('heat_api_cloudwatch')

Loading…
Cancel
Save