Commit Graph

57 Commits

Author SHA1 Message Date
Ghanshyam Mann c2ff9b8f49 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: I7f1dc7801a025d9bb28110f74340846b99870b79
2024-02-24 11:43:13 -08:00
Rabi Mishra cc38db4c99 Filter excluded nodes from ansible delegates
This would allow external_(deploy/update/upgrade)_tasks
to honor excluded nodes during deploy/update/upgrade.

Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/856407
Change-Id: Ia9d3c8d0a3098191b2d8b12fc24eee4517c6c521
2022-09-20 12:54:22 +09:00
Takashi Kajinami 0b9d3bf777 Remove redundant usage of hieradata
The memcached::listen_ip_uri key in hieradata is used to define value
of the different hieradata key so is not really necessary.

Change-Id: Idddd87459ee8723dd016fc024dad2fcc37337fa3
2022-06-05 01:54:19 +09:00
Takashi Kajinami 0f86aab78c Remove deprecated memcached::listen_ip
The parameter is deprecated in favor of the new listen parameter since
puppet-memcached 6.0.0[1].

[1] 0e99f8572d

Change-Id: Id1fb220c7a41eb03c7f0e5fca9eda5d3834d0388
2022-06-02 23:20:15 +09:00
Zuul c653c202ff Merge "memcached: Replace usage of hiera CLI" 2022-04-25 15:46:02 +00:00
Takashi Kajinami ff83505e8a 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: If5ac88ffccc1bb800d8af33c8896294a57e9b5fb
2022-04-14 17:07:52 +09:00
Takashi Kajinami 6f8a5bc1ef Memcached: Allow puppet to be aware IPv6 is used
When memcached is using IPv6 network, some parameters like
[keystone_authtoke] memcached_servers require each server name has
inet6 prefix, as is described in the following example.

 inet6:[<hostname>]:<port>

This change introduces the global parameter so that puppet can detect
whether memcached is using IPv6 network.

Related-Bug: #1964824
Change-Id: I755cc96116a664f01622fcd30cdd0d82d184f0c7
2022-03-15 11:49:26 +09:00
Takashi Kajinami 17fadfbe05 memcached: Replace usage of hiera CLI
The hiera CLI has been deprecated since hiera version 3 was deprecated.
This change replaces usage of the hiera CLI by native heat templating.

Change-Id: I550e508120fdb160448323e3ecf9fe412014ba4b
2022-03-07 14:35:26 +09:00
Alex Schultz ebab335f38 Role specific container support
We may want to be able to specific different containers at a role level.
This requires switching the container image parameters to be role
specific too allow for role based overrides.

Change-Id: I4090e889a32abd51e7c11139737a7a18e27d18e7
2022-01-21 14:18:02 -07:00
Takashi Kajinami 073e581e62 Enable debug of memcached when Debug is enabled
This restores the previous behavior changed by recent refactoring about
the *Debug parameters, and ensures that the global Debug parameter also
affects memcached logging.

Closes-Bug: #1940303
Change-Id: I5b8c71793476dd7673015928254d8fa8b499351d
2021-08-17 23:20:10 +09:00
Zuul 94af6ad4ff Merge "Make memcached port parameters globally available" 2021-07-29 10:46:18 +00:00
ramishra b253d564f7 Use server side env merging for ServiceNetMap/VipSubnetMap
This simplifies the ServiceNetMap/VipSubnetMap interfaces
to use parameter merge strategy and removes the *Defaults
interfaces.

Change-Id: Ic73628a596e9051b5c02435b712643f9ef7425e3
2021-05-19 10:16:58 +05:30
Takashi Kajinami a7d2386438 Make memcached port parameters globally available
The memcached_port parameter and the memcached_authtoken_port parameter
are used in each api service. Because memcached and each api services
are not always collocated, we should use global hieradata to ensure
the parameters defined in memcached service resource are propagated to
all nodes in the deployment.

Change-Id: I54d45bbb26a4a04cb3cf87b9bd8a2290998279fc
2021-04-30 17:29:41 +09:00
ramishra 9fcd76ac47 Simplify manila, memcached and logging services
Change-Id: I828dbece30d94938c9ec904415854570041e358d
2021-04-27 12:07:26 +05:30
ramishra c9991c2e31 Use 'wallaby' heat_template_version
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added
a new template version for wallaby. This would allow us to use
2-argument variant of the ``if`` function that would allow for
 e.g. conditional definition of resource properties and help
cleanup templates. If only two arguments are passed to ``if``
function, the entire enclosing item is removed when the condition
is false.

Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
2021-03-31 17:35:12 +05:30
ramishra b4203a30eb Change all *Debug parameter types to boolean
This changes all these parameters as heat would correctly
parse all values. Also, drops all yaql shenanigans
used for their handling and heat conditions.

Also fixes wrong usage of non-existent NeutronWrapperDebug
parameter in ovn-metadata-container-puppet.yaml.

We had converted all ``Debug`` parameters to boolean with
Ib6c3969d4dd75d5fb2cc274266c060acff8d5571.

Change-Id: Ia2bffffde34aa248a4cc60c3895464f1f9d1ded2
2021-03-30 08:29:10 +05:30
ramishra cc5eb81771 Optimize conditions for TLS support
In 1ceb521805 we added these and
can be simplified as they are are boolean parameters to get
rid of the redundant heat intrinsic functions.

Change-Id: I3851187c83965db5ecafcc945bff1fe3a5aa9ff4
2021-03-19 16:07:05 +05:30
Zuul 814a7bb5af Merge "Remove obsoleted generate_service_certificates" 2021-03-17 13:31:16 +00:00
Carlos Goncalves 6e7e0ab48e Remove obsoleted generate_service_certificates
Remove traces of generate_service_certificates. It was removed during
Pike release cycle [1].

[1] https://review.opendev.org/c/openstack/puppet-tripleo/+/444891

Change-Id: Ib203b52547433ff73141df66641528c389b50361
2021-03-16 19:50:14 +01:00
Zuul 0626405b0d Merge "Fix parameters for puppet-memcached-6.0.0" 2021-03-16 12:47:25 +00:00
Zuul 4ededdab3f Merge "Fix memcached firewall condition" 2021-03-13 03:44:47 +00:00
Zuul 861e162110 Merge "Generate certificates using ansible role" 2021-03-12 19:18:54 +00:00
Grzegorz Grasza 2ee68bf9a7 Fix memcached firewall condition
The conditions should have used map_merge, this simplifies
them a lot, by passing a list to dport key.

Change-Id: I15cb1f3bbc9e1be90265feab5bfed7f28c1cb1f3
Closes-Bug: #1918891
Co-authored-By: yatinkarel <ykarel@redhat.com>
2021-03-12 15:37:22 +01:00
Grzegorz Grasza e329ca915e Generate certificates using ansible role
This is using linux-system-roles.certificate ansible role,
which replaces puppet-certmonger for submitting certificate
requests to certmonger. Each service is configured through
it's heat template.

Partial-Implements: blueprint ansible-certmonger
Depends-On: https://review.rdoproject.org/r/31713
Change-Id: Ib868465c20d97c62cbcb214bfc62d949bd6efc62
2021-03-10 16:28:22 +01:00
Grzegorz Grasza 9be84a2fc2 Fix parameters for puppet-memcached-6.0.0
Rename listen_addr to listen; drop notls_listen_addr and
notls_listen_port from version 5.0.0, as they never made it
in into puppet-memcached-6.0.0.

Change-Id: I18bda6b9219ab42543f83c46be7763f98e4dfd0e
Signed-off-by: Moiss Guimares de Medeiros <moguimar@redhat.com>
Co-authored-By: Moiss Guimares de Medeiros <moguimar@redhat.com>
2021-03-10 14:54:54 +01:00
Zuul 4b4aaeb65a Merge "Add non-tls listener to Memcached" 2021-03-08 18:43:09 +00:00
Moisés Guimarães de Medeiros 125ebd64f4 Add non-tls listener to Memcached
This step is required in order to migrate services to use TLS one by
one. This config should go away once all services support TLS.

Change-Id: I7a38a01f498d350d065a7c312a6654832fe24e6a
Co-authored-By: Grzegorz Grasza <xek@redhat.com>
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2021-02-12 10:48:58 +01:00
ramishra 7f195ff9a8 Remove DefaultPasswords interface
This was mainly there as an legacy interface which was
for internal use. Now that we pull the passwords from
the existing environment and don't use it, we can drop
this.

Reduces a number of heat resources.

Change-Id: If83d0f3d72a229d737a45b2fd37507dc11a04649
2021-02-12 11:38:44 +05:30
Zuul 47bc3eab6d Merge "Add setting to override max memcached connections" 2021-01-13 07:58:34 +00:00
Raildo 9760977529 Adding key_size option on the certificate creation
Adding the ability to specifies the private key size
used when creating the certificate. We have defined the
default value the same as we have before 2048 bits.
Also, it'll be able to override the key_size value
per service.

Depends-on: I4da96f2164cf1d136f9471f1d6251bdd8cfd2d0b
Change-Id: Ic2edabb7f1bd0caf4a5550d03f60fab7c8354d65
2020-12-17 20:22:52 -03:00
David Hill bbed1ef736 Add setting to override max memcached connections
Added MemcachedMaxConnections to allow max connection override as
actually the limit is 8192 connections but in some cases the environment
will create more than 8192 connections to each memcached server.

Change-Id: Iaef7c01127327f709577bef3d2e96db840ba2b80
2020-12-01 10:19:53 -05:00
Michele Baldessari a9da212d7d Fix memcached logging
Even though we're setting memcached::logfile:
'/var/log/memcached/memcached.log' there are no logs created in
/var/log/containers/memcached.

The reason for this is that memcached::logfile in puppet-memcached
simply adds a shell redirect to a file. These redirecs are
passed by tht and kolla to the memcached process invocation as parameters
of memcached and so are not read being read by the shell process
and nothing gets redirected. That is why we observe that on a broken
container the redirections are arguments to memcached:

[root@controller-0 ~]# ps aux | grep memcache | grep -v containers
    42457     358189  0.0  0.0 744088 10960 ?        Sl   15:21   0:00 /usr/bin/memcached -p 11211 -u memcached -m 16000 -c 8192 -vv -l 172.17.1.138 -U 0 -X -t 8 >> /var/log/memcached/memcached.log 2>&1

Fix this by forcing memcached to log on stdout and at the same
time creating the redirect on the shell parameters that invoke
memcached.

Tested on a Train environment and I correctly get:
1) Proper logging
[root@controller-0 ~]# ls -l /var/log/containers/memcached/memcached.log
-rw-r--r--. 1 42457 42457 29086 Nov  4 18:00 /var/log/containers/memcached/memcached.log

2) No unused redirections inside the memcached process:
[root@controller-0 ~]# podman exec -it -uroot memcached ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
memcach+       1       0  0 18:47 ?        00:00:00 dumb-init --single-child -- kolla_start
memcach+       6       1  0 18:47 ?        00:00:00 /usr/bin/memcached -p 11211 -u memcached -m 9953 -c 8192 -vv -l 172.17.1.50 -U 0 -X -t 4

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>

Resolves: #1902922

Change-Id: If5487c9be745ebd6bc3ebe172e28dc59e6855188
2020-11-04 19:00:23 +01:00
Michele Baldessari acf08419bc Make memcache also listen to localhost
Currently memcache only listens to the internal_api IP. We want to
make it listen to both localhost and internal_api IP because in the
future some services on some roles may want to just use the localhost
memcached instance instead of the using multiple memcached servers
over the network as it is the case currently.

As suggested by Takashi we check the ip version in MemcachedNetwork
in order to decide if we should listen to ::1 or 127.0.0.1

Change-Id: I6ea989ae546ef344a9b3d2dd6c86a49822efc6e2
2020-10-28 09:58:32 +01:00
Moisés Guimarães de Medeiros 50c22d629c Add TLS capabilities to Memcached service
Co-Authored-By: Grzegorz Grasza <xek@redhat.com>
Depends-On: https://review.opendev.org/745532
Change-Id: Ia738f6e8904a337f911cfdd58b09932c10397764
2020-10-18 15:05:13 +00:00
Zuul 8036684de7 Merge "Memcached collectd plugin uses host URI instead of IP address." 2020-08-04 16:58:46 +00:00
Jose Luis Franco Arza 8783ec9c45 Remove ffwd-upgrade leftovers from THT.
Now that the FFU process relies on the upgrade_tasks and deployment
tasts there is no need to keep the old fast_forward_upgrade_tasks.

This patch removes all the fast_forward_upgrade_tasks section from
the services, as well as from the common structures.

Change-Id: I39b8a846145fdc2fb3d0f6853df541c773ee455e
2020-07-23 15:33:25 +00:00
pleimer 52831ef10c Memcached collectd plugin uses host URI instead of IP address.
This fixes a bug in the Service Telemetry Framework where all collectd
plugins report the host by URI except for the memcached plugin, causing
the appearance of more nodes than exist in the dashboards.

Change-Id: Ie653deb69d9d72f811c3238d64437f6542cd2a4d
2020-07-23 10:30:44 -04:00
Takashi Kajinami fffdcf0f30 Use absolute name to include puppet classes
Current puppet modules uses only absolute name to include classes,
so replace relative name by absolute name in template files so that
template description can be consistent with puppet implementation.

Change-Id: I7a704d113289d61ed05f7a31d65caf2908a7994a
2020-04-11 08:13:23 +09:00
Alex Schultz 71e9b806b4 Use kolla tools for memcached configuration
This change updates the memcached service to leverage the kolla
configuration to configure and launch the memcached service. This is the
same pattern we use for the other services.

Related-Bug: #1871734
Change-Id: Ib0bfc3e9009357f0aed28c0a10b927c5ca2e53a7
2020-04-09 08:25:51 -06:00
Emilien Macchi 38bad5283f Remove all ignore_errors to avoid confusion when debugging
- deploy-steps-tasks-step-1.yaml: Do not ignore errors when dealing
  with check-mode directories. The file module is resilient enough to
  not fail if the path is already absent.

- deploy-steps-tasks.yaml: Replace ignore_errors by another condition,
  "not ansible_check_mode"; this task is not needed in check mode.

- generate-config-tasks.yaml: Replace ignore_errors by another
  condition, "not ansible_check_mode"; this task is not needed in check mode.

- Neutron wrappers: use fail_key: False instead of ignore_errors: True
  if a key can't be found in /etc/passwd.

- All services with service checks: Replace "ignore_errors: true" by
  "failed_when: false". Since we don't care about whether or not the
  task returns 0, let's just make the task never fail. It will only
  improve UX when scrawling logs; no more failure will be shown for
  these tasks.

- Same as above for cibadmin commands, cluster resources show
  commands and keepalived container restart command; and all other shell
  or command or yum modules uses where we just don't care about their potential
  failures.

- Aodh/Gnocchi: Add pipefail so the task isn't support to fail

- tripleo-packages-baremetal-puppet and undercloud-upgrade: check shell
  rc instead of "succeeded", since the task will always succeed.

Change-Id: I0c44db40e1b9a935e7dde115bb0c9affa15c42bf
2020-03-05 09:22:04 -05:00
Jesse Pretorius (odyssey4me) 2092b1303f Update ffwd-upgrade branch names
The next iteration of fast-forward-upgrade will be
from queens through to train, so we update the names
accordingly.

Change-Id: Ia6d73c33774218b70c1ed7fa9eaad882fde2eefe
2020-01-27 19:42:40 +00:00
Kevin Carter 9a2a36437d
Update all roles to use the new role name
Ansible has decided that roles with hypens in them are no longer supported
by not including support for them in collections. This change renames all
the roles we use to the new role name.

Depends-On: Ie899714aca49781ccd240bb259901d76f177d2ae
Change-Id: I4d41b2678a0f340792dd5c601342541ade771c26
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-01-20 10:32:23 -06:00
Kevin Carter 50367fbe35 Convert firewall rules to use TripleO-Ansible
This change converts our filewall deployment practice to use
the tripleo-ansible firewall role. This change creates a new
"firewall_rules" object which is queried using YAQL from the
"FirewallRules" resource.

A new parameter has been added allowing users to input
additional firewall rules as needed. The new parameter is
`ExtraFirewallRules` and will be merged on top of the YAQL
interface.

Depends-On: Ie5d0f51d7efccd112847d3f1edf5fd9cdb1edeed
Change-Id: I1be209a04f599d1d018e730c92f1fc8dd9bf884b
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-11-18 15:40:22 -06:00
Jose Luis Franco Arza 4cbae84c75 Get rid of docker removing in post_upgrade tasks.
When upgrading from Rocky to Stein we moved also from using the docker
container engine into Podman. To ensure that every single docker container
was removed after the upgrade a post_upgrade task was added which made
use of the tripleo-docker-rm role that removed the container. In this cycle,
from Stein to Train both the Undercloud and Overcloud work with Podman, so
there is no need to remove any docker container anymore.

This patch removes all the tripleo-docker-rm post-upgrade task and in those
services which only included a single task, the post-upgrade-tasks section
is also erased.

Change-Id: I5c9ab55ec6ff332056a426a76e150ea3c9063c6e
2019-11-12 16:33:38 +01:00
Alex Schultz 7906fb43be Drop legacy log folder and readme
We switched to containers a long time ago. This patch drops the
management of a /var/log/<service> directory and the creation of a
readme indicating that we've moved to containers which makes the logging
available under /var/log/containers/<service>

Change-Id: Ia4e991d5d937031ac3312f639b726a944743dd1e
2019-11-04 09:19:07 -07:00
Damien Ciabrini 879657abdd memcached: do not run memcached from a bash process
memcached is run from a bash script that sources various
environment variables from config file. If the container
doesn't use dumb-init, bash is run as pid 1, but in
such case it is unable to catch SIGTERM.

Make the bash script exec into memcached rather than just
spawning memcached as a child. This way, memcached becomes
the pid 1 when dumb-init is not in used. This ensures
that a SIGTERM can be caught when issuing docker/podman
stop.

Change-Id: I15677fcf5ffc3913c1818bae691cc7548be0af0e
Closes-Bug: #1848710
2019-10-18 14:54:59 +02:00
Carlos Camacho 8529ce60da Stop services for unupgraded controllers
Before we start services on upgraded bootstrap
controller (usually controller-0), we need to
stop services on unupgraded controllers
(usually controller-1 and controller-2).

Also we need to move the mysql data transfer
to the step 2 as we need to first stop the
services.

Depends-On: I4fcc0858cac8f59d797d62f6de18c02e4b1819dc
Change-Id: Ib4af5b4a92b3b516b8e2fc1ae12c8d5abe40327f
2019-08-07 19:23:11 +02:00
Jose Luis Franco Arza d1035703b7 Force removal of docker container in tripleo-docker-rm.
The tripleo-docker-rm role has been replaced by tripleo-container-rm [0].
This role will identify the docker engine via the container_cli variable
and perform a deletion of that container. However, these tasks inside the
post_upgrade_tasks section were thought to remove the old docker containers
after upgrading from rocky to stein, in which podman starts to be the
container engine by default.

For that reason, we need to ensure that the container engine in which the
containers are removed is docker, as otherwise we will be removing the
podman container and the deployment steps will fail.

Closes-Bug: #1836531
[0] - 2135446a35

Depends-On: https://review.opendev.org/#/c/671698/
Change-Id: Ib139a1d77f71fc32a49c9878d1b4a6d07564e9dc
2019-07-19 12:37:35 +00:00
Dan Prince a68151d02a Convert Docker*Image parameters
This converts all Docker*Image parameter varients into
Container*Image varients.

The commit was autogenerated with the following shell commands:

for file in $(grep -lr Docker.*Image --include \*.yaml --exclude-dir releasenotes); do
  sed -e "s|Docker\([^ ]*Image\)|Container\1|g" -i $file
done

Change-Id: Iab06efa5616975b99aa5772a65b415629f8d7882
Depends-On: I7d62a3424ccb7b01dc101329018ebda896ea8ff3
Depends-On: Ib1dc0c08ce7971a03639acc42b1e738d93a52f98
2019-06-05 14:33:44 -06:00
Harald Jensås 30708633dc Switch to use $NETWORK_uri for memcached
When passing connection string for memcached the
address must be in brackets if IP version 6 is
used. The $NETWORK_uri provides the ip address
with/whithout brackets depending on ip version.

Related-Bug: #1830406
Depends-On: https://review.opendev.org/661221
Depends-On: https://review.opendev.org/661220
Depends-On: https://review.opendev.org/661299
Depends-On: https://review.opendev.org/661136
Change-Id: If4f32d2d591018c71b2dee9c5898a10d78e47c5e
2019-05-29 19:17:25 +00:00