commit a7044e0ee3317fa60a8c0fb71dedf33d30e16085 Author: Bogdan Dobrelya Date: Tue Aug 18 17:24:24 2020 +0200 Use root when listing installed packages This fixes the access error when using RHSM: [ERROR] dnf:547:MainThread @logutil.py:194 - [Errno 13] Permission denied: '/var/log/rhsm/rhsm.log' Change-Id: Ia2e4c866de8440ac8ed25fd5efdbaef23280ef85 Signed-off-by: Bogdan Dobrelya diff --git a/files/collect-container-logs.sh b/files/collect-container-logs.sh index 57d4faa..be957db 100755 --- a/files/collect-container-logs.sh +++ b/files/collect-container-logs.sh @@ -66,7 +66,7 @@ for cont in $(${engine} ps | awk {'print $NF'} | grep -v NAMES); do fi ${engine} exec $cont vmstat -s ${engine} exec $cont ps axfo %mem,size,rss,vsz,pid,args - ${engine} exec $cont bash -c "\$(command -v dnf || command -v yum) list installed"; + ${engine} exec -u root $cont bash -c "\$(command -v dnf || command -v yum) list installed"; ) &>> $INFO_DIR/${engine}_info.log; container_cp $cont /var/lib/kolla/config_files/config.json $INFO_DIR/config.json;