Commit Graph

11 Commits

Author SHA1 Message Date
Michele Baldessari b55ffb5b99 Drop all non bundle implementations
We dropped support for non-containerized HA stuff in queens,
keeping all these manifests around brings very little and probably
slows each puppet invocation down a little bit.

Note: this is only dropping the non-containerized HA manifests, the
containerized HA manifests are being preserved.

There do not seem be other classes referencing these (besides the
THT dep-on):
$ for i in 'profile::pacemaker::database::(mysql|redis)' 'profile::pacemaker::cinder::(backup|volume)' 'profile::pacemaker::haproxy' 'profile::pacemaker::rabbitmq'; do
    grep -ir -P "^[^#].*$i" manifests
  done

manifests/profile/pacemaker/database/mysql_bundle.pp:class tripleo::profile::pacemaker::database::mysql_bundle (
manifests/profile/pacemaker/database/redis_bundle.pp:class tripleo::profile::pacemaker::database::redis_bundle (
manifests/profile/pacemaker/cinder/backup_bundle.pp:class tripleo::profile::pacemaker::cinder::backup_bundle (
manifests/profile/pacemaker/cinder/volume_bundle.pp:class tripleo::profile::pacemaker::cinder::volume_bundle (
manifests/profile/pacemaker/haproxy_bundle.pp:class tripleo::profile::pacemaker::haproxy_bundle (
manifests/profile/pacemaker/haproxy_bundle.pp:  $haproxy_docker_image = hiera('tripleo::profile::pacemaker::haproxy::haproxy_docker_image', undef),
manifests/profile/pacemaker/rabbitmq_bundle.pp:class tripleo::profile::pacemaker::rabbitmq_bundle (

Depends-On: I60b92234a8b41b1843e702ff238dd8b6e94dd6e2

Change-Id: Id1340c45679d720cdf5ed9b5b15347d73cffc445
2021-07-21 14:49:45 +02:00
Alex Schultz a566d6b9b8 Add check for bootstrap_node for downcase
Downcase in puppet 6.14 throws an error if the input to it is Undef. We
can avoid this by checking for a value before trying to downcase.

See context https://review.rdoproject.org/r/#/c/26297/

Change-Id: Ib2e97060523a4198a14949a15c9171b56928699c
2020-04-07 14:51:41 -06:00
Tobias Urdin 1523a4b804 Convert all class usage to relative names
Change-Id: Ib2ed745b682cf12f9469a5a64451adcabec400af
2019-12-08 23:23:25 +01:00
Steve Baker 94f13e6608 Ensure hiera step value is an integer
The step is typically set with the hieradata setting an integer value:

  {"step": 1}

However it would be useful for the value to be a string so that
substitutions are possible, for example:

  {"step": "%{::step}"}

This change ensures the step parameter defaults to an integer by
calling Integer(hiera('step'))

This change was made by manually removing the undef defaults from
fluentd.pp, uchiwa.pp, and sensu.pp then bulk updating with:

    find ./ -type f -print0 |xargs -0 sed -i "s/= hiera('step')/= Integer(hiera('step'))/"

Change-Id: I8a47ca53a7dea8391103abcb8960a97036a6f5b3
2017-06-14 14:31:52 +12:00
Michele Baldessari f9efeb1582 Composable HA
This commit implements composable HA for the pacemaker profiles.
- Everytime a pacemaker resource gets included on a node,
  that node will add a node cluster property with the name of the resource
  (e.g. galera-role=true)
- Add a location rule constraint to force running the resource only
  on the nodes that have that property
- We also make sure that any pacemaker resource/property creation has a
  predefined number of tries (20 by default). The reason for this is
  that within composable HA, it might be possible to get "older CIB"
  errors when another node changed the CIB while we were doing an
  operation on it. Simply retrying fixes this.
- Also make sure that we use the newly introduced
  pacemaker::constraint::order class instead of the older
  pacemaker::constraint::base class. The former uses the push_cib()
  function and hence behaves correctly in case multiple nodes try
  to modify the CIB at the same time.

Change-Id: I63da4f48da14534fd76265764569e76300534472
Depends-On: Ib931adaff43dbc16220a90fb509845178d696402
Depends-On: I8d78cc1b14f0e18e034b979a826bf3cdb0878bae
Depends-On: Iba1017c33b1cd4d56a3ee8824d851b38cfdbc2d3
2017-01-25 19:32:31 +00:00
Michele Baldessari bf68fa9683 Do not depend on bootstrap_nodeid for any pacemaker profile
When we create a pacemaker resource it must happen from a single node.
If it happens from multiple nodes an immediate error will be returned by
pcs.

For the pacemaker roles we enforce this by leveraging the recently
introduced <SERVICE_NAME_bootstrap_short_node_name> which gives us
the first hostname per-service, regardless of the role.
(introduced via I03e8685f939e8ae1fcd8b16883b559615042505d)

With this approach if a pacemaker service belongs to two different
roles (say role Controller on node A and role galera on node B), it
will only create the resource from one of the two and not both (which
would return an error).

Only setting Partial-Bug for this one, because it addresses the issue
from the pacemaker resource creation POV (which is always affected). But
the issue itself is a race that we're theoretically affected by since
the composable roles work landed. While I have tried to fix the more
general case in previous attempts, I think it is best if we start a
discussion on how to fix it, because each approach has a bunch of
potential drawbacks and is quite invasive on how we do things. A
discussion slot for this has been proposed for the Atlanta PTG.

Change-Id: I662398cab60d523d204b57a5674ca8f5c0f2e68a
Partial-Bug: #1615983
2017-01-18 11:53:16 +01:00
Michele Baldessari 0bc59a7362 Fix the timeout for pacemaker systemd resources
Back in the Mitaka cycle via the change If6b43982c958f63bc78ad997400bf1279c23df7e
we made sure that the default start and stop timeouts for pacemaker
systemd resources is 200s (>= twice the default 90s DefaultTimeoutStopSec
in systemd). We did this change by setting puppet resource defaults for
the Pacemaker::Resource::Service class:

Pacemaker::Resource::Service {
  op_params => 'start timeout=200s stop timeout=200s',
}

The problem is that after the composable services rework, this does not
work anymore and the pacemaker systemd resources that still exist do not
have these timeouts set.

We want to move away from resource defaults for this because its results
are dependent on the inclusion order which in tripleo is not guaranteed
any longer (https://docs.puppet.com/puppet/latest/reference/lang_scope.html#scope-lookup-rules)

The only services affected in Newton are: cinder-volume,
cinder-backup, manila-share, haproxy. I preferred fixing all the
pacemaker resources because it seems the cleanest and most logical
commit.

Change-Id: If89a95706514e536a7a2949871a0002c79b6046e
Closes-Bug: #1629366
2016-10-03 18:27:36 +00:00
Jiri Stransky da4bcee4d6 Write restart flags to restart services only when necessary
Write restart flag file for services managed by Pacemaker into
/var/lib/tripleo/pacemaker-restarts directory. The name of the file must
match the name of the clone resource defined in pacemaker. The
post-puppet restart script will restart each service having a restart
flag file and remove those files.

This approach focuses on $pacemaker_master only (we don't want to
restart the pacemaker services 3 times when we have 3 controllers), so
it relies on the assumption that we're making the matching config
changes across the pacemaker nodes.

Change-Id: I6369ab0c82dbf3c8f21043f8aa9ab810744ddc12
2016-08-30 11:19:53 +02:00
Carlos Camacho 689d80e971 Fix parameters and headers inconsistency in the puppet manifests.
As we are staring to manually check overcloud services
the first step is to check that the puppet profiles
are all aligned.

Changes applied:

  No logic added or removed in this submission.

  Removed unused parameters.

  Align header comments structure.

  All profiles parameters sorted following:
  "Mandatory params first sorted alphabetically
  then optional params sorted alphabetically."

Note: Following submissions will check pacemaker,
cinder, mistral and redis services in the base profiles
as some of them has the $pacemaker_master parameter
defaulted to true.

Change-Id: I2f91c3f6baa33f74b5625789eec83233179a9655
2016-08-08 22:44:01 +02:00
Michele Baldessari c79e5c9a06 Next generation HA architecture work
This change moves the cinder-volume/cinder-scheduler constraints in the
cinder-scheduler profile as these can't be applied by the cinder-volume
service when cinder-scheduler isn't managed by Pacemaker.

Blueprint:
https://blueprints.launchpad.net/tripleo/+spec/ha-lightweight-architecture

Change-Id: I5e7585c08675d8a4bd071523b94210d325d79b59
Implements: blueprint ha-lightweight-architecture
Co-Author: cmsj@tenshu.net
2016-08-01 22:49:33 +02:00
Giulio Fidente f75502475d Add Cinder API/Scheduler/Volume roles
Includes both the base and the pacemaker roles.

Change-Id: I3c6d5226eed5f0f852b0ad9476c7cd9a959fda69
2016-06-02 14:42:27 +00:00