Bug 2170557
| Summary: | dsctl ldifgen error: DirSrv has no attribute 'userid' | ||
|---|---|---|---|
| Product: | Red Hat Directory Server | Reporter: | Viktor Ashirov <vashirov> |
| Component: | 389-ds-base | Assignee: | mreynolds |
| Status: | CLOSED ERRATA | QA Contact: | LDAP QA Team <idm-ds-qe-bugs> |
| Severity: | high | Docs Contact: | Evgenia Martynyuk <emartyny> |
| Priority: | high | ||
| Version: | 11.7 | CC: | bsmejkal, emartyny, gkimetto, idm-ds-dev-bugs, mreynolds, pasik, tbordaz |
| Target Milestone: | DS11.8 | Keywords: | Triaged |
| Target Release: | dirsrv-11.8 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | redhat-ds-11-8090020230901161717.4a0d6ab8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-28 10:09:21 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: | |||
Build tested:
389-ds-base-1.4.3.37-1.module+el8dsrv+19621+efe8bde6.x86_64
# dsctl -v localhost ldifgen users
DEBUG: The 389 Directory Server Administration Tool
DEBUG: Inspired by works of: ITS, The University of Adelaide
DEBUG: Called with: Namespace(func=<function dbgen_create_users at 0x7fcb9ac69f28>, generic=False, instance='localhost', json=False, ldif_file='ldifgen.ldif', list=False, localize=False, number=None, parent=None, rdn_cn=False, remove_all=False, start_idx=0, suffix=None, verbose=True)
DEBUG: Allocate local instance <class 'lib389.DirSrv'> with None
DEBUG: Instance allocated
INFO: Missing required parameters, switching to Interactive mode ...
Enter the suffix [dc=example,dc=com]:
Enter the parent entry for the users [ou=people,dc=example,dc=com]:
Enter the number of users to create [100000]:
Do you want to use "cn" instead of "uid" for the entry RDN attribute (yes/no) [no]:
Create generic entries that can be used with "ldclt" (yes/no) [no]:
Do you want to localize the LDIF data (yes/no) [no]:
Enter the new LDIF file name [/var/lib/dirsrv/slapd-localhost/ldif/ldifgen.ldif]:
INFO:
Generating LDIF with the following options:
INFO: - number=100000
INFO: - suffix=dc=example,dc=com
INFO: - parent=ou=people,dc=example,dc=com
INFO: - generic=False
INFO: - start-idx=0
INFO: - rdn-cn=False
INFO: - localize=False
INFO: - ldif-file=/var/lib/dirsrv/slapd-localhost/ldif/ldifgen.ldif
INFO:
Writing LDIF ...
DEBUG: DirSrv has no attribute 'userid'
Traceback (most recent call last):
File "/usr/sbin/dsctl", line 160, in <module>
result = args.func(inst, log, args)
File "/usr/lib/python3.6/site-packages/lib389/cli_ctl/dbgen.py", line 193, in dbgen_create_users
dbgen_users(inst, args.number, args.ldif_file, args.suffix, generic=args.generic, parent=args.parent, startIdx=args.start_idx, rdnCN=False, pseudol10n=args.localize)
File "/usr/lib/python3.6/site-packages/lib389/dbgen.py", line 300, in dbgen_users
finalize_ldif_file(instance, ldif_file)
File "/usr/lib/python3.6/site-packages/lib389/dbgen.py", line 139, in finalize_ldif_file
userid = ensure_str(instance.userid)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 363, in __getattr__
self.__class__.__name__,repr(name)
AttributeError: DirSrv has no attribute 'userid'
ERROR: Error: DirSrv has no attribute 'userid'
Moving to ASSIGNED.
Build tested: 389-ds-base-1.4.3.37-2.module+el8dsrv+19833+d41da347.x86_64 # dsctl localhost ldifgen users Missing required parameters, switching to Interactive mode ... Enter the suffix [dc=example,dc=com]: Enter the parent entry for the users [ou=people,dc=example,dc=com]: Enter the number of users to create [100000]: Do you want to use "cn" instead of "uid" for the entry RDN attribute (yes/no) [no]: Create generic entries that can be used with "ldclt" (yes/no) [no]: Do you want to localize the LDIF data (yes/no) [no]: Enter the new LDIF file name [/var/lib/dirsrv/slapd-localhost/ldif/ldifgen.ldif]: Generating LDIF with the following options: - number=100000 - suffix=dc=example,dc=com - parent=ou=people,dc=example,dc=com - generic=False - start-idx=0 - rdn-cn=False - localize=False - ldif-file=/var/lib/dirsrv/slapd-localhost/ldif/ldifgen.ldif Writing LDIF ... Successfully created LDIF file: /var/lib/dirsrv/slapd-localhost/ldif/ldifgen.ldif Marking as VERIFIED. 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:11 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:7519 |
Description of problem: I get an error while running dsctl -v standalone1 ldifgen users ... DEBUG: DirSrv has no attribute 'userid' Traceback (most recent call last): File "/usr/sbin/dsctl", line 160, in <module> result = args.func(inst, log, args) File "/usr/lib/python3.6/site-packages/lib389/cli_ctl/dbgen.py", line 195, in dbgen_create_users dbgen_users(inst, args.number, args.ldif_file, args.suffix, generic=args.generic, parent=args.parent, startIdx=args.start_idx, rdnCN=False, pseudol10n=args.localize) File "/usr/lib/python3.6/site-packages/lib389/dbgen.py", line 296, in dbgen_users finalize_ldif_file(instance, ldif_file) File "/usr/lib/python3.6/site-packages/lib389/dbgen.py", line 135, in finalize_ldif_file userid = ensure_str(instance.userid) File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 363, in __getattr__ self.__class__.__name__,repr(name) AttributeError: DirSrv has no attribute 'userid' ERROR: Error: DirSrv has no attribute 'userid' Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. dsctl -v standalone1 ldifgen users Actual results: dsctl exits with traceback Expected results: dsctl should generate an ldif with users. Additional info: https://github.com/389ds/389-ds-base/issues/5142