Exclude temporary subcloud install iso files from collect

The collect tool is unnecessarily including temp subcloud
install iso files and related other large tmp files.

This update changes the raw 'cp ...' to 'rsync ...'
with the --exclude option to filter out iso files from the
the collect_dc and collect_sysinv collect scripts.

Change-Id: I3575c3193a24f376dcd006c3e5015c551023c69a
Closes-Bug: 1885778
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2020-07-06 11:24:10 -04:00
parent a10381203d
commit 7c076a390f
2 changed files with 5 additions and 2 deletions

View File

@ -84,7 +84,8 @@ if [ "$nodetype" = "controller" ] ; then
delimiter ${LOGFILE} "dcmanager subcloud-group list"
dcmanager subcloud-group list 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
cp -a /opt/dc/ansible ${extradir}
# copy the /opt/dc/ansible dir but exclude any iso files
rsync -a --relative --exclude '*.iso' /opt/dc/ansible ${extradir}
delimiter ${LOGFILE} "find /opt/dc-vault -ls"
find /opt/dc-vault -ls 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}

View File

@ -65,7 +65,9 @@ if [ "$nodetype" = "controller" ] ; then
delimiter ${LOGFILE} "vm-topology"
timeout 60 vm-topology --show all 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
cp -a /opt/platform ${extradir}
# 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}
fi