Closed ChengyuZhu6 closed 1 year ago
When preparing the Container writable layer to export image as tarfs block device with dm-verity, the behavior will trigger snapshotter to crash.
error:
panic: assignment to entry in nil map
The reason is that there is an assignment to blockinfo within the labels map, which is currently uninitialized (a nil map).
blockInfo := strconv.FormatUint(dataBlobks, 10) + "," + strconv.FormatUint(hashOffset, 10) + "," + "sha256:" + rootHash if wholeImage { labels[label.NydusImageBlockInfo] = blockInfo updateFields = append(updateFields, "labels."+label.NydusImageBlockInfo) } else { labels[label.NydusLayerBlockInfo] = blockInfo updateFields = append(updateFields, "labels."+label.NydusLayerBlockInfo) }
Fixed
When preparing the Container writable layer to export image as tarfs block device with dm-verity, the behavior will trigger snapshotter to crash.
error:
The reason is that there is an assignment to blockinfo within the labels map, which is currently uninitialized (a nil map).