Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-123275

The new ipahealthcheck test ipahealthcheck.ds.backends.BackendsCheck raises CRITICAL issue

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.2
    • None
    • 389-ds-base
    • None
    • None
    • Moderate
    • ZStream
    • rhel-idm-ds
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Ticket created from upstream issue: https://github.com/389ds/389-ds-base/issues/7032


      *Issue Description*
      With the commit https://github.com/389ds/389-ds-base/commit/8b6b3a9f9a5ab2cd087e96be1a972c0ba20a2264#diff-0b5030c27013744647254b2b3e798b5cac7135438425a4e39509e85e02109a44 the check for indexes now raises a CRITICAL issue in IdM deployments.

      *Package Version and Platform:*

      • Platform: Fedora 42
      • Package and version: 389-ds-base-3.1.3.202510031754git13d8cc356-1.fc42.x86_64
        (installed from the copr repo @389ds/389-ds-base-nightly)

      *Steps to Reproduce*
      Steps to reproduce the behavior:
      1. install ipa server and ipa-healthcheck packages
      2. configure the server with `ipa-server-install --domain ipa.test --realm IPA.TEST --setup-dns --forwarder 10.11.5.160 -a Secret123 -p Secret123 -U`
      3. run healthcheck: `/usr/bin/ipa-healthcheck --source ipahealthcheck.ds.backends --check BackendsCheck`

      ```

      1. python3 /usr/bin/ipa-healthcheck --source ipahealthcheck.ds.backends --check BackendsCheck
        [
        Unknown macro: { "source"}

        ,

        Unknown macro: { "source"}

        ,

        Unknown macro: { "source"}

        ]
        ```

      *Expected results*
      No error should be reported on new installation

      The error seems to happen because of a missing key:
      https://github.com/389ds/389-ds-base/blob/8b6b3a9f9a5ab2cd087e96be1a972c0ba20a2264/src/lib389/lib389/backend.py#L706

      pdb shows that we get a KeyError:
      ```
      (Pdb) index
      <class 'lib389.index.Index'>(instance_name="IPA-TEST", dn="entryrdn")
      (Pdb) n
      > /usr/lib/python3.13/site-packages/lib389/backend.py(706)_lint_system_indexes()
      -> expected_scanlimit = expected_config['scanlimit']
      (Pdb) n
      KeyError: 'scanlimit'
      > /usr/lib/python3.13/site-packages/lib389/backend.py(706)_lint_system_indexes()
      -> expected_scanlimit = expected_config['scanlimit']
      (Pdb) expected_config

      {'types': ['subtree'], 'matching_rule': None}

      (Pdb) w
      ```

      The code could use `expected_scanlimit = expected_config.get('scanlimit')` instead as the call returns None if there is no value with this key in the dictionary.

              idm-ds-dev-bugs IdM DS Dev
              tbordaz@redhat.com Thierry Bordaz
              IdM DS Dev IdM DS Dev
              IdM DS QE IdM DS QE
              Evgenia Martyniuk Evgenia Martyniuk
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: