containerd / accelerated-container-image

A production-ready remote container image format (overlaybd) and snapshotter based on block-device.
Apache License 2.0
405 stars 73 forks source link

ctr snapshot --snapshotter=overlaybd rm key #232

Closed qi0523 closed 11 months ago

qi0523 commented 11 months ago

ctr snapshot --snapshotter=overlaybd tree

sha256:ec95d1a964906dce1c037f435d474bfa131c4d32588002e133e3a6138cd0f14b

sha256:e94bd2bcac6420c55553fcc222a3dcb7838f3b6e45daef02f592ec61803415d5

sha256:3682baf14f4112551b51547171ab9e6bafd831de5bea21200f7eafebd274222a

sudo ctr snapshot --snapshotter=overlaybd rm sha256:3682baf14f4112551b51547171ab9e6bafd831de5bea21200f7eafebd274222a

error msg: ctr: failed to remove "sha256:3682baf14f4112551b51547171ab9e6bafd831de5bea21200f7eafebd274222a": cannot remove snapshot with child: failed precondition

Is it because /sys/kernel/config/tartget/core/user_999999999/dev_xx was not deleted?

When using ctr image rm xxx, the overlaybd snapshots and /sys/kernel/config/tartget/core/user_999999999/dev_xx are all removed.

liulanzheng commented 11 months ago

@qi0523 dev_xx would not directly impact the logic of the snapshot. dev_xx was associated with a snapshot, and wound delete with that snapshot. If default config was used, that dev_xx was associated with the snapshot of the top image layer.