-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
Reporting just in case.
Now any "encryption=" parameters in
{storageEngine: wiredTiger: configString: "..."}options replicated from the primary, for collections and indexes, are ignored (removed from the string) during steady state replication and logical initial sync. This avoids node crashes in instances where encryption configuration somehow ended up being replicated.
As before, the per node encryption options are still appended by the enterprise module.
Description of Linked Ticket
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.
- depends on
-
SERVER-68122 Investigate replicating the collection WiredTiger config string during initial sync
- Closed