Commit Graph

476 Commits

Author SHA1 Message Date
Ghanshyam Mann 9bd4d6455e Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I5b659ef9596c8b6b7edca9fbe0ef36021b9dfc33
2024-02-24 11:42:02 -08:00
wangjiaqi07 7add07357c remove unicode from code
Change-Id: Iebb2c496e79604a68171c82b07af3f8efd20b50d
2022-12-21 04:19:57 +00:00
Zuul d8f34a5081 Merge "Add fence_watchdog (sbd) stonith agent" 2022-11-29 18:42:48 +00:00
Luca Miccini 397fbfd470 Add fence_watchdog (sbd) stonith agent
This commit adds a new stonith agent "fence_watchdog", allowing
operators to define a stonith device called "watchdog" (name is
hard coded in pacemaker) and eventually add this to the clusters
stonith topology.

Since this is a special dummy stonith device it is exempted from
having a constraint rule preventing it from running on the same
cluster nodes that is in charge of monitoring.

The "watchdog" resource needs the sbd daemon to be enabled and
depends on a valid watchdog timer device - either phisical or
virtual - to perform self-fencing when required.

Change-Id: Id010a392df0047d53dfab1c21cc78021c8c1aabf
2022-11-25 16:34:53 +01:00
Zuul 31e7487642 Merge "Update master for stable/1.5.x" 2022-11-18 11:43:15 +00:00
Luca Miccini 099af1d0da Expose run_arping to control IP collisions detection
The IPaddr2 resource-agent offers the option to run arping
for IPv4 collision detection.
This commit exposes the run_arping parameter, allowing operators
to eventually enable it via hieradata setting:

pacemaker::resource::ip::run_arping: true


Change-Id: I912080a8a9b8002e96d5e37f8e3dfda13f4250db
2022-11-17 10:25:12 +00:00
Takashi Kajinami a0a0fc2fa8 Avoid pick_default to detect promoted_max
This fixes the regression caused by [1], and avoid usage of
pick_default, which converts undef to an empty string ('').

Usage of an empty string causes type validation failure later when
the pcmk_bundle resource is defined.

[1] c332d43db6

Closes-Bug: #1995565
Change-Id: Ib909f45b237a478119d4f90ce9f7b752668bad9d
2022-11-03 16:23:06 +09:00
OpenStack Release Bot eb3ae25859 Update master for stable/1.5.x
Add file to the reno documentation build to show release notes for
stable/1.5.x.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/1.5.x.

Sem-Ver: feature
Change-Id: I170aaf3daabed8b0b962626ce803e78dbb5287e6
2022-11-02 16:19:32 +00:00
Takashi Kajinami c332d43db6 bundle: Refactor handling of masters/promoted_max
... to avoid the following warning message.

  Warning: Unknown variable: 'used_promoted_max'.

Change-Id: I9a1f5e2c6d5ef655f3dc681bb10c7ff9e4281c49
2022-11-02 01:31:39 +00:00
rabi cf2cfcb1e9 Disable setuptools auto discovery
To avoid the following error during installation.

sdist build error: Multiple top-level packages discovered in
a flat-layout.

Also, this change updates the following items to unblock CI.
- Declare the queue key at the top-level according to the recent change
  in zuul.
- Make c9s unit test job non-voting temporally. The job now
  consistently fails because of outdated package versions in gem spec.
- Migrate TripleO job from CentOS 8 Stream to CentOS Stream 9, because
  current master no longer supports CentOS 8 Stream.
- Pin mocha to <2.0.0 because 2.0.0 breaks unit tests in Ubuntu Focal.

Change-Id: I5144d738f53d127a4d306a47777e381873672d56
2022-11-02 09:13:15 +09:00
rabi 4332e628ea Bump metadata for tripleo zed release
Bumps metadata version to 1.5.0.

Change-Id: Id3252836e237b669e529d1dc61ca1daff2ef1f85
2022-10-31 13:40:49 +00:00
Zuul e0a869c4bb Merge "Replace hiera by lookup" 2022-04-21 04:31:11 +00:00
Takashi Kajinami 8b88f000bc Replace hiera by lookup
The hiera function is deprecated and does not work with the latest
hieradata version 5. It should be replaced by the new lookup
function[1].

[1] https://puppet.com/docs/puppet/7/hiera_automatic.html

With the lookup function, we can define value type and merge behavior,
but these are kept default at this moment to limit scope of this change
to just simple replacement. Adding value type might be useful to make
sure the value is in expected type (especially when a boolean value is
expected), but we will revisit that later.

example:
lookup(<NAME>, [<VALUE TYPE>], [<MERGE BEHAVIOR>], [<DEFAULT VALUE>])

Change-Id: If206d72caf78cb3a524a1b8eb9ad4399ee4e3ce0
2022-04-19 23:02:42 +09:00
root f003a5385e Add 'Release Notes' in README
Change-Id: I9cc41b18e2904b95c0332134b9664eff745bc818
2022-04-18 16:42:21 +09:00
Marios Andreou 91eb91aad3 Bump metadata 1.4.0 for tripleo release
Bumps metadata tag 1.4.0 needed by [1]

[1] https://review.opendev.org/c/openstack/releases/+/836638

Note:
This change fixes the following two problems at the same time.

 - Broken job graph related to scenario004 standalone job

 - Use https instead of git to download from github, because recently
   github doesn't download without authentication over git, while it
   allows one over https.

Co-Authored-By: Takashi Kajinami <tkajinam@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/836803
Change-Id: Ib068b5b5d8663cf3c5b75b12ea738a0165a5cc5e
2022-04-06 15:31:10 +00:00
Takashi Kajinami e0fa810d23 Do not install fence-agent packages in base manifests
... because the required package is pulled by individual resource
types to manage stonith resources.

Related-Bug: #1958653
Change-Id: I5183c6977002a7be0d6f3c03670205bc11334658
2022-01-24 13:24:15 +09:00
Takashi Kajinami 34bf907131 Fix duplicate declaration of package resource
This change replaces ensure_resource('package', ... ) by
ensure_packages, which automatically converts ensure value to avoid
conflict caused by present vs installed.

Also, the ignored pacemaker::install::ensure is fixed by this change.

Closes-Bug: #1958653
Change-Id: I0cb2e32bbfcd056f4429b03d7ba67aaff8a5a760
2022-01-22 22:49:05 +09:00
Chandan Kumar (raukadah) 9f2e6f10a4 Only install required/supported fence agents
This change replaces fence-agents-all package to fence-agents-redfish,
fence-agents-ipmilan, fence-agents-kdump and fence-agents-rhevm.

The same is proposed in
https://review.opendev.org/c/openstack/tripleo-puppet-elements/+/818184

This change also fixes failure in unit tests, caused by the following
warning message shown by the pcs command.

Warning: stonith option 'passwd' is deprecated and should not be used,
use 'password' instead

Closes-Bug: #1955559
Related-Bug: #1955572
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I8f5c04cea4afb8f46a8da5ab639ac984bac36cca
2021-12-23 08:15:37 +09:00
Zuul 81c84d56e8 Merge "Fix idempotency regex during scale-up check" 2021-11-10 23:30:07 +00:00
Zuul a9a89ec690 Merge "Replace the deprecated is_ipv6_address function" 2021-11-10 23:30:05 +00:00
Damien Ciabrini e3df586ef7 Fix idempotency regex during scale-up check
When a new node must be added in the cluster, an Exec resource
calls pcs, only if the node is not already present in the cluster.
The current regex doesn't match pcs' output because of a
unecessary beg-of-line marker, so fix it accordingly.

Change-Id: Ie0f549ba968f4f11b30705cc9c80856186dfccda
Closes-Bug: #1950294
2021-11-09 11:26:13 +01:00
Michele Baldessari d3a119e9e1 Make sure we wait for the cluster before setting resource_default_op
Same as all other resources, we need to make sure the cluster is up
before trying to create resource defaults ops.

Change-Id: Ic85628f8844ded5584d90b4848d86961902d204c
2021-10-21 16:55:13 +02:00
Alex Schultz fff6e02ff4 Bump tag for release
Change-Id: Ifbae0b11bc2b9257885820ea9d2d07a13dac2f6b
2021-10-13 09:43:55 -06:00
Takashi Kajinami c08236d8c7 Replace the deprecated is_ipv6_address function
The is_ipv6_address function in puppetlabs-stdlib is deprecated since
4.13.0[1] and usage of the function shows the warning message.

[1] 6d185bdaa1

Change-Id: If4e2277781711ca96b7ddc2bb8d3115107940a4d
2021-10-13 20:33:49 +09:00
Zuul 1cd0951df0 Merge "Make sure we test for Promoted when looking for constraints" 2021-09-06 17:50:47 +00:00
Michele Baldessari 99ac026c6d Make sure we test for Promoted when looking for constraints
pacemaker 2.1 returns 'Promoted' as opposed to 'Master' in its
with-rsc-role output. Let's test for both of them to keep compatibility
forwards and backwards. See: https://github.com/ClusterLabs/pacemaker/commit/c3b7b13ef
for example.

Tested this on Centos9 and fixed the issue with puppet not detecting
that a constraint was already there.

Change-Id: Ic215719e52ef1cc8a7a99bafe5d7393f583cc7b7
2021-09-03 14:19:32 +02:00
Martin Schuppert bc4cc7899c Support fence_kubevirt apiversion parameter
Add apiversion parameter support added in fence_kubevirt via:
https://github.com/ClusterLabs/fence-agents/pull/433

Change-Id: I837474c42592683dc4fffbe787e00fa2e15efb91
2021-09-03 13:37:09 +02:00
Martin Schuppert 744f3b78aa Add support for fence_kubevirt fencing agent
This adds support for new fence_kubevirt kubevirt (CNV)
fencing agent, where CNV virtual machines acting as cluster nodes:
https://github.com/ClusterLabs/fence-agents/pull/412

Change-Id: I18fd2297063c7157d6b743c7fc9c161bf23dca39
2021-09-01 14:44:24 +02:00
Luca Miccini 4399c3a834 Fix up cluster_setup_extras usage
This pairs with https://review.opendev.org/c/openstack/puppet-tripleo/+/739933.

Starting with pcs 0.10 (CentOS/RHEL 8) the arguments to pcs cluster setup changed completely
in an incompatible way and in fact are ignored by puppet-pacemaker.

This review makes sure ${cluster_setup_extras_real} is taken into account when the cluster
is set up via pcs 0.10, addressing LP#1886789.

Related-Bug: #1886789
Change-Id: I1dc3a72a51a4f816bb79986e845798d869223ffe
2021-08-12 08:40:35 +00:00
Zuul bb5e14d4fa Merge "Remove old workarounds for broken crm_diff" 2021-08-11 10:28:26 +00:00
Zuul 90be0f9e65 Merge "setup.cfg: Replace dashes with underscores" 2021-08-09 19:52:56 +00:00
Zuul a126b0669d Merge "Fix where long_description_content_type is placed" 2021-08-09 19:52:55 +00:00
Michele Baldessari 606d58caa3 Remove old workarounds for broken crm_diff
Reason for this is that there are two functions to detect a change in a
pcmk resource:
- pacemaker_restart_resource? -> which parses crm_simulate and was
  necessary due to https://bugzilla.redhat.com/show_bug.cgi?id=1561617
  (Fixed in pacemaker-1.1.18-12)
- pacemaker_restart_resource_ng? -> which is the preferred one and uses
  crm_diff xml output (and is a lot simpler).

We can remove pacemaker_restart_resource? fully now that newton and
Centos 7 are unsupported.

Tested as follows:
- Deployed a fresh Train overcloud w/ this change
- Ran a redeployment forcing a config change on an HA bundle
- Ran another redeployment forcing a CIB change on an HA bundle
  OVNDBSPacemakerMonitorIntervalSlave: 666
  observed that the bundle was restarted correctly:
  [root@controller-0 ~]# pcs resource config ovn-dbs-bundle |grep 666
     monitor interval=666s role=Slave timeout=60s (ovndb_servers-monitor-interval-666s)
- Also tested in CI via https://review.opendev.org/c/openstack/tripleo-heat-templates/+/803101

Change-Id: Iba736839ae12f3adf180b53cd7fc5c552d03bd47
2021-07-31 13:18:34 +02:00
Michele Baldessari d513c631da Increase the scaleup/startup tries
Currently we're using 10 tries + 20 seconds sleep. This has been
observed as insufficient in a number of environments.
Let's bump up the defaults to something that will cover most situations.

Seen also in rhbz#1978696

Change-Id: I08c072acf5d41197f139ae66f1ee05ebccf11542
Closes-Bug: #1938129
2021-07-30 14:57:36 +02:00
Michele Baldessari 531283ecea Fix spec tests using the deprecated pacemaker_restart_resource? function
Currently we get the following error:

  1) pcmk_common functions pcmk_restart_resource? stonith resource
     Failure/Error: expect(pcmk_restart_resource?('stonith-fence_ipmilan-stonith-fence-1', "cib-resource.xml")).to eq true

       expected: true
            got: false

       (compared using ==)

       Diff:
       @@ -1 +1 @@
       -true
       +false

     # ./spec/unit/puppet/provider/pcmk_common_spec.rb:41:in `block (2 levels) in <top (required)>'

Reason for this is that there are two functions to detect a change in a
pcmk resource:
- pacemaker_restart_resource? -> which parses crm_simulate and was
  necessary due to https://bugzilla.redhat.com/show_bug.cgi?id=1561617
  (Fixed in pacemaker-1.1.18-12)
- pacemaker_restart_resource_ng? -> which is the preferred one and uses
  crm_diff xml output.

The problem in CI is that crm_simulate output slightly changed and so
one test is failing. Since it makes no sense to call
pacemaker_restart_resource? with a working crm_diff (i.e. any pacemaker
> 1.1.18-12), we just make sure we do not run these tests on a working
crm_diff.

We plan to remove pacemaker_restart_resource? fully now that newton (and
el7) is unsupported, so this change is a minimal non-invasive fix for
the time being.

Closes-Bug: #1921118

Change-Id: Ic8a8e127004220bb8b6735b6cf8b4b52c03fa825
2021-07-30 14:52:17 +02:00
Javier Pena b0ea31ae9a Update metadata to match released tag
We had tag 1.2.0 released for commit 6e272bf9ec, but the metadata.json
file was not updated to match. This commit fixes that.

Change-Id: I7c53e2c8ff9cf3558c4a5e7564e9113e6616baac
2021-06-02 17:58:58 +02:00
Takashi Kajinami 8edbd644f0 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of
dash-separated options in 'setup.cfg' will not be supported
in a future version [1].
Get ahead of the issue by replacing the dashes with underscores.
Without this, we see 'UserWarning' messages
like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: Ia6d0c888ae41ea649d17cfa9f6492f5fcf07490c
2021-05-11 20:44:29 +09:00
Takashi Kajinami dc2ae869dc Fix where long_description_content_type is placed
... so that desciption-file is not interrupted.

Change-Id: I5b60f0144cdcbe39ba7a620c1f5a4d72987b59e5
2021-05-11 20:44:06 +09:00
Michele Baldessari 6e272bf9ec Make pcs resource config/show work depending on the installed pcs version
When we added Id8807a644a6d53f89f99b9db988cbbca99abb7ab we were under
the impression that train and centos-7 was not a thing. Since centos-7
pcs does not have the pcs resource config it is likely we will fail to
recognize existing resources.

This can be removed once we stop supporting centos 7, but for now let's
support both transparently.

Tested on both centos-7 env where it was failing and on a centos-8 train
deployment.

Closes-Bug: #1915519

Change-Id: Ie07b37581e844b64063e5e501f09edf4c8ef24e3
2021-02-23 12:28:56 +01:00
Michele Baldessari 2f4b6fafcb Add fence_crosslink support
This adds support for the newly introduced fence_crosslink
two-node fence agents pushed upstream:
https://github.com/ClusterLabs/fence-agents/pull/360

Change-Id: I3a9b852da78426ae45d99987022b630d833a84dc
2020-11-30 11:54:44 +01:00
Michele Baldessari 40d91a06a0 Fix reconnect_interval on remotes with pcs 0.10
When switching to the pcs 0.10 providers we moved from the the general
pcmk_resource provider to the pcmk_remote backend. While doing this we
lost the ability to specify the reconnect_interval.

Tested by deploying tripleo with the following:
  ExtraConfig:
    pacemaker_remote_reconnect_interval: 180

And correctly observing that the remotes have the right
reconnect_interval:
[root@controller-0 ~]# pcs resource config compute-0 |grep reconnect
  Attributes: reconnect_interval=180 server=172.17.1.96

Change-Id: Idb6e4ba4eadbeeb52b959bc688eb5e043f11c155
Closes-Bug: #1905606
2020-11-27 07:50:18 +00:00
Sagi Shnaidman 17c56e0b03 Add building containers to standalone job
In order to prevent ratelimiting from docker.io

Change-Id: I7b736b3d55d24d8cc88d832f82e555efbe588cca
2020-11-26 17:59:54 +02:00
Michele Baldessari af5df04b61 pcs resource show and pcs stonith show are deprecated
Now that we branched we should try and clean up these old usages.
Tested this by deploying a large train composable HA overcloud (with
stonith and Instance HA) using puppet-pacemaker from master with this
change and everything worked correctly.

Test was done on RHEL 8.3 + composable HA + IHA + TLS-E

Change-Id: Id8807a644a6d53f89f99b9db988cbbca99abb7ab
2020-11-06 19:44:52 +01:00
OpenStack Release Bot 942aed4fb2 Update master for stable/1.1.x
Add file to the reno documentation build to show release notes for
stable/1.1.x.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/1.1.x.

Change-Id: Id7af27f08582c33675dd332ab8bd1b2c9c6c4919
Sem-Ver: feature
2020-10-05 15:02:11 +00:00
Alex Schultz af9f15aed1 Update metadata for a release
We'd like to drop <pcs 0.10 support, but we should cut a release and
branch it before doing so. Let's create a 1.1.0 release so we can cut a
stable/1.1 branch and work on droping the older pcs support.

Change-Id: I2c54644efd26625a39d300922f777c5f3f912b5c
2020-10-02 07:29:45 -06:00
Alex Schultz 441e0c406b Fix pcs 0.10 detection for 8-stream
Centos 8 stream version is just '8' in the puppet facts so we need to
check for this condition to determine if we should use the pcs 0.10
version of the commands.

Change-Id: Ia895f11d8d118f544b9bf0afbcf40061fe840abe
2020-10-01 14:41:47 -06:00
Christopher Brown b3596d187d Add disable-http-filter option
Change-Id: I28af33e1a8e54bdb9bd9af280e39519ab81d15d5
2020-09-10 21:59:21 +01:00
Tobias Urdin b501c08640 Convert all class usage to relative names
Change-Id: I81554d6ab7349a068066a68801124189663490dd
2020-09-01 14:44:22 +02:00
Chandan Kumar (raukadah) a53120f887 Add tripleo-standalone sc4 job
Adding tripleo-ci-centos-8-scenario004-standalone job in
check and gate against puppet-pacemaker project make sure it
does not break the tripleo project.

Change-Id: I2365ce2cb2b0bdc47d153fa90df93bcb99a32248
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2020-07-31 20:23:41 +05:30
Zuul a6d00ddcfa Merge "Revert "Make sure we pass cluster_setup_extras when using pcs 0.10"" 2020-07-31 14:46:11 +00:00