Skip to content

Exception when trying to drop admin and config database on mongo 3.6 #6

Description

@FabianElsmer
  • docker mongodb version: 3.6.8
  • dockerdb version: 0.2.0
  • Python version: 3.6.8
  • Operating System: Fedora 29

Description

Using newer versions of mongodb (like 3.6.8) there are 2 exceptions while trying to factory_reset the databases, specifically while trying to drop the 'admin' database and the 'config' database.

When dropping 'admin':
pymongo.errors.OperationFailure: Dropping the 'admin' database is prohibited.

When dropping 'config':
pymongo.errors.OperationFailure: Direct writes against config.transactions cannot be performed using a transaction or on a session.

Traceback:
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/dockerdb/pytest.py:30: in get_service
service.factory_reset()
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/dockerdb/init.py:140: in factory_reset
client.drop_database(db)
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/pymongo/mongo_client.py:1541: in drop_database
session=session)
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/pymongo/database.py:439: in _command
client=self.__client)
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/pymongo/pool.py:496: in command
collation=collation)
../../lnva2-ira6Ubzw/lib/python3.6/site-packages/pymongo/network.py:125: in command
parse_write_concern_error=parse_write_concern_error)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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