Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FabianElsmer opened this issue Jun 5, 2019 · 1 comment

Comments

@FabianElsmer
Copy link
Contributor

  • 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)

@FabianElsmer
Copy link
Contributor Author

For our use cases we can ignore the admin and config database, but should dockerdb generally provide a way to handle tests on these databases or should dropping them simply be ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant