Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Change the log level in RemoveContainer to debug #812

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

darkowlzz
Copy link
Contributor

In #791, we refactored RemoveContainer() method of the containerd client
and added some warning logs. This resulted in unintended warning logs.

Run a new VM:

$ sudo ./bin/ignite run weaveworks/ignite-ubuntu --ssh --name my-vm
INFO[0000] containerd image "weaveworks/ignite-kernel:5.4.102" not found locally, pulling...
INFO[0007] Imported OCI image "weaveworks/ignite-kernel:5.4.102" (62.6 MB) to kernel image with UID "7acfe8fbf902d09f"
INFO[0008] Created VM with ID "12def5918a82dac3" and name "my-vm"
WARN[0008] container "ignite-12def5918a82dac3" in namespace "firecracker": not found
INFO[0009] Networking is handled by "cni"
INFO[0009] Started Firecracker VM "12def5918a82dac3" in a container with ID "ignite-12def5918a82dac3"
INFO[0010] Waiting for the ssh daemon within the VM to start...

Delete a VM:

$ sudo ./bin/ignite rm -f my-vm
INFO[0000] Removing the container with ID "ignite-12def5918a82dac3" from the "cni" network
WARN[0000] no running task found: task ignite-12def5918a82dac3 not found: not found
INFO[0000] Removed VM with name "my-vm" and ID "12def5918a82dac3"

RemoveContainer() is called before a VM is created and after a VM is
deleted. This results in warning logs with container or task not found
for the basic operations even when nothing wrong happened. The warning
could be misleading. Move the not found logs in RemoveContainer() to
debug level to avoid such confusion.

Maybe consider doing the same for all other not found errors in the runtime clients?

RemoveContainer() is called before a VM is created and after a VM is
deleted. This results in warning logs with container or task not found
for the basic operations even when nothing wrong happened. The warning
could be misleading. Move the `not found` logs in RemoveContainer() to
debug level to avoid such confusion.
@darkowlzz darkowlzz added the area/runtime Issues related to container runtimes label Mar 27, 2021
@stealthybox stealthybox merged commit 073580f into weaveworks:master Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/runtime Issues related to container runtimes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants