Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2158691

Summary: NameError: name 'args_instance' is not defined in replica.py line 2708, in generate_report
Product: Red Hat Directory Server Reporter: Ding-Yi Chen <dchen>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: LDAP QA Team <idm-ds-qe-bugs>
Severity: high Docs Contact: Zuzana Zoubkova <zzoubkov>
Priority: high    
Version: 12.1CC: bsmejkal, emartyny, idm-ds-dev-bugs, mreynolds, pasik, rakkumar, tmihinto
Target Milestone: DS12.2Keywords: Triaged
Target Release: dirsrv-12.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: redhat-ds-12-9020020230124183402-1674d574 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-30 09:40:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ding-Yi Chen 2023-01-06 05:26:52 UTC
Description of problem:

dsconf -v -D 'cn=Directory Manager' ldap://host.example.com replication monitor 

Error message 

DEBUG: name 'args_instance' is not defined
Traceback (most recent call last):
  File "/sbin/dsconf", line 138, in <module>
    result = args.func(inst, None, log, args)
  File "/usr/lib/python3.9/site-packages/lib389/cli_conf/replication.py", line 422, in get_repl_monitor_info
    report_dict = repl_monitor.generate_report(get_credentials, args.json)
  File "/usr/lib/python3.9/site-packages/lib389/replica.py", line 2708, in generate_report
    args_instance[SER_HOST] = supplier_hostname
NameError: name 'args_instance' is not defined
ERROR: Error: name 'args_instance' is not defined




Version-Release number of selected component (if applicable):

 389-ds-base-2.1.5-4.module+el9dsrv+16995+8a75ed16.x86_64 


How reproducible:

 Always


Always

Steps to Reproduce:
1. dsconf -v -D 'cn=Directory Manager' ldap://host.example.com replication monitor 


Actual results:

  ERROR: Error: name 'args_instance' is not defined

Expected results:

  No above error


Additional info:

I suspect that the following line in replica.py is relevant:

~~~
from lib389._constants import CONSUMER_REPLICAID, REPLICA_RDWR_TYPE, REPLICA_FLAGS_WRITE, REPLICA_RDONLY_TYPE, \
                              REPLICA_FLAGS_RDONLY, REPLICA_ID, REPLICA_TYPE, REPLICA_SUFFIX, REPLICA_BINDDN, \
                              RDN_REPLICA, REPLICA_FLAGS, REPLICA_RUV_UUID, REPLICA_OC_TOMBSTONE, DN_MAPPING_TREE, \
                              DN_CONFIG, DN_PLUGIN, REPLICATION_BIND_DN, REPLICATION_BIND_PW, ReplicaRole, \
                              defaultProperties
~~~


While older version (which works) had:
~~~
from lib389._constants import *
~~~

Comment 1 mreynolds 2023-01-06 13:09:52 UTC
This was just fixed upstream yesterday:

https://github.com/389ds/389-ds-base/issues/5588

Comment 6 mreynolds 2023-02-16 15:48:21 UTC
Developer Verified:

tested:  389-ds-base-2.2.6-1.module+el9dsrv+17949+63c5b04e.x86_64

[root@kvm-02-guest21 ~]# dsconf localhost replication monitor 
Supplier: kvm-02-guest21.hv2.lab.eng.bos.redhat.com:389
-------------------------------------------------------
Replica Root: o=mark
Replica ID: 3
Replica Status: Online
Max CSN: 00000000000000000000

Comment 7 bsmejkal 2023-04-03 09:14:31 UTC
Per comment #c6 marking as VERIFIED.

Comment 9 errata-xmlrpc 2023-05-30 09:40:35 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 (redhat-ds:12 bug fix and enhancement update), 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-2023:3344