Bug 2050179

Summary: [ansible-freeipa] Not able to update empty descriptions in automount maps.
Product: Red Hat Enterprise Linux 9 Reporter: Varun Mylaraiah <mvarun>
Component: ansible-freeipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: Varun Mylaraiah <mvarun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: ipa-qe, rjeffman, twoerner
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-freeipa-1.7.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2048552 Environment:
Last Closed: 2022-11-15 10:21:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2048552    
Bug Blocks:    

Description Varun Mylaraiah 2022-02-03 12:21:41 UTC
+++ This bug was initially created as a clone of Bug #2048552 +++

Description of problem:
 Not able to update empty descriptions in automount maps.

Version-Release number of selected component (if applicable):
ansible-freeipa-1.6.3-1


How reproducible:


Steps to Reproduce:

transport.py               318 INFO     RUN ['ipa', 'automountlocation-add', '05automuntmap_testlocation']
transport.py               519 DEBUG    RUN ['ipa', 'automountlocation-add', '05automuntmap_testlocation']
channel.py                1212 DEBUG    [chan 68] Sesch channel 68 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    -----------------------------------------------------
transport.py               563 DEBUG    Added automount location "05automuntmap_testlocation"
transport.py               563 DEBUG    -----------------------------------------------------
transport.py               563 DEBUG      Location: 05automuntmap_testlocation
channel.py                1212 DEBUG    [chan 68] EOF received (68)
channel.py                1212 DEBUG    [chan 68] EOF sent (68)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 69] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 69] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 69 opened.
transport.py               318 INFO     RUN ['ipa', 'automountmap-add', '05automuntmap_testlocation', '05_automountmap_testmap', '--desc=new automount map']
transport.py               519 DEBUG    RUN ['ipa', 'automountmap-add', '05automuntmap_testlocation', '05_automountmap_testmap', '--desc=new automount map']
channel.py                1212 DEBUG    [chan 69] Sesch channel 69 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ---------------------------------------------
transport.py               563 DEBUG    Added automount map "05_automountmap_testmap"
transport.py               563 DEBUG    ---------------------------------------------
transport.py               563 DEBUG      Map: 05_automountmap_testmap
transport.py               563 DEBUG      Description: new automount map
channel.py                1212 DEBUG    [chan 69] EOF received (69)
channel.py                1212 DEBUG    [chan 69] EOF sent (69)
transport.py               217 DEBUG    Exit code: 0
transport.py               293 INFO     WRITE inventory/automount.hosts
sftp.py                    158 DEBUG    [chan 0] open(b'inventory/automount.hosts', 'wb')
sftp.py                    158 DEBUG    [chan 0] open(b'inventory/automount.hosts', 'wb') -> 00000000
sftp.py                    158 DEBUG    [chan 0] close(00000000)
transport.py               329 INFO     PUT automount_module.yml
sftp.py                    158 DEBUG    [chan 0] open(b'automount_module.yml', 'wb')
sftp.py                    158 DEBUG    [chan 0] open(b'automount_module.yml', 'wb') -> 00000000
sftp.py                    158 DEBUG    [chan 0] close(00000000)
sftp.py                    158 DEBUG    [chan 0] stat(b'automount_module.yml')
channel.py                1212 DEBUG    [chan 14] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 14] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 14 opened.
transport.py               318 INFO     RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automount.hosts', 'automount_module.yml']
transport.py               519 DEBUG    RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automount.hosts', 'automount_module.yml']
channel.py                1212 DEBUG    [chan 14] Sesch channel 14 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ansible-playbook [core 2.12.1]
transport.py               563 DEBUG      config file = /root/ansible.cfg
transport.py               563 DEBUG      configured module search path = ['/root/ansible-freeipa/plugins/modules']
transport.py               563 DEBUG      ansible python module location = /usr/lib/python3.8/site-packages/ansible
transport.py               563 DEBUG      ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
transport.py               563 DEBUG      executable location = /usr/bin/ansible-playbook
transport.py               563 DEBUG      python version = 3.8.12 (default, Sep 16 2021, 10:46:05) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
transport.py               563 DEBUG      jinja version = 2.10.3
transport.py               563 DEBUG      libyaml = True
transport.py               563 DEBUG    Using /root/ansible.cfg as config file
transport.py               563 DEBUG    Skipping callback 'default', as we already have a stdout callback.
transport.py               563 DEBUG    Skipping callback 'minimal', as we already have a stdout callback.
transport.py               563 DEBUG    Skipping callback 'oneline', as we already have a stdout callback.
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAYBOOK: automount_module.yml *************************************************
transport.py               563 DEBUG    1 plays in automount_module.yml
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY [Playbook to ensure automount map description is updated with empty.] *****
transport.py               563 DEBUG    
transport.py               563 DEBUG    TASK [Gathering Facts] *********************************************************
transport.py               563 DEBUG    task path: /root/automount_module.yml:3
transport.py               563 DEBUG    ok: [master.ipadomain.test]
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    
transport.py               563 DEBUG    TASK [ipaautomountmap] *********************************************************
transport.py               563 DEBUG    task path: /root/automount_module.yml:8
transport.py               563 DEBUG    ok: [master.ipadomain.test] => {"changed": false}
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    META: ran handlers
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY RECAP *********************************************************************
transport.py               563 DEBUG    master.ipadomain.test      : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
transport.py               563 DEBUG    
channel.py                1212 DEBUG    [chan 14] EOF received (14)
channel.py                1212 DEBUG    [chan 14] EOF sent (14)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 70] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 70] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 70 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 70] Sesch channel 70 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 70] EOF received (70)
channel.py                1212 DEBUG    [chan 70] EOF sent (70)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 71] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 71] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 71 opened.
transport.py               318 INFO     RUN ['ipa', 'automountmap-show', '05automuntmap_testlocation', '05_automountmap_testmap']
transport.py               519 DEBUG    RUN ['ipa', 'automountmap-show', '05automuntmap_testlocation', '05_automountmap_testmap']
channel.py                1212 DEBUG    [chan 71] Sesch channel 71 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG      Map: 05_automountmap_testmap
transport.py               563 DEBUG      Description: new automount map

Actual results:


Expected results:
Should allow an empty description to be used to clear automount map
description.

Additional info:

--- Additional comment from Rafael Jeffman on 2022-01-31 19:31:26 IST ---

Upstream PR to fix this issue: https://github.com/freeipa/ansible-freeipa/pull/754

Comment 1 Theodoros Apazoglou 2022-02-09 12:54:48 UTC
@mvarun @twoerner, the product is RHEL9 but the ITR 8.7. Please change appropriately.

Comment 7 Varun Mylaraiah 2022-05-23 03:38:54 UTC
Verified

ansible-core-2.12.5-2.el9.x86_64
ansible-freeipa-1.7.0-1.el9.noarch

Passed	ansible_freeipa_tests/automount/test_automount.py::TestAutomountmap::test_automountmap_update_empty_description

INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['kinit', 'admin']
DEBUG    pytest_multihost.host.Host.master.cmd155:transport.py:519 RUN ['kinit', 'admin']
DEBUG    pytest_multihost.host.Host.master.cmd155:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd155:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd155:transport.py:563 Password for admin: 
DEBUG    pytest_multihost.host.Host.master.cmd155:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['ipa', 'automountlocation-add', '05automuntmap_testlocation']
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:519 RUN ['ipa', 'automountlocation-add', '05automuntmap_testlocation']
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563 -----------------------------------------------------
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563 Added automount location "05automuntmap_testlocation"
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563 -----------------------------------------------------
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:563   Location: 05automuntmap_testlocation
DEBUG    pytest_multihost.host.Host.master.cmd156:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['ipa', 'automountmap-add', '05automuntmap_testlocation', '05_automountmap_testmap', '--desc=new automount map']
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:519 RUN ['ipa', 'automountmap-add', '05automuntmap_testlocation', '05_automountmap_testmap', '--desc=new automount map']
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563 ---------------------------------------------
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563 Added automount map "05_automountmap_testmap"
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563 ---------------------------------------------
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563   Map: 05_automountmap_testmap
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:563   Description: new automount map
DEBUG    pytest_multihost.host.Host.master.cmd157:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT inventory/automount.hosts
DEBUG    pytest_multihost.host.Host.ansible.cmd68:transport.py:519 RUN ['tee', 'inventory/automount.hosts']
DEBUG    pytest_multihost.host.Host.ansible.cmd68:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT automount_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd69:transport.py:519 RUN ['tee', 'automount_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd69:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:397 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automount.hosts', 'automount_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:519 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automount.hosts', 'automount_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 ansible-playbook [core 2.12.5]
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   config file = /etc/ansible/ansible.cfg
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   ansible python module location = /usr/lib/python3.9/site-packages/ansible
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   executable location = /usr/bin/ansible-playbook
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   python version = 3.9.10 (main, Feb  9 2022, 00:00:00) [GCC 11.2.1 20220127 (Red Hat 11.2.1-9)]
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   jinja version = 2.11.3
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563   libyaml = True
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 Using /etc/ansible/ansible.cfg as config file
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 Skipping callback 'default', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 Skipping callback 'minimal', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 Skipping callback 'oneline', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 PLAYBOOK: automount_module.yml *************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 1 plays in automount_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 PLAY [Playbook to ensure automount map description is updated with empty.] *****
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 TASK [Gathering Facts] *********************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 task path: /root/automount_module.yml:3
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 ok: [master.ipadomain.test]
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 META: ran handlers
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 TASK [ipaautomountmap] *********************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 task path: /root/automount_module.yml:8
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 changed: [master.ipadomain.test] => {"changed": true}
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 META: ran handlers
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 META: ran handlers
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 PLAY RECAP *********************************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 master.ipadomain.test      : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd70:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['kinit', 'admin']
DEBUG    pytest_multihost.host.Host.master.cmd158:transport.py:519 RUN ['kinit', 'admin']
DEBUG    pytest_multihost.host.Host.master.cmd158:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd158:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd158:transport.py:563 Password for admin: 
DEBUG    pytest_multihost.host.Host.master.cmd158:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.master.OpenSSHTransport:transport.py:397 RUN ['ipa', 'automountmap-show', '05automuntmap_testlocation', '05_automountmap_testmap']
DEBUG    pytest_multihost.host.Host.master.cmd159:transport.py:519 RUN ['ipa', 'automountmap-show', '05automuntmap_testlocation', '05_automountmap_testmap']
DEBUG    pytest_multihost.host.Host.master.cmd159:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd159:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.master.cmd159:transport.py:563   Map: 05_automountmap_testmap



Based on the above observation, marking the bug VERIFIED

Comment 9 errata-xmlrpc 2022-11-15 10:21:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ansible-freeipa bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:8101