The previous code retrieved logs from the lxc containers by copying them from the /proc/<pid>/root/... directory which worked except when the files being collected were symlinks, which would then potentially point to the wrong, or a missing file on the host itself. This patch changes the log collection to collect from inside the running containers using tar, giving a consistent view of the source files. Any symlinks are replaced with the content of files they reference in the collected logs. A side effect of using the more complex lxc-attach/tar approach was corruption of stdout due to the previous simple method of parallelising the log collection by running each collection function in the background. This patch switches to use gnu parallel as the mechanism to run multiple log collections simultaneously and keep the console output clean. Change-Id: Ief03c33b76eac6e256477cfaa16c8a59acd7d702
7.7 KiB
Executable File
7.7 KiB
Executable File