commit
4b4714eaca
@ -85,13 +85,13 @@ func Import(ctx context.Context, cs content.Store, is images.Store, reader io.Re
|
|||||||
for _, desc := range layers {
|
for _, desc := range layers {
|
||||||
// Remove root tag from layers now that manifest refers to it
|
// 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 {
|
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 {
|
for _, cfg := range configs {
|
||||||
// Remove root tag from config now that manifest refers to it
|
// 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 {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
@ -86,8 +86,8 @@ func (c *criContainerdService) getContainerMetrics(
|
|||||||
StorageId: &runtime.StorageIdentifier{
|
StorageId: &runtime.StorageIdentifier{
|
||||||
Uuid: c.imageFSUUID,
|
Uuid: c.imageFSUUID,
|
||||||
},
|
},
|
||||||
UsedBytes: &runtime.UInt64Value{usedBytes},
|
UsedBytes: &runtime.UInt64Value{Value: usedBytes},
|
||||||
InodesUsed: &runtime.UInt64Value{inodesUsed},
|
InodesUsed: &runtime.UInt64Value{Value: inodesUsed},
|
||||||
}
|
}
|
||||||
cs.Attributes = &runtime.ContainerAttributes{
|
cs.Attributes = &runtime.ContainerAttributes{
|
||||||
Id: meta.ID,
|
Id: meta.ID,
|
||||||
@ -105,13 +105,13 @@ func (c *criContainerdService) getContainerMetrics(
|
|||||||
if metrics.CPU != nil && metrics.CPU.Usage != nil {
|
if metrics.CPU != nil && metrics.CPU.Usage != nil {
|
||||||
cs.Cpu = &runtime.CpuUsage{
|
cs.Cpu = &runtime.CpuUsage{
|
||||||
Timestamp: stats.Timestamp.UnixNano(),
|
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 {
|
if metrics.Memory != nil && metrics.Memory.Usage != nil {
|
||||||
cs.Memory = &runtime.MemoryUsage{
|
cs.Memory = &runtime.MemoryUsage{
|
||||||
Timestamp: stats.Timestamp.UnixNano(),
|
Timestamp: stats.Timestamp.UnixNano(),
|
||||||
WorkingSetBytes: &runtime.UInt64Value{metrics.Memory.Usage.Usage},
|
WorkingSetBytes: &runtime.UInt64Value{Value: metrics.Memory.Usage.Usage},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user