Skip to content

Role not in permitted superuser list #58

@Zenuncl

Description

@Zenuncl

Description of the issue

Trying to use this tool to migrate my existing Linode Postgresql to Aiven. Got following error

2024-11-26 13:06:54,825	PGMigrate	INFO	Creating role PGRole(rolname='lin_prm_user', rolsuper=True, rolinherit=True, rolcreaterole=False, rolcreatedb=False, rolcanlogin=True, rolreplication=False, rolconnlimit=-1, rolpassword='placeholder_talhjtfxmrxmcvrh', rolvaliduntil=None, rolbypassrls=False, rolconfig=[], safe_rolname='lin_prm_user') to target
Traceback (most recent call last):
  File "/virtualenv/aiven/bin/pg_migrate", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/virtualenv/aiven/lib/python3.11/site-packages/aiven_db_migrate/migrate/pgmigrate.py", line 1589, in main
    result: PGMigrateResult = pg_mig.migrate(force_method=method)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/virtualenv/aiven/lib/python3.11/site-packages/aiven_db_migrate/migrate/pgmigrate.py", line 1402, in migrate
    pg_roles: Dict[str, PGRoleTask] = self._migrate_roles()
                                      ^^^^^^^^^^^^^^^^^^^^^
  File "/virtualenv/aiven/lib/python3.11/site-packages/aiven_db_migrate/migrate/pgmigrate.py", line 1147, in _migrate_roles
    self.target.c(sql, args=params, return_rows=0)
  File "/virtualenv/aiven/lib/python3.11/site-packages/aiven_db_migrate/migrate/pgmigrate.py", line 184, in c
    wait_select(cur.connection)
  File "/virtualenv/aiven/lib/python3.11/site-packages/aiven_db_migrate/migrate/pgutils.py", line 148, in wait_select
    state = conn.poll()
            ^^^^^^^^^^^
psycopg2.errors.InternalError_: Role lin_prm_user not in permitted superuser list

Looks like issue when try to migrate some account / roles, but I didn't see anywhere to skip or ignore it.

Issue-Type (put a x sign in the square brackets)

  • bug report
  • feature request
  • Documentation improvement
  • Other

Checklist

  • Running latest version of code.
  • This issue has not been reported earlier.

Your environment

  • OS
  • Python Version
  • Release tag/commit of the code

Not related

Expected behaviour

What should happen?

Either should allow migration to skip some issue user and/or simply ignore it if possible.
Or the document should mention how to get around with it.

Actual behaviour

What is actually happening?

Migration crash.

Steps to reproduce

Any extra info ( for eg. code snippet to reproduce, logs, screenshots etc. )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions