Browse Source

Merge "Add container update rpms info to collect logs"

master
Zuul 5 days ago
committed by Gerrit Code Review
parent
commit
a9af906a30
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      roles/collect_logs/files/collect-container-logs.sh

+ 11
- 0
roles/collect_logs/files/collect-container-logs.sh View File

@ -73,6 +73,17 @@ for cont in $(${engine} ps | awk '{print $NF}' | grep -v NAMES); do
container_cp "$cont" /var/lib/kolla/config_files/config.json "$INFO_DIR/config.json";
# Capture rpms updated from more recent repos
update_repos="gating delorean-current"
if ls /etc/yum.repos.d/*-component.repo 1> /dev/null 2>&1; then
component_name=$(cat $(ls /etc/yum.repos.d/*-component.repo) | grep "name=" | sed "s/name=//g")
update_repos="${update_repos} ${component_name}"
fi
echo "*** ${cont} rpm update info ***" >> "$BASE_CONTAINER_EXTRA/container_updates_info.log"
for repo in $update_repos; do
cat "$INFO_DIR/${engine}_info.log" | grep "@${repo}" >> "$BASE_CONTAINER_EXTRA/container_updates_info.log"
done;
# NOTE(flaper87): This should go away. Services should be
# using a `logs` volume
# NOTE(mandre) Do not copy logs if the containers is bind mounting /var/log directory


Loading…
Cancel
Save