#8605 backtrace using ipa-replica-manage
Closed: fixed by frenaud. Opened by fcami.

Ticket was cloned from Red Hat Bugzilla: Bug 1903250

Please note that this Bug is private and may not be accessible as it contains confidential Red Hat customer information.

[DESCRIPTION OF PROBLEM]
We are facing old "ghost" or "traces" on Master (IPA02) even after uninstall
and remove replicas (ipa03 and ipa04) present in the cluster.
===============================================================
Version-Release number of selected component (if applicable):
   Hostname  : ipa02.example.com
   OS Version: Server 7.8 (Maipo)  <<--Replica
    Hostname  : ipa04.example.com
    OS Version: Server 7.9 (Maipo) <<--Master
===============================================================
[HOW REPRODUCIBLE]
We have removed ipa03 and ipa04 from IPA02 (master) using:
Remove the old replicas from IPA02:
  A- REMOVE THE IPA04
        # ipa-replica-manage del ipa04.example.com --force --cleanup
        # ipa host-del ipa04.example.com
        # ipa server-del ipa04.example.com
  B- REMOVE THE IPA03
       # ipa-replica-manage del ipa03.example.com --force --cleanup
       # ipa host-del ipa03.example.com
       # ipa server-del ipa03.example.com
===============================================================
[STEPS TO REPRODUCE]
   1. Remove hosts from IPA cluster
   2. List replicas using [root@ipa02 ~]# ipa-replica-manage list -v
'ipa02.example.com'
   3. Check the result
===============================================================
[ACTUAL RESULTS]
[root@ipa02 ~]# ipa-replica-manage list -v 'ipa02.example.com'
    ipa03.example.com: replica
      last update status: Error (-1) Problem connecting to replica - LDAP
error: Can't contact LDAP server (connection error)
      last update ended: 1970-01-01 00:00:00+00:00
    ipa04.example.com: replica
      last update status: None
    Traceback (most recent call last):
      File "/usr/sbin/ipa-replica-manage", line 1624, in <module>
        main(options, args)
      File "/usr/sbin/ipa-replica-manage", line 1557, in main
        options.nolookup)
      File "/usr/sbin/ipa-replica-manage", line 252, in list_replicas
        entry.single_value['nsds5replicalastupdateend'])))
      File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 616,
in __getitem__
        value = self._entry[name]
      File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 491,
in __getitem__
        return self._get_nice(name)
      File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 458,
in _get_nice
        name = self._get_attr_name(name)
      File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 454,
in _get_attr_name
        name = self._names[name]
      File "/usr/lib/python2.7/site-packages/ipapython/ipautil.py", line 619,
in __getitem__
        return super(CIDict, self).__getitem__(key.lower())
    KeyError: u'nsds5replicalastupdateend'
    Unexpected error: u'nsds5replicalastupdateend'
==================================================================
[EXPECTED RESULT]
[root@ipa02 ~]# ipa-replica-manage list -v 'ipa02.example.com'
 <Don't should be listed ipa03 and ipa04>
===================================================================

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

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

Metadata Update from @fcami:
- Issue assigned to fcami

master:

  • 4b2c50ae62996c8399b2f90230c6ebcde2828a2e ipa-replica-manage: always display nsds5replicalastinitstatus
  • bc3906f9aacb5081d0e50365eb64f3848ef490d4 ipa-replica-manage: handle missing attributes
  • 82e32433ed5a3938a401cc7eb6a4c670325eb37a ipalib/util.py: add print_replication_status
  • 216720af83a5c61f8da26851a63d1f2f555e754c ipa-csreplica-manage, ipa-replica-manage: refactor

ipa-4-9:

  • f6204b0d5e6f82827249e09ff2e4598ea4e7f69e ipa-replica-manage: always display nsds5replicalastinitstatus
  • 85484d312cf0e9da563ea97166ea24dfd6833702 ipa-replica-manage: handle missing attributes
  • 5f2f97a698fc8278b3bc908e9bfc0d452575afa5 ipalib/util.py: add print_replication_status
  • 25cbae4d0248fd289fb9cc6dbe55ca8fd88b5513 ipa-csreplica-manage, ipa-replica-manage: refactor

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

master:

  • f1a441858ade6bc23e8bb89d2537860bb3ea8bd7 Extend test to see if replica is not shown when running ipa-replica-manage list -v <FQDN>

ipa-4-9:

  • 8b22ee018c3bb7f58a1b6694a7fd611688f8e74f Extend test to see if replica is not shown when running ipa-replica-manage list -v <FQDN>
Metadata