From 8470ac075112aca9533db5ffb8367b8e3f8d14c1 Mon Sep 17 00:00:00 2001 From: Jeffry Molanus Date: Tue, 11 Aug 2020 11:50:40 +0200 Subject: [PATCH] nexus: fix log location --- mayastor/src/bdev/nexus/nexus_bdev.rs | 1 - mayastor/src/grpc/nexus_grpc.rs | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mayastor/src/bdev/nexus/nexus_bdev.rs b/mayastor/src/bdev/nexus/nexus_bdev.rs index c42e23558..cd01ba861 100644 --- a/mayastor/src/bdev/nexus/nexus_bdev.rs +++ b/mayastor/src/bdev/nexus/nexus_bdev.rs @@ -556,7 +556,6 @@ impl Nexus { } if r.await.unwrap() { - info!("Nexus {} destroyed", self.name); Ok(()) } else { Err(Error::NexusDestroy { diff --git a/mayastor/src/grpc/nexus_grpc.rs b/mayastor/src/grpc/nexus_grpc.rs index 09658adca..1ef000d92 100644 --- a/mayastor/src/grpc/nexus_grpc.rs +++ b/mayastor/src/grpc/nexus_grpc.rs @@ -122,7 +122,12 @@ pub async fn nexus_add_child( /// Idempotent destruction of the nexus. pub async fn nexus_destroy(uuid: &str) -> Result<(), Error> { if let Ok(n) = nexus_lookup(uuid) { - n.destroy().await?; + let result = n.destroy().await; + if result.is_ok() { + info!("Nexus {} destroyed", uuid) + } else { + return result; + } }; Ok(()) }