Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379223 )
Change subject: Cassandra: Allow extra hosts to access the cluster via CQL ...................................................................... Cassandra: Allow extra hosts to access the cluster via CQL RESTBase is transitioning from Cassandra 2 to Cassandra 3 with a new storage model, so we now have two clusters that accessed by RESTBase. This patch (aka hack) allows the RESTBase nodes to access the CQL interface of Cassandra 3 hosts. Bug: T169940 Change-Id: Ieb32fd261783cffc37f90e033682b5d4238c4c08 --- M hieradata/role/common/restbase/production_ng.yaml M modules/profile/manifests/cassandra.pp 2 files changed, 37 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/379223/1 diff --git a/hieradata/role/common/restbase/production_ng.yaml b/hieradata/role/common/restbase/production_ng.yaml index 7c8c7e2..def9c38 100644 --- a/hieradata/role/common/restbase/production_ng.yaml +++ b/hieradata/role/common/restbase/production_ng.yaml @@ -5,6 +5,25 @@ # graphite_host: 'graphite1003.eqiad.wmnet' profile::cassandra::allow_analytics: false +profile::cassandra::extra_cql_hosts: + - restbase1007.eqiad.wmnet + - restbase1011.eqiad.wmnet + - restbase1012.eqiad.wmnet + - restbase1013.eqiad.wmnet + - restbase1014.eqiad.wmnet + - restbase1015.eqiad.wmnet + - restbase1016.eqiad.wmnet + - restbase1017.eqiad.wmnet + - restbase1018.eqiad.wmnet + - restbase2002.eqiad.wmnet + - restbase2004.eqiad.wmnet + - restbase2006.eqiad.wmnet + - restbase2007.eqiad.wmnet + - restbase2008.eqiad.wmnet + - restbase2009.eqiad.wmnet + - restbase2010.eqiad.wmnet + - restbase2011.eqiad.wmnet + - restbase2012.eqiad.wmnet profile::cassandra::metrics_whitelist: - .*\.metrics\.ColumnFamily\.local_group_.*\.meta\.CoordinatorReadLatency\..*$ diff --git a/modules/profile/manifests/cassandra.pp b/modules/profile/manifests/cassandra.pp index 217724d..ed7ebab 100644 --- a/modules/profile/manifests/cassandra.pp +++ b/modules/profile/manifests/cassandra.pp @@ -98,11 +98,27 @@ port => '7199:7202', srange => "@resolve((${cassandra_hosts_ferm}))", } + # XXX TEMP XXX + # RESTBase is currently migrating from Cass 2 to Cass 3 by gradually + # switching use-cases from one to the other, which means that there + # are currently two Cassandra clusters being used by RESTBase. However, + # we are running RESTBase only on nodes with Cassandra 2. In this hack + # we are allowing the RESTBase hosts to talk to Cassandra 3.x nodes. + $extra_cql_hosts = hiera('profile::cassandra::extra_cql_hosts', []) + unless empty($extra_cql_hosts) { + $extra_cql_ferm = join($extra_cql_hosts, ' ') + $srange_cql = "${cassandra_hosts_ferm} ${extra_cql_ferm}" + } else { + $srange_cql = $cassandra_hosts_ferm + } + # Note: all of the $srange_cql instances below need to be replaced back to + # $cassandra_hosts_ferm once this hack is no longer needed + # XXX END TEMP XXX # Cassandra CQL query interface ferm::service { 'cassandra-cql': proto => 'tcp', port => '9042', - srange => "@resolve((${cassandra_hosts_ferm}))", + srange => "@resolve((${srange_cql}))", } # Prometheus jmx_exporter for Cassandra ferm::service { 'cassandra-jmx_exporter': @@ -116,7 +132,7 @@ ferm::service { 'cassandra-analytics-cql': proto => 'tcp', port => '9042', - srange => "(@resolve((${cassandra_hosts_ferm})) ${analytics_networks})", + srange => "(@resolve((${srange_cql})) ${analytics_networks})", } } -- To view, visit https://gerrit.wikimedia.org/r/379223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb32fd261783cffc37f90e033682b5d4238c4c08 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mobrovac <mobro...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits