Merge pull request #432 from mikebrow/vet-fixes

fixing vet errors
This commit is contained in:
Lantao Liu 2017-11-27 12:03:30 -08:00 committed by GitHub
commit 4b4714eaca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -85,13 +85,13 @@ func Import(ctx context.Context, cs content.Store, is images.Store, reader io.Re
for _, desc := range layers {
// Remove root tag from layers now that manifest refers to it
if _, err := cs.Update(ctx, content.Info{Digest: desc.Digest}, "labels.containerd.io/gc.root"); err != nil {
log.G(ctx).WithError(err).Error("Failed to remove layer %q root tag", desc.Digest)
log.G(ctx).WithError(err).Errorf("Failed to remove layer %q root tag", desc.Digest)
}
}
for _, cfg := range configs {
// Remove root tag from config now that manifest refers to it
if _, err := cs.Update(ctx, content.Info{Digest: cfg.desc.Digest}, "labels.containerd.io/gc.root"); err != nil {
log.G(ctx).WithError(err).Error("Failed to remove config %q root tag", cfg.desc.Digest)
log.G(ctx).WithError(err).Errorf("Failed to remove config %q root tag", cfg.desc.Digest)
}
}
}()

View File

@ -86,8 +86,8 @@ func (c *criContainerdService) getContainerMetrics(
StorageId: &runtime.StorageIdentifier{
Uuid: c.imageFSUUID,
},
UsedBytes: &runtime.UInt64Value{usedBytes},
InodesUsed: &runtime.UInt64Value{inodesUsed},
UsedBytes: &runtime.UInt64Value{Value: usedBytes},
InodesUsed: &runtime.UInt64Value{Value: inodesUsed},
}
cs.Attributes = &runtime.ContainerAttributes{
Id: meta.ID,
@ -105,13 +105,13 @@ func (c *criContainerdService) getContainerMetrics(
if metrics.CPU != nil && metrics.CPU.Usage != nil {
cs.Cpu = &runtime.CpuUsage{
Timestamp: stats.Timestamp.UnixNano(),
UsageCoreNanoSeconds: &runtime.UInt64Value{metrics.CPU.Usage.Total},
UsageCoreNanoSeconds: &runtime.UInt64Value{Value: metrics.CPU.Usage.Total},
}
}
if metrics.Memory != nil && metrics.Memory.Usage != nil {
cs.Memory = &runtime.MemoryUsage{
Timestamp: stats.Timestamp.UnixNano(),
WorkingSetBytes: &runtime.UInt64Value{metrics.Memory.Usage.Usage},
WorkingSetBytes: &runtime.UInt64Value{Value: metrics.Memory.Usage.Usage},
}
}
}