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

[WebUI] Replication tab crashes after enabling replication as a consumer

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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhel-10.2
    • rhel-10.1, rhel-9.7
    • 389-ds-base
    • None
    • None
    • Moderate
    • ZStream
    • rhel-idm-ds
    • 0
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Regression Exception
    • None
    • None
    • Known Issue
    • Hide
      .The Directory Server web console fails with an error when enabling replication on a consumer

      When enabling replication on a consumer, the web console fails with an error, and contents of the *Replication* tab do not load. The reason is that `dsconf` utility outputs warnings about changelog on consumers to `stdout` stream instead of `stderr`. As a result, the web console fails because it expects JSON output from `dsconf`.

      To work around this problem, edit the `/usr/lib/python3.12/site-packages/lib389/cli_conf/replication.py` file by replacing `log.info("Warning: Changelogs are not supported for consumer replicas. You may run into undefined behavior.")` with `log.error("Warning: Changelogs are not supported for consumer replicas. You may run into undefined behavior.")`.
      Show
      .The Directory Server web console fails with an error when enabling replication on a consumer When enabling replication on a consumer, the web console fails with an error, and contents of the *Replication* tab do not load. The reason is that `dsconf` utility outputs warnings about changelog on consumers to `stdout` stream instead of `stderr`. As a result, the web console fails because it expects JSON output from `dsconf`. To work around this problem, edit the `/usr/lib/python3.12/site-packages/lib389/cli_conf/replication.py` file by replacing `log.info("Warning: Changelogs are not supported for consumer replicas. You may run into undefined behavior.")` with `log.error("Warning: Changelogs are not supported for consumer replicas. You may run into undefined behavior.")`.
    • Done
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Description of a problem

      When enabling replication in a consumer role, the webUI crashes with Ooops! and contents of Replication tab do not load.

      Version-Release number of the selected component

      rpm -q 389-ds-base cockpit-389-ds

      389-ds-base-3.1.3-5.el10_1.x86_64
      cockpit-389-ds-3.1.3-3.el10dsrv.noarch
      

      Browser (if applicable)

      Firefox

      Steps to reproduce

      1. Create instance
      2. Go to Replication -> Enable replication
      3. Select role: Consumer
      4. Confirm replication

      Actual results

      First success message pops up, then Ooops! in the header and contents of the tab do not load.
      
      Console output:
      
      CMD: loadReplSuffix: Load the replication info ==> dsconf -j ldapi://%2fvar%2frun%2fslapd-localhost.socket replication get-changelog --suffix dc=example,dc=com index.js:15:804
      Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data    loadReplSuffix https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:242    vbe https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    _O https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    hbe https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    setTimeout handler*v2 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    _O https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    ZH https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    resolve https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    spawn https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:14    jw https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    value https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    m https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    h https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    aj https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    dispatch_data https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:11    <anonymous> https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:10    x2 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    x2 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    CO https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    tg https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    rj https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    channel https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:13    spawn https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:14    loadInstanceList https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:284    k9 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:6    H9 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    DH https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    Xve https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    abe https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    ev https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    U9 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    Ch https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:6    pv https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    cbe https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    h2 https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    render https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:8    <anonymous> https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:284    EventListener.handleEvent* https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:284    <anonymous> https://10.0.187.98:9090/cockpit/@localhost/389-console/index.js:284index.js:242:39907

      Expected results

      Should not Ooops, Replication tab should load.

      Additional information

      Also happens when changing a role from Supplier or Hub to Consumer. Does not happen when enabling replication for a Supplier or Hub role.

              idm-ds-dev-bugs IdM DS Dev
              lryznaro@redhat.com Lenka Doudova
              IdM DS Dev IdM DS Dev
              IdM DS QE IdM DS QE
              Evgenia Martyniuk Evgenia Martyniuk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: