mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-02 05:34:46 +00:00
agent: add some logs for mount operation
Somewhere is lack of log info, add more details about the storage and log when error will help understand what happened. Fixes: #4962 Signed-off-by: Bin Liu <bin@hyper.sh>
This commit is contained in:
parent
2b5dc2ad39
commit
c08a8631e0
@ -169,11 +169,12 @@ pub fn baremount(
|
||||
|
||||
info!(
|
||||
logger,
|
||||
"mount source={:?}, dest={:?}, fs_type={:?}, options={:?}",
|
||||
"baremount source={:?}, dest={:?}, fs_type={:?}, options={:?}, flags={:?}",
|
||||
source,
|
||||
destination,
|
||||
fs_type,
|
||||
options
|
||||
options,
|
||||
flags
|
||||
);
|
||||
|
||||
nix::mount::mount(
|
||||
@ -779,6 +780,14 @@ pub async fn add_storages(
|
||||
};
|
||||
|
||||
// Todo need to rollback the mounted storage if err met.
|
||||
|
||||
if res.is_err() {
|
||||
error!(
|
||||
logger,
|
||||
"add_storages failed, storage: {:?}, error: {:?} ", storage, res
|
||||
);
|
||||
}
|
||||
|
||||
let mount_point = res?;
|
||||
|
||||
if !mount_point.is_empty() {
|
||||
|
Loading…
Reference in New Issue
Block a user