stackabletech / agent

Stackable Agent - a kubelet written in Rust which uses systemd as its backend
Apache License 2.0
15 stars 9 forks source link

Report download attempts and errors on the corresponding Pod #319

Open nightkr opened 2 years ago

nightkr commented 2 years ago

Currently this is emitted to the systemd journal like this:

Oct 06 12:35:36 stackable-node2 stackable-agent[1373]: [2021-10-06T10:35:36Z INFO  stackable_agent::provider::states::pod::downloading] Looking for package: library-busybox:1.32.1 in known repositories
Oct 06 12:35:36 stackable-node2 stackable-agent[1373]: [2021-10-06T10:35:36Z INFO  stackable_agent::provider::repository] Package [library-busybox:1.32.1] not found in the following repositories: ["stackablepublic"]
Oct 06 12:35:36 stackable-node2 stackable-agent[1373]: [2021-10-06T10:35:36Z ERROR stackable_agent::provider::states::pod::downloading] Cannot find package library-busybox:1.32.1 in any repository, aborting ..
Oct 06 12:35:36 stackable-node2 stackable-agent[1373]: [2021-10-06T10:35:36Z INFO  stackable_agent::provider::states::pod::downloading_backoff] Backing of before retrying download of package library-busybox:1.32.1

But this is generally only accessible to a cluster administrator. There is (AFAIK) no way to see this by just using kubectl and the Kubernetes APIs.