A customer has tried to add a mongod with encryption disabled to a replica set in which the other members have encryption enabled. When running getCollectionInfos() on the members of the replica set, some of the collections have the options.storageEngine.wiredTiger.configString option set. This string has "encryption=(keyid=\"admin\",name=AES256-CBC)" set as part of the complete option set. When new member initiates initial sync, it attempts to replicate the collection in its entirety, including the configString. WiredTiger then realizes the conflict between the collection and the mongod config settings and throws BadValue: 22: Invalid argument.
This behavior can be replicated by manually setting the configString for a collection like this -
db.createCollection( "users", { storageEngine: { wiredTiger: { configString: "access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=1),assert=(commit_timestamp=none,read_timestamp=none),block_allocation=best,block_compressor=snappy,cache_resident=false,checksum=on,colgroups=,collator=,columns=,dictionary=0,encryption=(keyid=\"admin\",name=AES256-CBC),exclusive=false,extractor=,format=btree,huffman_key=,huffman_value=,ignore_in_memory_cache_size=false,immutable=false,internal_item_max=0,internal_key_max=0,internal_key_truncate=true,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=64MB,log=(enabled=false),lsm=(auto_throttle=true,bloom=true,bloom_bit_count=16,bloom_config=,bloom_hash_count=8,bloom_oldest=false,chunk_count_limit=0,chunk_max=5GB,chunk_size=10MB,merge_custom(prefix=,start_generation=0,suffix=),merge_max=15,merge_min=0),memory_page_image_max=0,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=false,prefix_compression_min=4,source=,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,type=file,value_format=u,type=file" }} })
Initially investigated on a 4.4 mongod, have not verified whether this behavior has been fixed in a 5.0+ mongod.
These strings have been seen set on system collections, which we do not believe were manually created using create.
Because ESE is intended to be configured on a per-node basis, for upgrade/downgrade reasons, we do not expect these options to be replicated in the catalog. Nodes processing collections with these properties set should ignore the durable options and only respect the options defined in their configuration files.
- is depended on by
-
SERVER-72229 Implement FCV upgrade step to remove ephemeral ESE WiredTiger config string attributes from catalog
- Closed
-
TOOLS-3233 Investigate changes in SERVER-68122: Investigate replicating the collection WiredTiger config string during initial sync
- Closed
- is related to
-
SERVER-82205 Make shell dbHash comparison to exclude encryption options
- Closed
-
SERVER-79496 Ban encryption options being provided in createCollection
- Closed
- related to
-
SERVER-83830 On Enterprise build creating a collection in a replica set with the storageEngine.inMemory option breaks secondaries
- Closed
-
SERVER-73183 WiredTigerKVEngine::getSanitizedStorageOptionsForSecondaryReplication should skip inMemory
- Closed
-
SERVER-81069 Cleanup mitigations for replicated encryption options on secondaries
- Backlog
-
SERVER-72227 Investigate how ESE WiredTiger configuration string arguments may appear in replicated catalog data
- Closed