Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Kubernetes/OpenShift rotated logs have no symbolic link in /var/log/containers and they cannot be retrieved using `oc logs` either, so there is no way to get these rotated logs in a SOS report. This patch proposes a new plugin called `pod_log`, similar to the xisting `container_log`, that can retrieve rotated logs for the containers. The plugin will not only download the `/var/log/pods` files but also the `/var/log/container` symlinks. The plugin doesn't use the `all_logs` flag, since the usage of the plugin assumes the intent of getting rotated logs, otherwise the `container_log` plugin can be used. An alternative would be to extend the existing `container_log` plugin to also retrieve rotated container logs. This approach has been discarded because we would either have to modify existing behavior for the `all_logs` flag (breaking backward compatibility) or add a new parser arguments just to tell it to also gather rotated logs (not reasonable). Closes #3677 Signed-off-by: Gorka Eguileor <[email protected]>
- Loading branch information