Closed blockchain-spark closed 1 year ago
I've list this role in the blacklist, I'd expect the script will ignore this role.
postgres:
blacklist:
- postgres
- xxxxx
The error on the console is:
Unhandled error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/ldap2pg/role.py", line 309, in resolve_membership
member = index_[member_name]
KeyError: 'xxxxx'
2023-08-24 01:09:53,571 ERROR: ldap2pg.script:
During handling of the above exception, another exception occurred:
2023-08-24 01:09:53,571 ERROR: ldap2pg.script:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/ldap2pg/script.py", line 37, in main
exit(synchronize(config))
File "/usr/local/lib/python3.6/site-packages/ldap2pg/script.py", line 133, in synchronize
count = manager.sync(syncmap=config['sync_map'])
File "/usr/local/lib/python3.6/site-packages/ldap2pg/manager.py", line 299, in sync
pgallroles.resolve_membership()
File "/usr/local/lib/python3.6/site-packages/ldap2pg/role.py", line 311, in resolve_membership
raise ValueError('Unknown member role %s' % member_name)
ValueError: Unknown member role xxxxx
The DDL for this role is:
CREATE ROLE xxxxx WITH
SUPERUSER
NOCREATEDB
NOCREATEROLE
INHERIT
LOGIN
NOREPLICATION
NOBYPASSRLS;
It runs ok now after I did "revoke oneRole from xxxxx;" Thanks all, I'll close it.
On a new database, I manually created a superuser xxxxx, the script fails when processing this role.
ldap2pg.yml
Verbose output