From 6bad38034f4cefa205316c5f2a7171f3967f4a85 Mon Sep 17 00:00:00 2001 From: Erick Franco Date: Wed, 1 Feb 2017 12:01:47 -0800 Subject: [PATCH] Added support for 3.4 version --- recipes/mongos.rb | 6 ++++++ recipes/package_repo.rb | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/mongos.rb b/recipes/mongos.rb index 175595e..2ee145d 100644 --- a/recipes/mongos.rb +++ b/recipes/mongos.rb @@ -35,6 +35,12 @@ action :create end +# Depricated variables +if node['mongodb3']['version'].to_f >= 3.4 + node.rm('mongodb3','config','mongos','sharding','autoSplit') + node.rm('mongodb3','config','mongos','sharding','chunkSize') +end + # Create the Mongos config file template node['mongodb3']['mongos']['config_file'] do source 'mongodb.conf.erb' diff --git a/recipes/package_repo.rb b/recipes/package_repo.rb index 6d774e0..1e59e81 100644 --- a/recipes/package_repo.rb +++ b/recipes/package_repo.rb @@ -72,7 +72,9 @@ end if node['mongodb3']['package']['repo']['apt']['key'].nil? - if pkg_major_version >= 3.2 + if pkg_major_version >= 3.4 + node.set['mongodb3']['package']['repo']['apt']['key'] = '0C49F3730359A14518585931BC711F9BA15703C6' + elsif pkg_major_version >= 3.2 node.set['mongodb3']['package']['repo']['apt']['key'] = 'EA312927' else node.set['mongodb3']['package']['repo']['apt']['key'] = '7F0CEB10'