RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1843517 - Using ldifgen with --start-idx option fails with unsupported operand
Summary: Using ldifgen with --start-idx option fails with unsupported operand
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-03 13:12 UTC by bsmejkal
Modified: 2021-05-18 15:45 UTC (History)
5 users (show)

Fixed In Version: 389-ds-1.4-8040020201203171211-866effaa
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:45:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description bsmejkal 2020-06-03 13:12:16 UTC
Description of problem:
Using ldifgen with --start-idx option fails with ERROR: Error: unsupported operand type(s) for +=: 'int' and 'str'

Version-Release number of selected component (if applicable):
389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create DS instance
2. 
# dsctl -v slapd-localhost ldifgen users --suffix dc=example,dc=com --parent ou=people,dc=example,dc=com --number 100000 --generic --start-idx=50

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 0x7feec90632f0>, generic=True, instance='slapd-localhost', json=False, ldif_file='users.ldif', list=False, localize=False, number='100000', parent='ou=people,dc=example,dc=com', rdn_cn=False, remove_all=False, start_idx='50', suffix='dc=example,dc=com', verbose=True)
DEBUG: Allocate <class 'lib389.DirSrv'> with None
DEBUG: Allocate <class 'lib389.DirSrv'> with b'localhost.localdomain':636
DEBUG: Allocate <class 'lib389.DirSrv'> with b'localhost.localdomain':636
DEBUG: Instance allocated
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=True
INFO:  - start-idx=50
INFO:  - rdn-cn=False
INFO:  - localize=False
INFO:  - ldif-file=/var/lib/dirsrv/slapd-localhost/ldif/users.ldif
INFO: 
Writing LDIF ...
DEBUG: unsupported operand type(s) for +=: 'int' and 'str'
Traceback (most recent call last):
  File "/usr/sbin/dsctl", line 138, 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 249, in dbgen_users
    i += startIdx
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
ERROR: Error: unsupported operand type(s) for +=: 'int' and 'str'


Actual results:


Expected results:


Additional info:

Comment 3 bsmejkal 2020-12-02 15:25:46 UTC
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.6.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-255.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.1.2', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '3.0.0', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-3.module+el8.4.0+8869+55706461
nss: 3.53.1-11.el8_2
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.11.0, html-3.0.0, libfaketime-0.1.2
collected 11 items                                                                                                                                                                           

dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_users PASSED                                                                                                    [  9%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_groups PASSED                                                                                                   [ 18%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_cos_classic PASSED                                                                                              [ 27%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_cos_pointer PASSED                                                                                              [ 36%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_cos_indirect PASSED                                                                                             [ 45%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_cos_template PASSED                                                                                             [ 54%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_managed_role PASSED                                                                                             [ 63%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_filtered_role PASSED                                                                                            [ 72%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_nested_role PASSED                                                                                              [ 81%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_mod_ldif_mixed PASSED                                                                                           [ 90%]
dirsrvtests/tests/suites/clu/dbgen_test_usan.py::test_usandsconf_dbgen_nested_ldif PASSED                                                                                              [100%]

================================================================================== 11 passed in 146.06s (0:02:26) ===========================================================================

Marking as Verified:Tested.

Comment 8 sgouvern 2020-12-08 08:57:33 UTC
verified:tested as per comment 3
-> marking VERIFIED

Comment 10 errata-xmlrpc 2021-05-18 15:45:16 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 (389-ds:1.4 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-2021:1835


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