зеркало из https://github.com/microsoft/docker.git
devmapper: Export deferred removal status in status
This will help with debugging as one could just do "docker info" and figure out of deferred removal is enabled or not. Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Родитель
e37c7203bb
Коммит
66a53819ae
|
@ -115,15 +115,16 @@ type DiskUsage struct {
|
|||
}
|
||||
|
||||
type Status struct {
|
||||
PoolName string
|
||||
DataFile string // actual block device for data
|
||||
DataLoopback string // loopback file, if used
|
||||
MetadataFile string // actual block device for metadata
|
||||
MetadataLoopback string // loopback file, if used
|
||||
Data DiskUsage
|
||||
Metadata DiskUsage
|
||||
SectorSize uint64
|
||||
UdevSyncSupported bool
|
||||
PoolName string
|
||||
DataFile string // actual block device for data
|
||||
DataLoopback string // loopback file, if used
|
||||
MetadataFile string // actual block device for metadata
|
||||
MetadataLoopback string // loopback file, if used
|
||||
Data DiskUsage
|
||||
Metadata DiskUsage
|
||||
SectorSize uint64
|
||||
UdevSyncSupported bool
|
||||
DeferredRemoveEnabled bool
|
||||
}
|
||||
|
||||
type DevStatus struct {
|
||||
|
@ -1623,6 +1624,7 @@ func (devices *DeviceSet) Status() *Status {
|
|||
status.MetadataFile = devices.MetadataDevicePath()
|
||||
status.MetadataLoopback = devices.metadataLoopFile
|
||||
status.UdevSyncSupported = devicemapper.UdevSyncSupported()
|
||||
status.DeferredRemoveEnabled = devices.deferredRemove
|
||||
|
||||
totalSizeInSectors, _, dataUsed, dataTotal, metadataUsed, metadataTotal, err := devices.poolStatus()
|
||||
if err == nil {
|
||||
|
|
|
@ -77,6 +77,7 @@ func (d *Driver) Status() [][2]string {
|
|||
{"Metadata Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Total)))},
|
||||
{"Metadata Space Available", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Available)))},
|
||||
{"Udev Sync Supported", fmt.Sprintf("%v", s.UdevSyncSupported)},
|
||||
{"Deferred Removal Enabled", fmt.Sprintf("%v", s.DeferredRemoveEnabled)},
|
||||
}
|
||||
if len(s.DataLoopback) > 0 {
|
||||
status = append(status, [2]string{"Data loop file", s.DataLoopback})
|
||||
|
|
Загрузка…
Ссылка в новой задаче