Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibm.power_aix.mount mounts remote NFS successfully, but doesn´t umount it. #417

Open
StevePOI opened this issue Feb 29, 2024 · 5 comments
Assignees

Comments

@StevePOI
Copy link

Describe the bug

I use ibm.power_aix.mount as roles in my playbooks, one task to mount a certain NFS (for EMGR, INSTALLP Module etc...):


  • name: Mount NFS '{{ NFSMOUNT }}'
    ibm.power_aix.mount:
    node: '{{ NFSMOUNT }}'
    mount_over_dir: /mnt
    mount_dir: /swdepot

And afterwards I umount it again:


  • name: Umount NFS '{{ NFSMOUNT }}'
    ibm.power_aix.mount:
    state: umount
    mount_over_dir: /mnt

Today I noticed that the umount part is not working anymore, it gives this "OK" message, so everything is green:

ok | msg: Filesystem/Mount point '/mnt' is not mounted

(Line https://github.com/IBM/ansible-power-aix/blob/dev-collection/plugins/modules/mount.py#L433 )

This behaviour must be relatively recent, it used to work in the last months of 2023 and I´m using this since 2021.

So I´m left with many mounted /mnt on my systems after each job run, please advise :) .

To Reproduce

Use the ibm.power_aix.mount Module to umount a remote NFS v3.

Expected behavior

According to https://github.com/IBM/ansible-power-aix/blob/dev-collection/plugins/modules/mount.py#L456 it should be:

result['msg'] = "Unmount successful."

And /mnt should be gone.

Environment (please complete the following information):

  • OS: [e.g. AIX 7.2.4.0] AIX 7.2.5.7
  • Python Version: [e.g. 2.7.5, 3.6] 3.9.18
  • OpenSSH Version: [e.g. 1.0.2] 9.2.112.2000 (using 3.0.10.1002 openssl)
  • Ansible Version: [e.g. 2.10.7] ansible [core 2.14.13]
  • AIX Collection Version: [e.g. 1.2.1] 1.8.1
@StevePOI
Copy link
Author

Addendum:

It works on a machine where the NFS is permanently mounted and in the /etc/filesystems:

Umount NFS 'nfs-swdepot'...
NIMSERVER_NAME done | msg: Unmount successful.

After running the playbook /mnt is gone here, while the other servers who only mount it via Ansible temporarily report:

aix72test01t ok | msg: Filesystem/Mount point '/mnt' is not mounted

while it is still there:

[aix72test01t:/home/USER]# mount|grep /mnt
nfs-swdepot /swdepot /mnt nfs3 Feb 29 12:38

I´m confused, is this a check further up in the code?

@StevePOI
Copy link
Author

StevePOI commented Mar 5, 2024

Addendum, this works as expected, so it seems it´s nothing specific about my AIX servers but a change in the ibm.power_aix.mount Module:


  • name: Unmount NFS '{{ NFSMOUNT }}'
    ansible.posix.mount:
    path: /mnt
    state: unmounted

@nitismis nitismis self-assigned this Mar 12, 2024
@StevePOI StevePOI changed the title ibm.power_aix.mount mounts remote NFS sucessfully, but doesn´t umount it. ibm.power_aix.mount mounts remote NFS successfully, but doesn´t umount it. Mar 13, 2024
@StevePOI
Copy link
Author

Hello @nitismis !

Can I provide any additional information :) ?

Thanks,

With kind regards,

Steve

@nitismis
Copy link
Member

@StevePOI ... I will prioritize this defect in our next sprint (starting Monday). You can provide the verbose out of the playbook.

Thanks

@StevePOI
Copy link
Author

@nitismis

Thanks for including it in the next sprint!

Is this verbose enough (-vvvv, we always see those kerberos messages):

Escalation succeeded <notesmig01t> (0, b'\r\n\r\n{"changed": false, "msg": "Filesystem/Mount point \'/mnt\' is not mounted", "cmd": "", "stdout": "", "stderr": "", "invocation": {"module_args": {"state": "umount", "mount_over_dir": "/mnt", "force": false, "removable_fs": false, "read_only": false, "mount_dir": null, "node": null, "mount_all": null, "alternate_fs": null, "fs_type": null, "vfsname": null, "options": null}}}\r\n', b"OpenSSH_9.2p1, OpenSSL 1.1.1v 1 Aug 2023\r\ndebug1: Reading configuration data /SCRIPTS/aau/.ssh/config\r\ndebug1: /SCRIPTS/aau/.ssh/config line 1: Applying options for *\r\ndebug1: using libz from /usr/opt/rpm/lib/libz.a(libz.so.1) \n\r\ndebug1: init_libz_ptrs success\r\ndebug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so): Could not load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).\nSystem error: No such file or directory\n\r\ndebug1: Error loading Kerberos, disabling Kerberos auth.\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/SCRIPTS/aau/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/SCRIPTS/aau/.ssh/known_hosts2'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13107706\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to notesmig01t closed.\r\n") <notesmig01t> ESTABLISH SSH CONNECTION FOR USER: None <notesmig01t> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o BindAddress=aixinfra01p -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/SCRIPTS/aau/.ansible/cp/948c094c44"' notesmig01t '/bin/sh -c '"'"'rm -f -r /home/aix_ansible_user/.ansible/tmp/ansible-tmp-1711100616.585834-16712124-117415238073420/ > /dev/null 2>&1 && sleep 0'"'"'' <notesmig01t> (0, b'', b"OpenSSH_9.2p1, OpenSSL 1.1.1v 1 Aug 2023\r\ndebug1: Reading configuration data /SCRIPTS/aau/.ssh/config\r\ndebug1: /SCRIPTS/aau/.ssh/config line 1: Applying options for *\r\ndebug1: using libz from /usr/opt/rpm/lib/libz.a(libz.so.1) \n\r\ndebug1: init_libz_ptrs success\r\ndebug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so): Could not load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).\nSystem error: No such file or directory\n\r\ndebug1: Error loading Kerberos, disabling Kerberos auth.\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/SCRIPTS/aau/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/SCRIPTS/aau/.ssh/known_hosts2'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 5 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13107706\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n") notesmig01t ok: { "changed": false, "cmd": "", "invocation": { "module_args": { "alternate_fs": null, "force": false, "fs_type": null, "mount_all": null, "mount_dir": null, "mount_over_dir": "/mnt", "node": null, "options": null, "read_only": false, "removable_fs": false, "state": "umount", "vfsname": null } }, "msg": "Filesystem/Mount point '/mnt' is not mounted", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": [] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants