diff --git a/tools/collector/centos/build_srpm.data b/tools/collector/centos/build_srpm.data index 51df01b68..162774048 100644 --- a/tools/collector/centos/build_srpm.data +++ b/tools/collector/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="scripts" -TIS_PATCH_VER=26 +TIS_PATCH_VER=27 diff --git a/tools/collector/scripts/collect b/tools/collector/scripts/collect index febd18685..758e377e0 100755 --- a/tools/collector/scripts/collect +++ b/tools/collector/scripts/collect @@ -85,29 +85,6 @@ fi # pull in common utils and environment source /usr/local/sbin/collect_utils -# get the host type -nodetype="" -subfunction="" -PLATFORM_CONF=/etc/platform/platform.conf -if [ -e ${PLATFORM_CONF} ] ; then - source ${PLATFORM_CONF} -fi - -ACTIVE=false -if [ "${nodetype}" == "controller" ] ; then - KEYRING_PATH="/opt/platform/.keyring" - if [ -e ${KEYRING_PATH} ] ; then - CRED=`find /opt/platform/.keyring -name .CREDENTIAL` - if [ ! -z "${CRED}" ] ; then - NOVAOPENRC="/etc/nova/openrc" - if [ -e ${NOVAOPENRC} ] ; then - ACTIVE=true - source ${NOVAOPENRC} 2>/dev/null 1>/dev/null - fi - fi - fi -fi - function clean_up() { `reset` diff --git a/tools/collector/scripts/collect_host b/tools/collector/scripts/collect_host index 635969841..3016b1b3b 100755 --- a/tools/collector/scripts/collect_host +++ b/tools/collector/scripts/collect_host @@ -13,17 +13,6 @@ # source /usr/local/sbin/collect_utils -KEYRING_PATH="/opt/platform/.keyring" -if [ -e ${KEYRING_PATH} ] ; then - CRED=`find /opt/platform/.keyring -name .CREDENTIAL` - if [ ! -z "${CRED}" ] ; then - NOVAOPENRC="/etc/nova/openrc" - if [ -e ${NOVAOPENRC} ] ; then - source ${NOVAOPENRC} 2>/dev/null 1>/dev/null - fi - fi -fi - # # parse input parameters # diff --git a/tools/collector/scripts/collect_mask_passwords b/tools/collector/scripts/collect_mask_passwords index 1bdd34cb6..5cda34265 100644 --- a/tools/collector/scripts/collect_mask_passwords +++ b/tools/collector/scripts/collect_mask_passwords @@ -63,7 +63,6 @@ done find ${COLLECT_NAME_DIR} -name server-cert.pem | xargs --no-run-if-empty rm -f rm -rf ${COLLECT_NAME_DIR}/var/extra/platform/config/*/ssh_config -rm -f ${COLLECT_NAME_DIR}/var/extra/platform/.keyring/*/python_keyring/crypted_pass.cfg rm -f ${COLLECT_NAME_DIR}/var/extra/platform/puppet/*/hieradata/secure*.yaml # Mask user passwords in sysinv db dump diff --git a/tools/collector/scripts/collect_utils b/tools/collector/scripts/collect_utils index fc8ac0a62..66c9a3acb 100755 --- a/tools/collector/scripts/collect_utils +++ b/tools/collector/scripts/collect_utils @@ -55,18 +55,6 @@ MIN_PERCENT_SPACE_REQUIRED=75 COLLECT_LOG=/var/log/collect.log COLLECT_ERROR_LOG=/tmp/collect_error.log -# Load up the nova openrc file if its possible -KEYRING_PATH="/opt/platform/.keyring" -if [ -e ${KEYRING_PATH} ] ; then - CRED=`find /opt/platform/.keyring -name .CREDENTIAL` - if [ ! -z "${CRED}" ] ; then - NOVAOPENRC="/etc/nova/openrc" - if [ -e ${NOVAOPENRC} ] ; then - ACTIVE=true - source ${NOVAOPENRC} 2>/dev/null 1>/dev/null - fi - fi -fi # get the node and subfunction types nodetype="" @@ -84,6 +72,19 @@ fi NODETYPE=$nodetype SUBFUNCTION=$subfunction +ACTIVE=false +if [ "$NODETYPE" == "controller" ] ; then + # get local host activity state + OPENRC="/etc/platform/openrc" + if [ -e "${OPENRC}" ] ; then + rc=`source ${OPENRC}` + if [ "$rc" == "" ] ; then + ACTIVE=true + fi + fi +fi + + # Setup an expect command completion file. # This is used to force serialization of expect # sequences and highlight command completion