From 678fe3cd314e47b42aad6f3f1670d4c7ee2c8116 Mon Sep 17 00:00:00 2001 From: Chao Wu Date: Wed, 20 Sep 2023 19:33:24 +0800 Subject: [PATCH] Dragonball: fix Nydus config serde problem Since Nydus snapshotter has been updated in previous commits, there is a problem that the config passthrough to Dragonball during mount_rafs is RafsConfig instead of ConfigV2, but Dragonball could only serde ConfigV2 so it will panic. We need to add the support for RafsConfig Fixes:#8013 Signed-off-by: Chao Wu --- src/dragonball/src/dbs_virtio_devices/src/fs/device.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dragonball/src/dbs_virtio_devices/src/fs/device.rs b/src/dragonball/src/dbs_virtio_devices/src/fs/device.rs index 2f9c2c283..d0156db7a 100644 --- a/src/dragonball/src/dbs_virtio_devices/src/fs/device.rs +++ b/src/dragonball/src/dbs_virtio_devices/src/fs/device.rs @@ -475,7 +475,7 @@ impl VirtioFs { let (mut rafs, rafs_cfg) = match config.as_ref() { Some(cfg) => { let rafs_conf: Arc = Arc::new( - serde_json::from_str(cfg).map_err(|e| FsError::BackendFs(e.to_string()))?, + ConfigV2::from_str(cfg).map_err(|e| FsError::BackendFs(e.to_string()))?, ); (