Bug 1732529 - repeated uninstallation of ipa-client-samba crashes
Summary: repeated uninstallation of ipa-client-samba crashes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On: 1732524 1732528
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-23 15:19 UTC by Sergey Orlov
Modified: 2019-11-05 20:53 UTC (History)
14 users (show)

Fixed In Version: ipa-4.8.0-5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1732524
Environment:
Last Closed: 2019-11-05 20:53:27 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3348 None None None 2019-11-05 20:53:37 UTC

Description Sergey Orlov 2019-07-23 15:19:02 UTC
+++ This bug was initially created as a clone of Bug #1732524 +++

Description of problem:
When "ipa-client-samba --uninstall" is uninstalled twice, it crashes

Version-Release number of selected component (if applicable):
freeipa-client-samba-4.8.0-1.fc30.x86_64

How reproducible:
Always

Steps to Reproduce:
1. ipa-client-samba -U 
2. ipa-client-samba -U --uninstall
3. ipa-client-samba -U --uninstall

Actual results:
Traceback (most recent call last):
  File "/usr/sbin/ipa-client-samba", line 15, in <module>
    sys.exit(ipa_client_samba.run())
  File "/usr/lib/python3.7/site-packages/ipaclient/install/ipa_client_samba.py", line 524, in run
    uninstall(fstore, statestore, options)
  File "/usr/lib/python3.7/site-packages/ipaclient/install/ipa_client_samba.py", line 437, in uninstall
    fstore.restore_file(paths.SMB_CONF)
  File "/usr/lib/python3.7/site-packages/ipalib/install/sysrestore.py", line 201, in restore_file
    raise ValueError("No such file name in the index")
ValueError: No such file name in the index


Expected results:
Samba domain member is not configured yet

Additional info:

Comment 1 Sergey Orlov 2019-07-23 15:21:21 UTC
+++ This bug was initially created as a clone of Bug #1732528 +++

Description of problem:
After samba installation and uninstallation ipa-client-samba refuses to reinstall samba.

Version-Release number of selected component (if applicable):
freeipa-client-samba-4.8.0-1.fc30.x86_64

How reproducible:
Always

Steps to Reproduce:
1. ipa-client-samba -U
2. ipa-client-samba -U --uninstall
3. ipa-client-samba -U

Actual results:
Samba domain member is already configured

Expected results:
Samba is configured

Additional info:

Comment 2 Alexander Bokovoy 2019-07-23 15:23:10 UTC
These two issues are in the same place -- processing of the datastore at uninstall, so it makes sense to handle them as a single bug.

Comment 5 Sergey Orlov 2019-09-02 12:49:31 UTC
Verified for RHEL8.1 nightly compose using automatic test ipatests/test_integration/test_smb.py from https://github.com/freeipa/freeipa/pull/3576.

cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.1 Beta (Ootpa)

rpm -q ipa-client-samba
ipa-client-samba-4.8.0-5.module+el8.1.0+3809+d28f8357.x86_64

ipa-run-tests-3 ipatests/test_integration/test_smb.py -v
...
============================================================================================================ test session starts ============================================================================================================
platform linux -- Python 3.6.8, pytest-3.4.2, py-1.5.4, pluggy-0.6.0 -- /usr/bin/python3
cachedir: ipatests/.pytest_cache
rootdir: /home/sorlov/work/FREEIPA-3351-verify-samba/freeipa/ipatests, inifile:
plugins: profiling-1.6.0, sourceorder-0.5, multihost-3.0
collected 11 items                                                                                                                                                                                                                          

ipatests/test_integration/test_smb.py::TestSMB::test_samba_uninstallation_without_installation PASSED                                                                                                                                 [  9%]
ipatests/test_integration/test_smb.py::TestSMB::test_install_samba PASSED                                                                                                                                                             [ 18%]
ipatests/test_integration/test_smb.py::TestSMB::test_samba_service_listed PASSED                                                                                                                                                      [ 27%]
ipatests/test_integration/test_smb.py::TestSMB::test_smb_access_for_ipa_user_at_ipa_client PASSED                                                                                                                                     [ 36%]
ipatests/test_integration/test_smb.py::TestSMB::test_smb_access_for_ad_user_at_ipa_client PASSED                                                                                                                                      [ 45%]
ipatests/test_integration/test_smb.py::TestSMB::test_smb_mount_and_access_by_different_users PASSED                                                                                                                                   [ 54%]
ipatests/test_integration/test_smb.py::TestSMB::test_smb_mount_fails_without_kerberos_ticket PASSED                                                                                                                                   [ 63%]
ipatests/test_integration/test_smb.py::TestSMB::test_uninstall_samba PASSED                                                                                                                                                           [ 72%]
ipatests/test_integration/test_smb.py::TestSMB::test_repeated_uninstall_samba PASSED                                                                                                                                                  [ 81%]
ipatests/test_integration/test_smb.py::TestSMB::test_samba_reinstall PASSED                                                                                                                                                           [ 90%]
ipatests/test_integration/test_smb.py::TestSMB::test_cleanup PASSED                                                                                                                                                                   [100%]

======================================================================================================== 11 passed in 708.24 seconds ========================================================================================================

Comment 8 errata-xmlrpc 2019-11-05 20:53:27 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, 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/RHBA-2019:3348


Note You need to log in before you can comment on or make changes to this bug.