Commit Graph

17 Commits

Author SHA1 Message Date
Ghanshyam Mann e06f50cb06 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: I73df79a8698625815ea4e3099904da448a49887e
2024-02-24 11:42:30 -08:00
katarimanoj 916e715036 Swift: 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: I6ff74931b9ac95c7c2b134c249797e5b74c6471d
2022-04-21 16:20:19 +05:30
Tobias Urdin 1523a4b804 Convert all class usage to relative names
Change-Id: Ib2ed745b682cf12f9469a5a64451adcabec400af
2019-12-08 23:23:25 +01:00
Tobias Urdin a07db29002 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Change-Id: Iee8c082b5e4dcb7b035faa56a2182718947ad495
2019-02-25 22:51:07 +01:00
Derek Higgins 8187a83259 Disable curl globbing
Disable curl globbing to allow Swift ringbuilder to upload to IPv6
upload addresses. Also dicable globbing in the other places curl
is used.

Change-Id: Iba51cc75bea26b775f790849f0b466a6528ee627
Closes-Bug: #1757118
2018-03-20 11:43:24 +00:00
Christian Schwede 46537e0c4b Retry Swift ring up-/downloads on failures
The current way never retries up- or downloading the rings from the
undercloud. This is risky, for example when there are temporary network
issues.

This patch adds retries to the curl commands. It does so in two ways:

1. curl retries up to 3 times if there is an HTTP error. This could
happen for example if the proxy is accessible, but the proxy itself
can't connect to a backend server. Note that curl returns an exit code
of 0 if there is an HTTP error, so curl itself needs to retry in this
case.

2. If curl fails hard (for example due to an network error, proxy being
down etc) the whole command will be re-executed up to 3 times by Puppet
itself. The default timeout has been set to 30 seconds instead of the
default timeout of 300 seconds.

Change-Id: I21f732c1afa9d472f4a2fb840b6ddad9b8d65d07
2017-09-01 11:05:11 +02: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
Jenkins 322888dc08 Merge "Fix Swift ring management in container deployments" 2017-06-14 01:00:37 +00:00
Christian Schwede 6e81485315 Fix Swift ring rebalance order
The current order is broken if there were changes to the account and
container devices, but not to the object devices. In these cases it can
happen that the rebalance happens before modifying devices.

Change-Id: I15641c32266939c9a00936cc471cc59b1bb54eec
2017-06-09 12:08:35 +02:00
Christian Schwede 410e05ba63 Fix Swift ring management in container deployments
The ring up- and downloading was never executed if run within a
containerized environment. This is due to the fact that this manifest
gets executed within step 6(5) only. There is also an ordering issue,
which actually tries to create the tarballs before rebalancing.

This patch fixes the step conditions and also chains the tarball
creation to the rebalance.

The check to query rings on all nodes can now be disabled. This is
required on containerized environments: the local ring will be modified
and rebalanced, but rings on the existing servers are not yet modified.
Therefore a recon-check will fail, and needs to be disabled.

Closes-Bug: 1694211
Change-Id: I51c5795b9893d797bd73e059910f17a98f04cdbe
2017-06-07 15:45:04 +02:00
Christian Schwede 3412150d91 Migrate Swift ring handling from tripleo-heat-templates to puppet-tripleo
This allows decoupling the Swift ringbuilding logic from the Controller
and ObjectStorage roles. A follow up patch will modify
tripleo-heat-templates and use this modified class.

Actually this downloads the Swift rings even if ring building is
disabled or if there is no need to rebalance. This is required, because
operators can disable ring building, but use the same mechanism to
distribute pre-built rings to the nodes.

If ring building is disabled, these won't be uploaded at the end back to
the undercloud.

Related-Bug: 1665641
Change-Id: Ifd6fa5b398d98e8998630ea0c9a2ce9867ceba2b
2017-04-05 16:09:56 +02:00
Christian Schwede 1174c61cc5 Add part_power and min_part_hours for Swift
Change-Id: I78049105adf52226d47cc6764b1ba6c2c06e91e5
Related-Bug: 1631926
2016-10-13 21:19:05 +00:00
Emilien Macchi 779753d415 Fix Swift manifest for Puppet4 deployment
1) swift/ringbuilder: seed must be a String
Because we use validate_re in puppet-swift and puppet4 requires the
regex to be a string, not an integer.

2) Fix Swift package name
In puppet4, we need the resource title, not the resource name.

Change-Id: I50cea96d45e0eb46c19040d9a7105ab72c2dbef7
2016-09-21 16:31:39 -04:00
Steven Hardy 4b006b7c32 Convert ringbuilder to build devices array
Currently we have some hard-coded mangling in t-h-t but we
instead need to build the array based on the nodes running swift
storage, combined with the SwiftRawDisks parameter.

This will enable running SwiftStorage on nodes other than Controller
and SwiftStorage roles, and is required for custom-roles due to
the hard-coded stuff in the role templates and overcloud.yaml

Change-Id: I11deed1df712ecccf85d36a75b3bd2e9d226af36
Partially-Implements: blueprint custom-roles
2016-09-02 17:22:48 +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
Steven Hardy 2adcce7e4b Add swift ringbuilder profile
I think this will need refinement in future, but for now this is
just a copy of what we have in t-h-t

Change-Id: I427f0b5ee93a0870d43419009178e0690ac66bd6
Partially-Implements: blueprint refactor-puppet-manifests
2016-07-14 16:19:21 +01:00