Commit Graph

10 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
Carlos Camacho 9b438a0249 Fix lint issues to upgrade to puppet-lint 2.3
2017-07-20 15:09:38.571317 | manifests/glance/nfs_mount.pp:65:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571430 | manifests/pacemaker/haproxy_with_vip.pp:107:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571473 | manifests/pacemaker/haproxy_with_vip.pp:108:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571511 | manifests/pacemaker/haproxy_with_vip.pp:109:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571551 | manifests/pacemaker/resource_restart_flag.pp:44:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571590 | manifests/profile/base/cinder/volume/nfs.pp:72:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571625 | manifests/profile/base/docker.pp:188:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571661 | manifests/profile/base/docker.pp:210:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571699 | manifests/profile/base/logging/fluentd.pp:79:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571735 | manifests/profile/base/pacemaker.pp:107:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571773 | manifests/profile/base/swift/ringbuilder.pp:97:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571811 | manifests/profile/base/swift/ringbuilder.pp:125:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571850 | manifests/profile/base/swift/ringbuilder.pp:130:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571889 | manifests/profile/pacemaker/ceph/rbdmirror.pp:79:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571927 | manifests/profile/pacemaker/cinder/backup.pp:66:WARNING: arrow should be on the right operand's line
2017-07-20 15:09:38.571965 | manifests/profile/pacemaker/ovn_northd.pp:96:WARNING: arrow should be on the right operand's line

Change-Id: I9393c5e04310cf84695531df9bb16f33e7e15abb
2017-07-21 11:42:45 +02: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
Dan Prince bcaa12aa2c Add cinder-backup profiles
Adds a Cinder backup profile for Cinder backup service activation
(to be used in https://review.openstack.org/#/c/304563).

Cinder backup uses Swift as a default.

Change-Id: Ib1dfe52b83ab01819fc669312967950e75d8ddf1
Co-Authored-By: Jon Bernard <jobernar@redhat.com>
Co-Authored-By: Boris Kreitchman <bkreitch@gmail.com>
2016-08-11 09:27:32 +00:00