Bug 2158691 - NameError: name 'args_instance' is not defined in replica.py line 2708, in generate_report
Summary: NameError: name 'args_instance' is not defined in replica.py line 2708, in ge...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: 389-ds-base
Version: 12.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: DS12.2
: dirsrv-12.2
Assignee: mreynolds
QA Contact: LDAP QA Team
Zuzana Zoubkova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-06 05:26 UTC by Ding-Yi Chen
Modified: 2024-08-07 08:53 UTC (History)
7 users (show)

Fixed In Version: redhat-ds-12-9020020230124183402-1674d574
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-30 09:40:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-2741 0 None None None 2023-01-24 19:49:05 UTC
Red Hat Issue Tracker IDMDS-2781 0 None None None 2023-02-09 11:32:01 UTC
Red Hat Product Errata RHBA-2023:3344 0 None None None 2023-05-30 09:41:09 UTC

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


Note You need to log in before you can comment on or make changes to this bug.