agent: log the tag and mount point if it is already mounted

On commit 17e9a2cff5 it was introduced a guard for the case the mount point is already
mounted. Instead of log only the mount tag ("kataShared") with this change it will print
both tag and mount point path.

Fixes: #1398
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta 2021-03-31 15:06:23 -04:00
parent aac852a0bc
commit 49eec92038

View File

@ -405,7 +405,10 @@ fn mount_storage(logger: &Logger, storage: &Storage) -> Result<()> {
// If so, skip doing the mount. This facilitates mounting the sharedfs automatically // If so, skip doing the mount. This facilitates mounting the sharedfs automatically
// in the guest before the agent service starts. // in the guest before the agent service starts.
if storage.source == MOUNT_GUEST_TAG && is_mounted(&storage.mount_point)? { if storage.source == MOUNT_GUEST_TAG && is_mounted(&storage.mount_point)? {
warn!(logger, "kataShared already mounted, ignoring..."); warn!(
logger,
"{} already mounted on {}, ignoring...", MOUNT_GUEST_TAG, &storage.mount_point
);
return Ok(()); return Ok(());
} }