From aceb27e858b594ae80bf07bb0278a715e5a4cd3b Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 17 Aug 2017 08:59:59 -0400 Subject: [PATCH] Add procname for uwsgi based services Code in grenade and elsewhere rely on the process/service name when one runs "ps auxw" and they grep for example "grep -e glance-api" to check if the service is running. with uwsgi, let us make sure we use process name prefix so it is easier to spot the services and be compatible with code elsewhere that relies on this. Change-Id: I4d1cd223ed9904fcb19b26fc9362b676e0b4f9b3 --- lib/cinder | 2 +- lib/glance | 2 +- lib/keystone | 2 +- lib/nova | 4 ++-- lib/placement | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/cinder b/lib/cinder index 03328f31b6..22c5168089 100644 --- a/lib/cinder +++ b/lib/cinder @@ -511,7 +511,7 @@ function start_cinder { start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_POR_INT fi else - run_process "c-api" "$CINDER_BIN_DIR/uwsgi --ini $CINDER_UWSGI_CONF" + run_process "c-api" "$CINDER_BIN_DIR/uwsgi --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF" cinder_url=$service_protocol://$SERVICE_HOST/volume/v3 fi fi diff --git a/lib/glance b/lib/glance index 0a5b9f59b6..7b42488b59 100644 --- a/lib/glance +++ b/lib/glance @@ -345,7 +345,7 @@ function start_glance { run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf" if [[ "$WSGI_MODE" == "uwsgi" ]]; then - run_process g-api "$GLANCE_BIN_DIR/uwsgi --ini $GLANCE_UWSGI_CONF" + run_process g-api "$GLANCE_BIN_DIR/uwsgi --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF" else run_process g-api "$GLANCE_BIN_DIR/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf" fi diff --git a/lib/keystone b/lib/keystone index 749e219e67..08aa675d43 100644 --- a/lib/keystone +++ b/lib/keystone @@ -550,7 +550,7 @@ function start_keystone { tail_log key /var/log/$APACHE_NAME/keystone.log tail_log key-access /var/log/$APACHE_NAME/keystone_access.log else # uwsgi - run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --ini $KEYSTONE_PUBLIC_UWSGI_CONF" "" + run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" "" fi echo "Waiting for keystone to start..." diff --git a/lib/nova b/lib/nova index fa09fd8fc1..976bf35ad5 100644 --- a/lib/nova +++ b/lib/nova @@ -805,7 +805,7 @@ function start_nova_api { start_tls_proxy nova '*' $NOVA_SERVICE_PORT $NOVA_SERVICE_HOST $NOVA_SERVICE_PORT_INT fi else - run_process "n-api" "$NOVA_BIN_DIR/uwsgi --ini $NOVA_UWSGI_CONF" + run_process "n-api" "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api --ini $NOVA_UWSGI_CONF" nova_url=$service_protocol://$SERVICE_HOST/compute/v2.1/ fi @@ -912,7 +912,7 @@ function start_nova_rest { if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf" else - run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --ini $NOVA_METADATA_UWSGI_CONF" + run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF" fi run_process n-novnc "$NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_WEB_DIR" diff --git a/lib/placement b/lib/placement index 8adbbdec68..aef9b7454e 100644 --- a/lib/placement +++ b/lib/placement @@ -164,7 +164,7 @@ function install_placement { # start_placement_api() - Start the API processes ahead of other things function start_placement_api { if [[ "$WSGI_MODE" == "uwsgi" ]]; then - run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --ini $PLACEMENT_UWSGI_CONF" + run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF" else enable_apache_site placement-api restart_apache_server