Skip to content

Commit

Permalink
api: fix unsupported dummy cache type
Browse files Browse the repository at this point in the history
The dummycache type is missed to handle in config validation:

```
ERROR [/src/fusedev.rs:595] service mount error: RAFS failed to handle request, Failed to load config: failed to parse configuration information`
ERROR [/src/error.rs:18] Stack:
   0: backtrace::backtrace::trace
   1: backtrace::capture::Backtrace::new

ERROR [/src/error.rs:19] Error:
        Rafs(LoadConfig(Custom { kind: InvalidInput, error: "failed to parse configuration information" }))
        at service/src/fusedev.rs:596
ERROR [src/bin/nydusd/main.rs:525] Failed in starting daemon:
Error: Custom { kind: Other, error: "" }
```

Signed-off-by: Yan Song <[email protected]>
  • Loading branch information
imeoer committed Oct 31, 2023
1 parent f55d2c9 commit 3f89da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ impl TryFrom<&CacheConfig> for CacheConfigV2 {
"fscache" => {
config.fs_cache = Some(serde_json::from_value(v.cache_config.clone())?);
}
"" => {}
"" | "dummycache" => {}
t => {
return Err(Error::new(
ErrorKind::InvalidInput,
Expand Down

0 comments on commit 3f89da5

Please sign in to comment.