Merge "Fix regression of collect-logs package listing"
This commit is contained in:
commit
fa6af7bb75
|
@ -255,25 +255,19 @@
|
|||
for cont in $(${engine} ps | awk {'print $NF'} | grep -v NAMES); do
|
||||
INFO_DIR=$BASE_CONTAINER_EXTRA/containers/${cont};
|
||||
mkdir -p $INFO_DIR;
|
||||
INFO_FILE=${INFO_DIR}/${engine}_info.log;
|
||||
CONTAINER_CONT_INFO_CMDS=(
|
||||
"${engine} exec $cont top -bwn1"
|
||||
"${engine} exec $cont bash -c \"\$(command -v dnf || command -v yum) list installed\""
|
||||
"${engine} inspect $cont"
|
||||
);
|
||||
if [ $engine = 'docker' ]; then
|
||||
CONTAINER_CONT_INFO_CMDS+=("${engine} top $cont auxw");
|
||||
fi
|
||||
# NOTE(cjeanner): `podman top` does not support `ps` options.
|
||||
if [ $engine = 'podman' ]; then
|
||||
CONTAINER_CONT_INFO_CMDS+=("${engine} top $cont");
|
||||
fi
|
||||
for cmd in "${CONTAINER_CONT_INFO_CMDS[@]}"; do
|
||||
echo "+ $cmd" >> $INFO_FILE;
|
||||
$cmd >> $INFO_FILE;
|
||||
echo "" >> $ALL_FILE;
|
||||
echo "" >> $ALL_FILE;
|
||||
done;
|
||||
(
|
||||
set -x;
|
||||
if [ $engine = 'docker' ]; then
|
||||
${engine} top $cont auxw;
|
||||
# NOTE(cjeanner): `podman top` does not support `ps` options.
|
||||
elif [ $engine = 'podman' ]; then
|
||||
${engine} top $cont;
|
||||
fi
|
||||
${engine} exec $cont top -bwn1;
|
||||
${engine} exec $cont bash -c "\$(command -v dnf || command -v yum) list installed";
|
||||
${engine} inspect $cont;
|
||||
) &> $INFO_DIR/${engine}_info.log;
|
||||
|
||||
${engine} logs $cont &> $INFO_DIR/stdout.log;
|
||||
|
||||
container_cp $cont /var/lib/kolla/config_files/config.json $INFO_DIR/config.json;
|
||||
|
|
Loading…
Reference in New Issue