Bug 2224930
| Summary: | "Error: name 'args_instance' is not defined" when dsconf <instance> replication monitor | ||
|---|---|---|---|
| Product: | Red Hat Directory Server | Reporter: | Ding-Yi Chen <dchen> |
| Component: | 389-ds-base | Assignee: | LDAP Maintainers <idm-ds-dev-bugs> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | LDAP QA Team <idm-ds-qe-bugs> |
| Severity: | high | Docs Contact: | Evgenia Martynyuk <emartyny> |
| Priority: | high | ||
| Version: | 12.3 | CC: | idm-ds-dev-bugs, mreynolds, musoni, vashirov |
| Target Milestone: | DS12.3 | Keywords: | Triaged |
| Target Release: | dirsrv-12.3 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-07-24 14:16:29 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: | |||
This was previously fixed in upstream ticket: https://github.com/389ds/389-ds-base/issues/5588 Already fixed in current version (RHDS 12.2 on RHEL 9.2): 2.2.7-3 |
Description of problem: I ran: dsconf -v -D 'cn=directory manager' ldap://localhost replication monitor And input credentials like the following: Enter password for cn=Directory Manager on ldap://localhost Enter a bind DN for replica.example.com:389: cn=directory manager Enter a password for cn=directory manager on replica.example.com:389: Then Traceback (most recent call last): File "/usr/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.2.4-3.el9.x86_64 Upstream also seems to have this How reproducible: Always Steps to Reproduce: 0. Setup environment with 389-ds replicas 1. dsconf -v -D 'cn=directory manager' ldap://localhost replication monitor 2. Input credentials Actual results: Traceback (most recent call last): File "/usr/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 Expected results: No error Additional info: Workaround: edit replica.py, and add args_instance to lib389._constants import like: 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, \ args_instance, defaultProperties