Skip to content

Commit a937237

Browse files
Merge pull request #2060 from ansible-collections/bug/1940/mount_handle_fsumf168
[Bugfix][zos_mount] added condition to skip fsumf168 during df call
2 parents a90d153 + b0c9774 commit a937237

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bugfixes:
2+
- zos_mount - FSUMF168 return in stderror means that the mount dataset wouldn't resolve.
3+
While this shows a catalog or volume issue, it should not impact our search for an existing mount.
4+
Added handling to the df call, so that FSUMF168 are ignored.
5+
(https://github.com/ansible-collections/ibm_zos_core/pull/2060).

plugins/modules/zos_mount.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,17 @@ def run_module(module, arg_def):
844844
rc, stdout, stderr = module.run_command("df", use_unsafe_shell=False, errors='replace')
845845

846846
if rc != 0:
847-
module.fail_json(
848-
msg="Checking filesystem list failed with error", stderr=str(res_args)
849-
)
847+
# FSUMF168 return in stderror means that the mount dataset wouldn't resolve.
848+
# While this shows a catalog or volume issue, it should not impact our search for an existing mount
849+
# From Dan Acevedo: all listed mounts will be fine... just some wouldn't list.
850+
851+
if "FSUMF168" not in stderr:
852+
module.fail_json(
853+
msg="Checking filesystem list failed with error", stderr=str(res_args)
854+
)
855+
else:
856+
rc = 0
857+
850858
sttest = stdout.splitlines()
851859
for line in sttest:
852860
if src in line:

0 commit comments

Comments
 (0)