If command in _run_umount_lf() fails and the is_mounted() turns to be
false, "proc" is returned by this method even though it is undefined (it
won't be defined by try clause fails leading the control to jump from
try to except without defining variable).
Fixes: https://tracker.ceph.com/issues/73374
Signed-off-by: Rishabh Dave <ridave@redhat.com>
proc = self.client_remote.run(
args=f'sudo umount --lazy --force {self.hostfs_mntpt}',
timeout=UMOUNT_TIMEOUT, omit_sudo=False)
+ return proc
except CommandFailedError:
if self.is_mounted():
raise
- return proc
-
def umount(self):
raise NotImplementedError()