From a4365bf1b2124c9587d78eff82594ce798fb7e06 Mon Sep 17 00:00:00 2001 From: Enzo Candotti Date: Mon, 25 Jan 2021 13:16:55 -0300 Subject: [PATCH] Fix clear passwords presented in collected log files The --relative option used by rsync resulted in changes to the paths of some collected files in the tarball, which in turn resulted in failures to mask the passwords in those files (as they were no longer in the expected location). This update removes the --relative option, restoring the location to that expected by the masking. Closes-Bug: 1906524 Signed-off-by: Enzo Candotti Change-Id: I001d3e2b1d2ec0ff88a129fe7b31bee21928686b --- tools/collector/scripts/collect_dc.sh | 4 ++-- tools/collector/scripts/collect_sysinv.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/collector/scripts/collect_dc.sh b/tools/collector/scripts/collect_dc.sh index b5faeb07..da44a935 100755 --- a/tools/collector/scripts/collect_dc.sh +++ b/tools/collector/scripts/collect_dc.sh @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright (c) 2020 Wind River Systems, Inc. +# Copyright (c) 2020-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -85,7 +85,7 @@ if [ "$nodetype" = "controller" ] ; then dcmanager subcloud-group list 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE} # copy the /opt/dc/ansible dir but exclude any iso files - rsync -a --relative --exclude '*.iso' /opt/dc/ansible ${extradir} + rsync -a --exclude '*.iso' /opt/dc/ansible ${extradir} delimiter ${LOGFILE} "find /opt/dc-vault -ls" find /opt/dc-vault -ls 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE} diff --git a/tools/collector/scripts/collect_sysinv.sh b/tools/collector/scripts/collect_sysinv.sh index 313766bd..480d16d5 100755 --- a/tools/collector/scripts/collect_sysinv.sh +++ b/tools/collector/scripts/collect_sysinv.sh @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright (c) 2013-2020 Wind River Systems, Inc. +# Copyright (c) 2013-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -108,7 +108,7 @@ if [ "$nodetype" = "controller" ] ; then # copy /opt/platform to extra dir while filtering out the # iso and lost+found dirs - rsync -a --relative --exclude 'iso' --exclude 'lost+found' /opt/platform ${extradir} + rsync -a --exclude 'iso' --exclude 'lost+found' /opt/platform ${extradir} fi