Skip to content

Commit aceb27e

Browse files
committed
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
1 parent 644a6b9 commit aceb27e

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/cinder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ function start_cinder {
511511
start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_POR_INT
512512
fi
513513
else
514-
run_process "c-api" "$CINDER_BIN_DIR/uwsgi --ini $CINDER_UWSGI_CONF"
514+
run_process "c-api" "$CINDER_BIN_DIR/uwsgi --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
515515
cinder_url=$service_protocol://$SERVICE_HOST/volume/v3
516516
fi
517517
fi

lib/glance

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ function start_glance {
345345

346346
run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
347347
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
348-
run_process g-api "$GLANCE_BIN_DIR/uwsgi --ini $GLANCE_UWSGI_CONF"
348+
run_process g-api "$GLANCE_BIN_DIR/uwsgi --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
349349
else
350350
run_process g-api "$GLANCE_BIN_DIR/glance-api --config-file=$GLANCE_CONF_DIR/glance-api.conf"
351351
fi

lib/keystone

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ function start_keystone {
550550
tail_log key /var/log/$APACHE_NAME/keystone.log
551551
tail_log key-access /var/log/$APACHE_NAME/keystone_access.log
552552
else # uwsgi
553-
run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
553+
run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
554554
fi
555555

556556
echo "Waiting for keystone to start..."

lib/nova

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ function start_nova_api {
805805
start_tls_proxy nova '*' $NOVA_SERVICE_PORT $NOVA_SERVICE_HOST $NOVA_SERVICE_PORT_INT
806806
fi
807807
else
808-
run_process "n-api" "$NOVA_BIN_DIR/uwsgi --ini $NOVA_UWSGI_CONF"
808+
run_process "n-api" "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
809809
nova_url=$service_protocol://$SERVICE_HOST/compute/v2.1/
810810
fi
811811

@@ -912,7 +912,7 @@ function start_nova_rest {
912912
if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then
913913
run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
914914
else
915-
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --ini $NOVA_METADATA_UWSGI_CONF"
915+
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
916916
fi
917917

918918
run_process n-novnc "$NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_WEB_DIR"

lib/placement

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function install_placement {
164164
# start_placement_api() - Start the API processes ahead of other things
165165
function start_placement_api {
166166
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
167-
run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --ini $PLACEMENT_UWSGI_CONF"
167+
run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
168168
else
169169
enable_apache_site placement-api
170170
restart_apache_server

0 commit comments

Comments
 (0)