Don't log config at info level.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
04416381c1
commit
89717d0b63
@ -76,6 +76,7 @@ func init() {
|
||||
// CreateContainer creates a new container in the given PodSandbox.
|
||||
func (c *criService) CreateContainer(ctx context.Context, r *runtime.CreateContainerRequest) (_ *runtime.CreateContainerResponse, retErr error) {
|
||||
config := r.GetConfig()
|
||||
logrus.Debugf("Container config %+v", config)
|
||||
sandboxConfig := r.GetSandboxConfig()
|
||||
sandbox, err := c.sandboxStore.Get(r.GetPodSandboxId())
|
||||
if err != nil {
|
||||
|
@ -52,7 +52,7 @@ func (in *instrumentedService) RunPodSandbox(ctx context.Context, r *runtime.Run
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
logrus.Infof("RunPodSandbox with config %+v", r.GetConfig())
|
||||
logrus.Infof("RunPodsandbox for %+v", r.GetConfig().GetMetadata())
|
||||
defer func() {
|
||||
if err != nil {
|
||||
logrus.WithError(err).Errorf("RunPodSandbox for %+v failed, error", r.GetConfig().GetMetadata())
|
||||
@ -142,8 +142,8 @@ func (in *instrumentedService) CreateContainer(ctx context.Context, r *runtime.C
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
logrus.Infof("CreateContainer within sandbox %q with container config %+v and sandbox config %+v",
|
||||
r.GetPodSandboxId(), r.GetConfig(), r.GetSandboxConfig())
|
||||
logrus.Infof("CreateContainer within sandbox %q for container %+v",
|
||||
r.GetPodSandboxId(), r.GetConfig().GetMetadata())
|
||||
defer func() {
|
||||
if err != nil {
|
||||
logrus.WithError(err).Errorf("CreateContainer within sandbox %q for %+v failed",
|
||||
|
@ -28,6 +28,7 @@ import (
|
||||
"github.com/containerd/containerd/oci"
|
||||
cni "github.com/containerd/go-cni"
|
||||
"github.com/containerd/typeurl"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/pkg/errors"
|
||||
@ -55,6 +56,7 @@ func init() {
|
||||
// the sandbox is in ready state.
|
||||
func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandboxRequest) (_ *runtime.RunPodSandboxResponse, retErr error) {
|
||||
config := r.GetConfig()
|
||||
logrus.Debugf("Sandbox config %+v", config)
|
||||
|
||||
// Generate unique id and name for the sandbox and reserve the name.
|
||||
id := util.GenerateID()
|
||||
@ -149,7 +151,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to generate sandbox container spec")
|
||||
}
|
||||
logrus.Debugf("Sandbox container spec: %+v", spec)
|
||||
logrus.Debugf("Sandbox container %q spec: %#+v", id, spew.NewFormatter(spec))
|
||||
|
||||
var specOpts []oci.SpecOpts
|
||||
userstr, err := generateUserString(
|
||||
|
Loading…
Reference in New Issue
Block a user