[SERVER-58785] Unable to create a new collection on a sharded cluster when using versioned API with strict=True Created: 22/Jul/21  Updated: 06/Dec/22  Resolved: 27/Jul/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Prashant Mital (Inactive) Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-58794 _configsvrCreateDatabase and _flushDa... Closed
Related
is related to SERVER-58794 _configsvrCreateDatabase and _flushDa... Closed
is related to SERVER-49858 Reconsider API parameters for config ... Closed
Assigned Teams:
Sharding EMEA
Operating System: ALL
Participants:

 Description   

The purpose of this template is to ensure that we have all of the necessary information about the issue in a consistent and clear form. Please fill out all the fields and replace the italicized text, as applicable.

Links

Link to Cluster

Link if Atlas or Cloud monitoring cluster

Links to FTDC & MongoDB logs

Links to other useful data (gdb, perf, messages log, etc.)

Status

MongoDB Version and Architecture

Issue Description

What is the user seeing?

Issuing the create command fails on MongoDB 5.0 with PyMongo 3.12:

client = MongoClient(uri, server_api=ServerApi("1", strict=True))
client.db.create_collection('new')
pymongo.errors.OperationFailure: Database db could not be created :: caused by :: Provided apiStrict:true, but the command _configsvrCreateDatabase is not in API Version 1. Information on supported commands and migrations in API Version 1 can be found at https://dochub.mongodb.org/core/manual-versioned-api, full error: {'ok': 0.0, 'errmsg': 'Database db could not be created :: caused by :: Provided apiStrict:true, but the command _configsvrCreateDatabase is not in API Version 1. Information on supported commands and migrations in API Version 1 can be found at https://dochub.mongodb.org/core/manual-versioned-api', 'code': 323, 'codeName': 'APIStrictError'

Where is it happening

PyMongo 3.12, MongoDB 5.0 (Topology - sharded)

db version v5.0.0
Build Info: {
    "version": "5.0.0",
    "gitVersion": "1184f004a99660de6f5e745573419bda8a28c0e9",
    "openSSLVersion": "OpenSSL 1.0.2k-fips  26 Jan 2017",
    "modules": [
        "enterprise"
    ],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "amzn64",
        "distarch": "x86_64",
        "target_arch": "x86_64"
    }
}

When is it happening (timeline of events)

For example: continuously? during certain time periods? at these particular points in time? what timestamps, specifically (including timezone)? Include all significant events in this timeline. Please use unambigous timestamps, including timezones. Example:
2021-01-01T00:00:00Z slow queries and high latency begin
2021-01-01T01:00:00Z failover from old primary node1 to new primary node2
2021-01-01T02:00:00Z crash due to OOM
2021-01-01T03:00:00Z upgrade to 4.4, cluster healthy again

How much/many/long

For example: how long are the slow queries? How low is the throughput? Single crash or repeated? How much lag?

Diagnostics and Hypotheses

Diagnostics

Show FTDC, logs, etc. that you have looked at

Hypotheses

Questions for the Server Team

  • Include high priority questions first, please indicate if any of your questions are time sensitive.

Generated at Thu Feb 08 05:45:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.