#8019 repeated uninstallation of ipa-client-samba crashes
Closed: fixed by frenaud. Opened by fcami.

Ticket was cloned from Red Hat Bugzilla (product Fedora): 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:

Metadata Update from @fcami:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1732524

Metadata Update from @fcami:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/3435

master:

  • 68b85703d8ab2ede823d96e317dd106de27b108b ipatests: test multiple invocations of ipa-client-samba --uninstall
  • 5b65551b3107e46853afcc4901a60ea6e661a511 ipa-client-samba: remove and restore smb.conf only on first uninstall
  • ed6ee90c547cd27a3731f177dc9917176a714b49 ipatests: test ipa-client-samba after --uninstall
  • cd2cbaecfce6b7b607619b34503b62c8afbbe594 ipa-client-samba: remove state on uninstall

ipa-4-8:

  • b9b98097a47f27b56500edc972c438597e6609b1 ipatests: test multiple invocations of ipa-client-samba --uninstall
  • 256a6a879061d2b97c11e9cd97b2427579610fa1 ipa-client-samba: remove and restore smb.conf only on first uninstall
  • 00ba2ae6681dafa92d3f00f2a4e11adaa477ea0e ipatests: test ipa-client-samba after --uninstall
  • 551cd68d0959b1ee761ead6338dc06c544c0c5da ipa-client-samba: remove state on uninstall

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.8.1

master:

  • 074bf285f185d96d67cf9f410f1e8935078d15eb ipatests: allow to pass additional options for clients installation
  • 3fa7865ff8c48a35d0d120c74da76ea4076a6aa4 ipatests: add utility functions related to using and managing user accounts
  • 1fe69f352b28c7bbf218c9d3ece4b45eac6ddad6 ipatests: modify run_command to allow specify successful return codes
  • 1d033b040d8cc96d7c6dfa0786fc09505b3a9acf ipatests: refactor and extend tests for IPA-Samba integration

ipa-4-8:

  • c14aa5d48356a3bf84e5e5659caf963631179493 ipatests: allow to pass additional options for clients installation
  • 0b62616cd3eff70517710ff6bbea9612cf2924b5 ipatests: add utility functions related to using and managing user accounts
  • a45662ae359bf932aab3fa65dad39df38be4affd ipatests: modify run_command to allow specify successful return codes
  • a4839f679e1b8dcacd284543dfbbb7e1534ff897 ipatests: refactor and extend tests for IPA-Samba integration
Metadata