From 9212b86108683e9f9db1dac6697b911fc61569a0 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 13 Jun 2017 09:17:05 +0000 Subject: Rename configd programs to have vespa- prefix. Temporarily add symlinks from old name to new name. --- config-proxy/src/main/sh/vespa-config-ctl | 2 +- configd/src/apps/sentinel/.gitignore | 2 +- configd/src/apps/sentinel/CMakeLists.txt | 2 +- configd/src/apps/su/.gitignore | 2 +- configd/src/apps/su/CMakeLists.txt | 4 ++-- configd/src/apps/su/main.cpp | 2 +- configd/src/tests/configd/run-sentinel.sh | 2 +- configserver/src/main/sh/start-configserver | 6 +++--- configserver/src/main/sh/stop-configserver | 8 ++++---- dist/post_install.sh | 4 ++++ vespabase/src/start-vespa-base.sh | 2 +- vespabase/src/stop-vespa-base.sh | 2 +- 12 files changed, 21 insertions(+), 17 deletions(-) diff --git a/config-proxy/src/main/sh/vespa-config-ctl b/config-proxy/src/main/sh/vespa-config-ctl index 7221ff0ee27..8f015bab6c1 100755 --- a/config-proxy/src/main/sh/vespa-config-ctl +++ b/config-proxy/src/main/sh/vespa-config-ctl @@ -140,7 +140,7 @@ case $1 in export VESPA_SERVICE_NAME vespa-runserver -s config-sentinel -r 10 -p $P_SENTINEL -- \ - sbin/config-sentinel -c "$CONFIG_ID" + sbin/vespa-config-sentinel -c "$CONFIG_ID" ;; stop) diff --git a/configd/src/apps/sentinel/.gitignore b/configd/src/apps/sentinel/.gitignore index bc87d9cebdc..b299012f583 100644 --- a/configd/src/apps/sentinel/.gitignore +++ b/configd/src/apps/sentinel/.gitignore @@ -1,3 +1,3 @@ .depend Makefile -config-sentinel +vespa-config-sentinel diff --git a/configd/src/apps/sentinel/CMakeLists.txt b/configd/src/apps/sentinel/CMakeLists.txt index 5f20042c021..ea25156a3c4 100644 --- a/configd/src/apps/sentinel/CMakeLists.txt +++ b/configd/src/apps/sentinel/CMakeLists.txt @@ -9,7 +9,7 @@ vespa_add_executable(configd_config-sentinel_app output-connection.cpp metrics.cpp state-api.cpp - OUTPUT_NAME config-sentinel + OUTPUT_NAME vespa-config-sentinel INSTALL sbin DEPENDS configdefinitions diff --git a/configd/src/apps/su/.gitignore b/configd/src/apps/su/.gitignore index 343f531c8c1..cda22958555 100644 --- a/configd/src/apps/su/.gitignore +++ b/configd/src/apps/su/.gitignore @@ -1,3 +1,3 @@ /.depend /Makefile -/run-as-yahoo +/vespa-run-as-vespa-user diff --git a/configd/src/apps/su/CMakeLists.txt b/configd/src/apps/su/CMakeLists.txt index 8883fe2344f..72502e9dc5e 100644 --- a/configd/src/apps/su/CMakeLists.txt +++ b/configd/src/apps/su/CMakeLists.txt @@ -1,8 +1,8 @@ # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_executable(configd_run-as-yahoo_app +vespa_add_executable(configd_vespa-run-as-vespa-user_app SOURCES main.cpp - OUTPUT_NAME run-as-yahoo + OUTPUT_NAME vespa-run-as-vespa-user INSTALL bin DEPENDS ) diff --git a/configd/src/apps/su/main.cpp b/configd/src/apps/su/main.cpp index e6252e483cb..ab6cd919138 100644 --- a/configd/src/apps/su/main.cpp +++ b/configd/src/apps/su/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char** argv) { if (argc < 2) { - fprintf(stderr, "missing arguments, usage: run-as-yahoo [args ...]\n"); + fprintf(stderr, "missing arguments, usage: vespa-run-as-vespa-user [args ...]\n"); exit(1); } const char *username = getenv("VESPA_USER"); diff --git a/configd/src/tests/configd/run-sentinel.sh b/configd/src/tests/configd/run-sentinel.sh index 0a0f8e80bf2..e257a41c829 100755 --- a/configd/src/tests/configd/run-sentinel.sh +++ b/configd/src/tests/configd/run-sentinel.sh @@ -2,7 +2,7 @@ # Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. set -e -if ../../apps/sentinel/config-sentinel > tmp.log 2>&1 ; then +if ../../apps/sentinel/vespa-config-sentinel > tmp.log 2>&1 ; then echo "Should need argument" exit 1 fi diff --git a/configserver/src/main/sh/start-configserver b/configserver/src/main/sh/start-configserver index 4d85b3e65b3..3c43f230094 100755 --- a/configserver/src/main/sh/start-configserver +++ b/configserver/src/main/sh/start-configserver @@ -101,8 +101,8 @@ export LD_LIBRARY_PATH=${VESPA_HOME}lib64 #Does not need fast allocation export MALLOC_ARENA_MAX=1 -run-as-yahoo ${VESPA_HOME}libexec/vespa/start-filedistribution -run-as-yahoo ${VESPA_HOME}libexec/vespa/start-logd +vespa-run-as-vespa-user ${VESPA_HOME}libexec/vespa/start-filedistribution +vespa-run-as-vespa-user ${VESPA_HOME}libexec/vespa/start-logd # stuff for the configserver process: @@ -128,7 +128,7 @@ printenv > $cfpfile mkdir -p $bundlecachedir chown -R ${VESPA_USER} $bundlecachedir -run-as-yahoo vespa-runserver -s configserver -r 30 -p $pidfile -- \ +vespa-run-as-vespa-user vespa-runserver -s configserver -r 30 -p $pidfile -- \ java \ -Xms128m -Xmx2048m \ -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${VESPA_HOME}var/crash \ diff --git a/configserver/src/main/sh/stop-configserver b/configserver/src/main/sh/stop-configserver index 04867dd180e..371c2e6aafd 100755 --- a/configserver/src/main/sh/stop-configserver +++ b/configserver/src/main/sh/stop-configserver @@ -80,15 +80,15 @@ export VESPA_LOG_TARGET multitenant=$cloudconfig_server__multitenant if [ "$multitenant" = "true" ]; then - run-as-yahoo vespa-runserver -s filedistributor -p $PIDFILE_FILEDISTRIBUTOR -S - run-as-yahoo vespa-runserver -s logd -p $PIDFILE_LOGD -S + vespa-run-as-vespa-user vespa-runserver -s filedistributor -p $PIDFILE_FILEDISTRIBUTOR -S + vespa-run-as-vespa-user vespa-runserver -s logd -p $PIDFILE_LOGD -S fi # Try shutting down this way in case of upgrade. Can be removed in later versions. -run-as-yahoo vespa-runserver -s configserver -p $PIDFILE_CONFIGSERVER -S +vespa-run-as-vespa-user vespa-runserver -s configserver -p $PIDFILE_CONFIGSERVER -S if [ -e "$PIDFILE_CONFIGSERVER" ]; then export UNPRIVILEGED=1 export PID_FILE=$PIDFILE_CONFIGSERVER - exec run-as-yahoo ${ROOT}/bin/jdisc_container_stop + exec vespa-run-as-vespa-user ${ROOT}/bin/jdisc_container_stop fi diff --git a/dist/post_install.sh b/dist/post_install.sh index c91f128e98e..ad1e8d19975 100755 --- a/dist/post_install.sh +++ b/dist/post_install.sh @@ -140,3 +140,7 @@ ln -s vespa-fbench-split-file $INSTALLPATH/bin/splitfile # Temporary when renaming programs in slobrok ln -s vespa-slobrok $INSTALLPATH/bin/slobrok ln -s vespa-slobrok-cmd $INSTALLPATH/bin/sbcmd + +# Temporary when renaming programs in configd +ln -s vespa-run-as-vespa-user $INSTALLPATH/bin/run-as-yahoo +ln -s vespa-config-sentinel $INSTALLPATH/sbin/config-sentinel diff --git a/vespabase/src/start-vespa-base.sh b/vespabase/src/start-vespa-base.sh index fc6353f842f..e8ac4fcd670 100755 --- a/vespabase/src/start-vespa-base.sh +++ b/vespabase/src/start-vespa-base.sh @@ -73,4 +73,4 @@ if [ -f /tmp/.ylock-arena.shm ]; then chown yahoo:wheel /tmp/.ylock-arena.shm fi -exec run-as-yahoo ${VESPA_HOME}/bin/vespa-config-ctl start +exec vespa-run-as-vespa-user ${VESPA_HOME}/bin/vespa-config-ctl start diff --git a/vespabase/src/stop-vespa-base.sh b/vespabase/src/stop-vespa-base.sh index efe4f71fe9f..eb85cdf14f6 100755 --- a/vespabase/src/stop-vespa-base.sh +++ b/vespabase/src/stop-vespa-base.sh @@ -64,4 +64,4 @@ cd ${VESPA_HOME} || { echo "Cannot cd to ${VESPA_HOME}" 1>&2; exit 1; } fixlimits -exec run-as-yahoo ${VESPA_HOME}/bin/vespa-config-ctl stop +exec vespa-run-as-vespa-user ${VESPA_HOME}/bin/vespa-config-ctl stop -- cgit v1.2.3