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