diff --git a/cri/v1alpha1/cri.go b/cri/v1alpha1/cri.go index b82965a07..c08839598 100644 --- a/cri/v1alpha1/cri.go +++ b/cri/v1alpha1/cri.go @@ -855,7 +855,7 @@ func (c *CriManager) ListContainerStats(ctx context.Context, r *runtime.ListCont for _, container := range containers { cs, err := c.getContainerMetrics(ctx, container) if err != nil { - logrus.Errorf("failed to decode metrics of container %q: %v", container.ID, err) + logrus.Warnf("failed to decode metrics of container %q: %v", container.ID, err) continue } diff --git a/cri/v1alpha1/cri_wrapper.go b/cri/v1alpha1/cri_wrapper.go index 954012d66..bf1671b3d 100644 --- a/cri/v1alpha1/cri_wrapper.go +++ b/cri/v1alpha1/cri_wrapper.go @@ -94,12 +94,12 @@ func (c *CriWrapper) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS // PodSandboxStatus returns the status of the PodSandbox. func (c *CriWrapper) PodSandboxStatus(ctx context.Context, r *runtime.PodSandboxStatusRequest) (res *runtime.PodSandboxStatusResponse, err error) { - logrus.Infof("PodSandboxStatus for %q", r.GetPodSandboxId()) + logrus.Debugf("PodSandboxStatus for %q", r.GetPodSandboxId()) defer func() { if err != nil { logrus.Errorf("failed to get PodSandboxStatus: %q, %v", r.GetPodSandboxId(), err) } else { - logrus.Infof("success to get PodSandboxStatus: %q, %+v", r.GetPodSandboxId(), res.GetStatus()) + logrus.Debugf("success to get PodSandboxStatus: %q, %+v", r.GetPodSandboxId(), res.GetStatus()) } }() return c.CriManager.PodSandboxStatus(ctx, r) @@ -191,12 +191,12 @@ func (c *CriWrapper) ListContainers(ctx context.Context, r *runtime.ListContaine // ContainerStatus inspects the container and returns the status. func (c *CriWrapper) ContainerStatus(ctx context.Context, r *runtime.ContainerStatusRequest) (res *runtime.ContainerStatusResponse, err error) { - logrus.Infof("ContainerStatus for %q", r.GetContainerId()) + logrus.Debugf("ContainerStatus for %q", r.GetContainerId()) defer func() { if err != nil { logrus.Errorf("failed to get ContainerStatus: %q, %v", r.GetContainerId(), err) } else { - logrus.Infof("success to get ContainerStatus: %q, %+v", r.GetContainerId(), res.GetStatus()) + logrus.Debugf("success to get ContainerStatus: %q, %+v", r.GetContainerId(), res.GetStatus()) } }() return c.CriManager.ContainerStatus(ctx, r) @@ -205,12 +205,12 @@ func (c *CriWrapper) ContainerStatus(ctx context.Context, r *runtime.ContainerSt // ContainerStats returns stats of the container. If the container does not // exist, the call returns an error. func (c *CriWrapper) ContainerStats(ctx context.Context, r *runtime.ContainerStatsRequest) (res *runtime.ContainerStatsResponse, err error) { - logrus.Infof("ContainerStats for %q", r.GetContainerId()) + logrus.Debugf("ContainerStats for %q", r.GetContainerId()) defer func() { if err != nil { logrus.Errorf("failed to get ContainerStats: %q, %v", r.GetContainerId(), err) } else { - logrus.Infof("success to get ContainerStats: %q, %+v", r.GetContainerId(), res.GetStats()) + logrus.Debugf("success to get ContainerStats: %q, %+v", r.GetContainerId(), res.GetStats()) } }() return c.CriManager.ContainerStats(ctx, r) @@ -311,12 +311,12 @@ func (c *CriWrapper) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateR // Status returns the status of the runtime. func (c *CriWrapper) Status(ctx context.Context, r *runtime.StatusRequest) (res *runtime.StatusResponse, err error) { - logrus.Infof("Status of cri manager") + logrus.Debugf("Status of cri manager") defer func() { if err != nil { logrus.Errorf("failed to get status: %v", err) } else { - logrus.Infof("success to get status: %+v", res.GetStatus()) + logrus.Debugf("success to get status: %+v", res.GetStatus()) } }() return c.CriManager.Status(ctx, r) @@ -338,12 +338,12 @@ func (c *CriWrapper) ListImages(ctx context.Context, r *runtime.ListImagesReques // ImageStatus returns the status of the image, returns nil if the image isn't present. func (c *CriWrapper) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequest) (res *runtime.ImageStatusResponse, err error) { - logrus.Infof("ImageStatus for %q", r.GetImage().GetImage()) + logrus.Debugf("ImageStatus for %q", r.GetImage().GetImage()) defer func() { if err != nil { logrus.Errorf("failed to get ImageStatus: %q, %v", r.GetImage().GetImage(), err) } else { - logrus.Infof("success to get ImageStatus: %q, %+v", + logrus.Debugf("success to get ImageStatus: %q, %+v", r.GetImage().GetImage(), res.GetImage()) } }() @@ -379,12 +379,12 @@ func (c *CriWrapper) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequ // ImageFsInfo returns information of the filesystem that is used to store images. func (c *CriWrapper) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (res *runtime.ImageFsInfoResponse, err error) { - logrus.Infof("ImageFsInfo of cri manager") + logrus.Debugf("ImageFsInfo of cri manager") defer func() { if err != nil { logrus.Errorf("faild to get ImageFsInfo: %v", err) } else { - logrus.Infof("success to get ImageFsInfo, return filesystem info %+v", res.GetImageFilesystems()) + logrus.Debugf("success to get ImageFsInfo, return filesystem info %+v", res.GetImageFilesystems()) } }() return c.CriManager.ImageFsInfo(ctx, r) diff --git a/cri/v1alpha2/cri_wrapper.go b/cri/v1alpha2/cri_wrapper.go index 620f4666e..4c578d152 100644 --- a/cri/v1alpha2/cri_wrapper.go +++ b/cri/v1alpha2/cri_wrapper.go @@ -109,12 +109,12 @@ func (c *CriWrapper) RemovePodSandbox(ctx context.Context, r *runtime.RemovePodS // PodSandboxStatus returns the status of the PodSandbox. func (c *CriWrapper) PodSandboxStatus(ctx context.Context, r *runtime.PodSandboxStatusRequest) (res *runtime.PodSandboxStatusResponse, err error) { - logrus.Infof("PodSandboxStatus for %q", r.GetPodSandboxId()) + logrus.Debugf("PodSandboxStatus for %q", r.GetPodSandboxId()) defer func() { if err != nil { logrus.Errorf("failed to get PodSandboxStatus: %q, %v", r.GetPodSandboxId(), err) } else { - logrus.Infof("success to get PodSandboxStatus: %q, %+v", r.GetPodSandboxId(), res.GetStatus()) + logrus.Debugf("success to get PodSandboxStatus: %q, %+v", r.GetPodSandboxId(), res.GetStatus()) } }() return c.CriManager.PodSandboxStatus(ctx, r) @@ -206,12 +206,12 @@ func (c *CriWrapper) ListContainers(ctx context.Context, r *runtime.ListContaine // ContainerStatus inspects the container and returns the status. func (c *CriWrapper) ContainerStatus(ctx context.Context, r *runtime.ContainerStatusRequest) (res *runtime.ContainerStatusResponse, err error) { - logrus.Infof("ContainerStatus for %q", r.GetContainerId()) + logrus.Debugf("ContainerStatus for %q", r.GetContainerId()) defer func() { if err != nil { logrus.Warnf("failed to get ContainerStatus: %q, %v", r.GetContainerId(), err) } else { - logrus.Infof("success to get ContainerStatus: %q, %+v", r.GetContainerId(), res.GetStatus()) + logrus.Debugf("success to get ContainerStatus: %q, %+v", r.GetContainerId(), res.GetStatus()) } }() return c.CriManager.ContainerStatus(ctx, r) @@ -220,12 +220,12 @@ func (c *CriWrapper) ContainerStatus(ctx context.Context, r *runtime.ContainerSt // ContainerStats returns stats of the container. If the container does not // exist, the call returns an error. func (c *CriWrapper) ContainerStats(ctx context.Context, r *runtime.ContainerStatsRequest) (res *runtime.ContainerStatsResponse, err error) { - logrus.Infof("ContainerStats for %q", r.GetContainerId()) + logrus.Debugf("ContainerStats for %q", r.GetContainerId()) defer func() { if err != nil { logrus.Errorf("failed to get ContainerStats: %q, %v", r.GetContainerId(), err) } else { - logrus.Infof("success to get ContainerStats: %q, %+v", r.GetContainerId(), res.GetStats()) + logrus.Debugf("success to get ContainerStats: %q, %+v", r.GetContainerId(), res.GetStats()) } }() return c.CriManager.ContainerStats(ctx, r) @@ -343,12 +343,12 @@ func (c *CriWrapper) UpdateRuntimeConfig(ctx context.Context, r *runtime.UpdateR // Status returns the status of the runtime. func (c *CriWrapper) Status(ctx context.Context, r *runtime.StatusRequest) (res *runtime.StatusResponse, err error) { - logrus.Infof("Status of cri manager") + logrus.Debugf("Status of cri manager") defer func() { if err != nil { logrus.Errorf("failed to get status: %v", err) } else { - logrus.Infof("success to get status: %+v", res.GetStatus()) + logrus.Debugf("success to get status: %+v", res.GetStatus()) } }() return c.CriManager.Status(ctx, r) @@ -370,12 +370,12 @@ func (c *CriWrapper) ListImages(ctx context.Context, r *runtime.ListImagesReques // ImageStatus returns the status of the image, returns nil if the image isn't present. func (c *CriWrapper) ImageStatus(ctx context.Context, r *runtime.ImageStatusRequest) (res *runtime.ImageStatusResponse, err error) { - logrus.Infof("ImageStatus for %q", r.GetImage().GetImage()) + logrus.Debugf("ImageStatus for %q", r.GetImage().GetImage()) defer func() { if err != nil { logrus.Errorf("failed to get ImageStatus: %q, %v", r.GetImage().GetImage(), err) } else { - logrus.Infof("success to get ImageStatus: %q, %+v", + logrus.Debugf("success to get ImageStatus: %q, %+v", r.GetImage().GetImage(), res.GetImage()) } }() @@ -411,12 +411,12 @@ func (c *CriWrapper) RemoveImage(ctx context.Context, r *runtime.RemoveImageRequ // ImageFsInfo returns information of the filesystem that is used to store images. func (c *CriWrapper) ImageFsInfo(ctx context.Context, r *runtime.ImageFsInfoRequest) (res *runtime.ImageFsInfoResponse, err error) { - logrus.Infof("ImageFsInfo of cri manager") + logrus.Debugf("ImageFsInfo of cri manager") defer func() { if err != nil { logrus.Errorf("faild to get ImageFsInfo: %v", err) } else { - logrus.Infof("success to get ImageFsInfo, return filesystem info %+v", res.GetImageFilesystems()) + logrus.Debugf("success to get ImageFsInfo, return filesystem info %+v", res.GetImageFilesystems()) } }() return c.CriManager.ImageFsInfo(ctx, r) diff --git a/storage/quota/quota.go b/storage/quota/quota.go index f4420fa18..301914748 100644 --- a/storage/quota/quota.go +++ b/storage/quota/quota.go @@ -127,6 +127,7 @@ func SetSubtree(dir string, qid uint32) (uint32, error) { // SetDiskQuota is used to set quota for directory. func SetDiskQuota(dir string, size string, quotaID uint32) error { + logrus.Infof("set disk quota, dir: (%s), size: (%s), quotaID: (%d)", dir, size, quotaID) return GQuotaDriver.SetDiskQuota(dir, size, quotaID) }