summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrabi <ramishra@redhat.com>2017-01-10 15:57:35 +0530
committerrabi <ramishra@redhat.com>2017-01-15 11:53:25 +0530
commit6ef5fa9adc8886ed339132b5e5e27cee4000f762 (patch)
treeb37d02b9a3aecd4217e073d40f71ad8a86d735c6
parente943d0874c8e8b690accd1ac303df4e745e8ffca (diff)
downloadheat-6ef5fa9adc8886ed339132b5e5e27cee4000f762.tar.gz
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
-rw-r--r--devstack/lib/heat2
-rw-r--r--heat_integrationtests/functional/test_reload_on_sighup.py21
2 files changed, 19 insertions, 4 deletions
diff --git a/devstack/lib/heat b/devstack/lib/heat
index fb781c395..2a04d9dca 100644
--- a/devstack/lib/heat
+++ b/devstack/lib/heat
@@ -40,7 +40,7 @@ GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-hea
GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
# Toggle for deploying Heat-API under HTTPD + mod_wsgi
-HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-False}
+HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-True}
HEAT_DIR=$DEST/heat
HEAT_FILES_DIR=$HEAT_DIR/devstack/files
diff --git a/heat_integrationtests/functional/test_reload_on_sighup.py b/heat_integrationtests/functional/test_reload_on_sighup.py
index b014f49c2..d6465811a 100644
--- a/heat_integrationtests/functional/test_reload_on_sighup.py
+++ b/heat_integrationtests/functional/test_reload_on_sighup.py
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import re
+import subprocess
import time
import eventlet
@@ -26,6 +28,13 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
self.config_file = "/etc/heat/heat.conf"
super(ReloadOnSighupTest, self).setUp()
+ def _is_mod_wsgi_daemon(self, service):
+ process = ''.join(['wsgi:', service[:9]]).replace('_', '-')
+ s = subprocess.Popen(["ps", "ax"], stdout=subprocess.PIPE)
+ for x in s.stdout:
+ if re.search(process, x):
+ return True
+
def _set_config_value(self, service, key, value):
config = configparser.ConfigParser()
@@ -116,11 +125,17 @@ class ReloadOnSighupTest(functional_base.FunctionalTestsBase):
# revert all the changes made
self._change_config(service, new_workers, old_workers)
+ def _reload_on_sighup(self, service):
+ if not self._is_mod_wsgi_daemon(service):
+ self._reload(service)
+ else:
+ self.skipTest('Skipping Test, Service running under httpd.')
+
def test_api_reload_on_sighup(self):
- self._reload('heat_api')
+ self._reload_on_sighup('heat_api')
def test_api_cfn_reload_on_sighup(self):
- self._reload('heat_api_cfn')
+ self._reload_on_sighup('heat_api_cfn')
def test_api_cloudwatch_on_sighup(self):
- self._reload('heat_api_cloudwatch')
+ self._reload_on_sighup('heat_api_cloudwatch')