Page MenuHomePhabricator

cloudservices: unify puppet roles/profiles
Closed, ResolvedPublic

Description

When dealing with T221769: Upgrade cloudservices1003/1004 to stretch/mitaka, we noticed there is a divergence in the roles/profiles for cloudservices nodes between eqiad1 and codfw1dev.

In eqiad1:

role::wmcs::openstack::eqiad1::services_primary
role::wmcs::openstack::eqiad1::services_secondary

in codfw1dev:

role::wmcs::openstack::codfw1dev::services

According to @Andrew:

18:47 <arturo> could you briefly describe what is the diff between services_primary and secondary andrewbogott ?
18:48 <andrewbogott> at this point there should be very little difference in the server config — most services are active/active
18:48 <andrewbogott> of course the primary is ns-0/recursor-0 and the secondary is ns1-/recursor-1
18:48 <andrewbogott> And nothing is pointing at the rest API on the secondary currently
18:48 <andrewbogott> but all designate services and pdns services should be the same in both places.
18:49 <arturo> in codfw1dev there is no diff between them (they use some simplified ::services role)
18:49 <andrewbogott> Each server has its own mysq database, which is used as a local cache for pdns
18:49 <arturo> should we use the chance to do the same in eqiad1?
18:49 <andrewbogott> sure.  I'd want to make really sure to not accidentally swap their IPs

We should probably simplify this code and unify the eqiad1 one into a single role.

Event Timeline

• aborrero moved this task from Inbox to Soon! on the cloud-services-team (Kanban) board.

Change 513971 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/puppet@production] prometheus: pdns_exporter: use hiera keys to define prometheus nodes

https://gerrit.wikimedia.org/r/513971

Change 513971 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] prometheus: pdns_exporter: use hiera keys to define prometheus nodes

https://gerrit.wikimedia.org/r/513971

Change 513973 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/puppet@production] hieradata: cloudservices: reallocate prometheus_nodes definition

https://gerrit.wikimedia.org/r/513973

Change 513973 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] hieradata: cloudservices: reallocate prometheus_nodes definition

https://gerrit.wikimedia.org/r/513973

Change 513979 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/puppet@production] cloudservices: use unified prometheus_pdns_rec_exporter

https://gerrit.wikimedia.org/r/513979

Change 513979 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] cloudservices: use unified prometheus_pdns_rec_exporter

https://gerrit.wikimedia.org/r/513979

Change 513980 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/puppet@production] cloudservices: use prometheus pdns exporters in all roles

https://gerrit.wikimedia.org/r/513980

Change 513980 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] cloudservices: use prometheus pdns exporters in all roles

https://gerrit.wikimedia.org/r/513980

Apparently, the last missing bit to be able to merge both roles is:

diff modules/profile/manifests/openstack/eqiad1/pdns/recursor/{primary,secondary}.pp 
1,2c1,9
< class profile::openstack::eqiad1::pdns::recursor::primary {
<     class {'::profile::openstack::eqiad1::pdns::recursor::service':}
---
> class profile::openstack::eqiad1::pdns::recursor::secondary(
>     $pdns_host = hiera('profile::openstack::eqiad1::pdns::host_secondary'),
>     $pdns_recursor = hiera('profile::openstack::eqiad1::pdns::recursor_secondary'),
>     ) {
> 
>     class {'::profile::openstack::eqiad1::pdns::recursor::service':
>         pdns_host     => $pdns_host,
>         pdns_recursor => $pdns_recursor,
>     }

Which I believe can be solved by means of some hiera magic.

@aborrero Do we need to merge the roles or can we remove the primary secondary roles and profiles?

role::wmcs::openstack::eqiad1::services_primary
role::wmcs::openstack::eqiad1::services_secondary
profile::openstack::eqiad1::pdns::recursor::primary
profile::openstack::eqiad1::pdns::recursor::secondary

@aborrero Do we need to merge the roles or can we remove the primary secondary roles and profiles?

role::wmcs::openstack::eqiad1::services_primary
role::wmcs::openstack::eqiad1::services_secondary
profile::openstack::eqiad1::pdns::recursor::primary
profile::openstack::eqiad1::pdns::recursor::secondary

I think we can merge them into a single ::services role, as we do in the codfw1dev deployment.

@aborrero I'm not sure what we're merging here. If both services are active/active, I think the only reference to a secondary is in designate profile::openstack::codfw1dev::designate::service

since we're looking to push this out now, and you're more familiar with what needs to happen can you please make the change?

Change 514279 had a related patch set uploaded (by Arturo Borrero Gonzalez; owner: Arturo Borrero Gonzalez):
[operations/puppet@production] openstack: eqiad1: services: unify primary/secondary roles

https://gerrit.wikimedia.org/r/514279

@aborrero digging into the OpenStack configuration a bit more and realized that we're not using active/active services. I'd like to chat about the HA architecture and previous decisions made when you have some time.

@aborrero digging into the OpenStack configuration a bit more and realized that we're not using active/active services. I'd like to chat about the HA architecture and previous decisions made when you have some time.

sure! active/active services is something we are doing now, i.e, a recent thing (last month?).

The current state (that I know of) is that most internal services (e.g. rabbit and things that talk to rabbit) are active/active. I'm planning to add lvs in front of our rest APIs and make them active/active as well, but that's blocked currently pending some decisions about naming -- at the moment rest APIs are actually active/active but half of the endpoints aren't getting any traffic.

The master task about this is T223905

Change 514279 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] openstack: eqiad1: services: unify primary/secondary roles

https://gerrit.wikimedia.org/r/514279

• aborrero claimed this task.