diff options
Diffstat (limited to 'provider_base/services')
-rw-r--r-- | provider_base/services/_couchdb_multimaster.json | 2 | ||||
-rw-r--r-- | provider_base/services/_couchdb_plain.json | 8 | ||||
-rw-r--r-- | provider_base/services/couchdb.json | 2 | ||||
-rw-r--r-- | provider_base/services/couchdb.rb | 32 |
4 files changed, 9 insertions, 35 deletions
diff --git a/provider_base/services/_couchdb_multimaster.json b/provider_base/services/_couchdb_multimaster.json index 0f340e00..803a9416 100644 --- a/provider_base/services/_couchdb_multimaster.json +++ b/provider_base/services/_couchdb_multimaster.json @@ -1,6 +1,6 @@ // // Only applied to master couchdb nodes when there are multiple masters -// +// NOT CURRENTLY USED. { "stunnel": { "servers": { diff --git a/provider_base/services/_couchdb_plain.json b/provider_base/services/_couchdb_plain.json deleted file mode 100644 index 04380042..00000000 --- a/provider_base/services/_couchdb_plain.json +++ /dev/null @@ -1,8 +0,0 @@ -// -// Applied to couchdb node when there is a single plain couchdb -// -{ - "couch": { - "mode": "plain" - } -}
\ No newline at end of file diff --git a/provider_base/services/couchdb.json b/provider_base/services/couchdb.json index 167bbf7d..30cb53d1 100644 --- a/provider_base/services/couchdb.json +++ b/provider_base/services/couchdb.json @@ -9,7 +9,7 @@ }, "couch": { "port": 5984, - "mode": "multimaster", + "mode": "plain", "users": { "admin": { "username": "admin", diff --git a/provider_base/services/couchdb.rb b/provider_base/services/couchdb.rb index 8271b9c5..dcf7df59 100644 --- a/provider_base/services/couchdb.rb +++ b/provider_base/services/couchdb.rb @@ -2,37 +2,19 @@ # custom logic for couchdb json resolution # ============================================ # -# bigcouch is no longer maintained, so now the default behavior is -# to always use plain couchdb, unless there are more than one couchdb -# node or if "couch.mode" property is set to "multimaster". -# -# in the past, it used to work like this: -# -# * if couch.master was set to true on one node, then do plain couchdb. -# * if couch.master was not set anywhere, then do bigcouch. -# * if couch.master was set on more than one node, then do bigcouch. -# -# Some of this legacy logic is still supported so that upgrading does -# not unexpectedly turn bigcouch nodes into plain couchdb nodes. +# bigcouch is no longer maintained, so now couchdb is required... +# no matter what! # if self.couch['master'] - LeapCli::log :warning, "The node property 'couch.master' is deprecated.\n" + - " In the future, you must set 'couch.mode' to either 'plain' or 'multimaster'.\n" + - " (node '#{self.name}')" + LeapCli::log :warning, %("The node property {couch.master:true} is deprecated.\n) + + %( Only {couch.mode:plain} is supported. (node #{self.name})) end couchdb_nodes = nodes_like_me['services' => 'couchdb'] if couchdb_nodes.size > 1 - apply_partial 'services/_couchdb_multimaster.json' + LeapCli::log :error, "Having multiple nodes with {services:couchdb} is no longer supported (nodes #{couchdb_nodes.keys.join(', ')})." elsif self.couch.mode == "multimaster" - if self.couch['master'] - # The old deprecated way of specifying plain couch is still being used - apply_partial 'services/_couchdb_plain.json' - else - apply_partial 'services/_couchdb_multimaster.json' - end -else - apply_partial 'services/_couchdb_plain.json' -end + LeapCli::log :error, "Nodes with {couch.mode:multimaster} are no longer supported (node #{self.name})." +end
\ No newline at end of file |