]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
4 years agotest 6501_2
Guillaume Abrioux [Fri, 7 May 2021 08:21:39 +0000 (10:21 +0200)]
test

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agonfs: get org.ganesha.nfsd.conf from container 6519/head
Guillaume Abrioux [Thu, 6 May 2021 08:10:56 +0000 (10:10 +0200)]
nfs: get org.ganesha.nfsd.conf from container

Since we need to revert 33bfb10, this is an alternative to initial approach.
We can avoid maintaining this file since it is present in container
image. The idea is to simply get it from the image container and write
it to the host.

Fixes: #6501
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoupdate: fix ceph-crash stop task
Guillaume Abrioux [Tue, 4 May 2021 09:42:15 +0000 (11:42 +0200)]
update: fix ceph-crash stop task

This is a workaround for an issue in ansible.
When trying to stop/mask/disable this service in one task, the stop
didn't actually happen, the task doesn't fail but for some reason the
container is still present and running.
Then the task starting the service in the role ceph-crash fails because
it can't start the container since it's already running with the same
name.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955393
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoceph-nfs: fix dev repo task
Guillaume Abrioux [Thu, 29 Apr 2021 07:01:13 +0000 (09:01 +0200)]
ceph-nfs: fix dev repo task

We need to filter with the OS architecture in order to fetch the right
dev repository in shaman

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoceph-osd: allow to use ceph_tcmalloc_max_total_thread_cache for bluestore
Seena Fallah [Wed, 14 Oct 2020 13:00:57 +0000 (16:30 +0330)]
ceph-osd: allow to use ceph_tcmalloc_max_total_thread_cache for bluestore

TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES is for both bluestore and filestore

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
4 years agocephadm_adopt: fix ceph-crash migration
Guillaume Abrioux [Wed, 28 Apr 2021 13:11:25 +0000 (15:11 +0200)]
cephadm_adopt: fix ceph-crash migration

ceph-ansible leaves a ceph-crash container in containerized deployment.
It means we end up with 2 ceph-crash containers running after the
migration playbook is complete.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1954614
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: fix rgw placement task
Guillaume Abrioux [Mon, 26 Apr 2021 14:01:53 +0000 (16:01 +0200)]
cephadm_adopt: fix rgw placement task

Due to a recent breaking change in ceph, this command must be modified
to add the <svc_id> parameter.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: create a 'nfs-ganesha' pool
Guillaume Abrioux [Mon, 26 Apr 2021 07:16:40 +0000 (09:16 +0200)]
cephadm_adopt: create a 'nfs-ganesha' pool

When migrating from a cluster with no MDS nodes deployed,
`{{ cephfs_data_pool.name }}` doesn't exist so we need to create a pool
for storing nfs export objects.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1950403
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agogroup_vars: fix default values
Dimitri Savineau [Thu, 15 Apr 2021 14:24:22 +0000 (10:24 -0400)]
group_vars: fix default values

It looks like the generate_group_vars_sample.sh script wasn't executed
during previous PRs that were modifying the default values.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoceph-defaults: update multisite readme reference
Dimitri Savineau [Thu, 15 Apr 2021 14:20:39 +0000 (10:20 -0400)]
ceph-defaults: update multisite readme reference

The multisite README file has been merged into a single file.

Closes: #6411
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agodocs: update ansible version for master
Dimitri Savineau [Thu, 15 Apr 2021 14:16:31 +0000 (10:16 -0400)]
docs: update ansible version for master

Since 839fac8 we now use ansible 2.10 on the master branch.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoConfig the monitoring stack components api urls using a VIP
Francesco Pantano [Fri, 9 Apr 2021 15:16:03 +0000 (17:16 +0200)]
Config the monitoring stack components api urls using a VIP

When dashboard_frontend_vip is provided, all the services should be
configured using the related VIP. A new VIP variable is added for
both prometheus and alertmanager: we're already able to properly
config the grafana vip using dashboard_frontend_vip variable.
This change adds the same variable for both prometheus and
alertmanager.

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
4 years agotests: run dev_setup.yml on non_container job only
Guillaume Abrioux [Thu, 15 Apr 2021 08:34:39 +0000 (10:34 +0200)]
tests: run dev_setup.yml on non_container job only

There's no need to run this playbook on container jobs.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocore: bump ansible version
Guillaume Abrioux [Thu, 15 Apr 2021 07:32:26 +0000 (09:32 +0200)]
core: bump ansible version

We should consider bumping ansible version for future releases, so let's
start testing against ansible 2.10

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoceph-rgw-loadbalancer: Fix rgw_ports fact
Benoît Knecht [Tue, 13 Apr 2021 11:57:44 +0000 (13:57 +0200)]
ceph-rgw-loadbalancer: Fix rgw_ports fact

The `set_fact rgw_ports` task was failing due to a templating error, because
`hostvars[item].rgw_instances` is a list, but it was treated as if it was a
dictionary.

Another issue was the fact that the `unique` filter only applied to the list
being appended to `rgw_ports` instead of the entire list, which means it was
possible to have duplicate items.

Lastly, `rgw_ports` would have been a list of integers, but the `seport` module
expects a list of strings.

This commit fixes all of the issues above, allowing the `ceph-rgw-loadbalancer`
role to work on systems with SELinux enabled.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
4 years agoswitch-to-containers: only chown corresponding files
Guillaume Abrioux [Fri, 9 Apr 2021 07:24:05 +0000 (09:24 +0200)]
switch-to-containers: only chown corresponding files

When collocating daemons, if we chown all files under `/var/lib/ceph` it
can cause issues for the collocated daemons that wouldn't have been
migrated yet.

This commit makes the playbook chown only the files corresponding to the
daemon being migrated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocontainer/systemd: ensure /var/log/ceph exists
Guillaume Abrioux [Wed, 14 Apr 2021 11:41:59 +0000 (13:41 +0200)]
container/systemd: ensure /var/log/ceph exists

This adds a `ExecStartPre=-/usr/bin/mkdir -p /var/log/ceph` in all
systemd service templates for all ceph daemon.
This is specific to RHCS after a Leapp upgrade is done. Indeed, the
`/var/log/ceph` seems to be removed after the upgrade.
In order to work around this issue let's ensure the directory is present
before trying to start the containers with podman.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1949489
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agofs2bs: add a final play
Guillaume Abrioux [Tue, 13 Apr 2021 12:40:48 +0000 (14:40 +0200)]
fs2bs: add a final play

This removes the fact `skipped_nodes` which is useless when we run with
`--limit` since it gets reset when a new iteration is made.

Instead, let's print within a final play which node has been skipped
reusing the `skip_this_node` fact.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorbdmirror: add retries/until when configuring mirroring
Guillaume Abrioux [Mon, 12 Apr 2021 20:29:50 +0000 (22:29 +0200)]
rbdmirror: add retries/until when configuring mirroring

`configure_mirroring.yml` is called right after the daemon is started.
Sometimes, it can happen the first task in `configure_mirroring.yml` is
run while the daemon isn't yet ready, adding a retries/until on that
task should help to avoid causing the playbook to fail.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944996
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: support nfs-ganesha adoption
Guillaume Abrioux [Tue, 6 Apr 2021 13:07:26 +0000 (15:07 +0200)]
cephadm_adopt: support nfs-ganesha adoption

This commit adds the nfs-ganesha adoption support in the
`cephadm-adopt.yml` playbook.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944504
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agonfs: remove legacy task
Guillaume Abrioux [Fri, 9 Apr 2021 08:02:16 +0000 (10:02 +0200)]
nfs: remove legacy task

This fact is never used, let's remove the task.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agonfs: rename two tasks
Guillaume Abrioux [Fri, 9 Apr 2021 08:01:13 +0000 (10:01 +0200)]
nfs: rename two tasks

set the name of those tasks accordingly with the fact name being set.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: modify placement policy for rgw
Guillaume Abrioux [Tue, 6 Apr 2021 13:43:03 +0000 (15:43 +0200)]
cephadm_adopt: modify placement policy for rgw

the adoption playbook should use `radosgw_num_instances` in order to
determine how much rgw instance it should set recreate.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1943170
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: fix a typo
Guillaume Abrioux [Tue, 30 Mar 2021 12:30:29 +0000 (14:30 +0200)]
cephadm_adopt: fix a typo

This play doesn't nothing else than stopping/removing rgw daemons.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodocker2podman: add documentation/header
Guillaume Abrioux [Mon, 12 Apr 2021 07:25:25 +0000 (09:25 +0200)]
docker2podman: add documentation/header

this adds a small documentation in the header of the playbook in order
to explain what is the goal of this playbook.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodocker2podman: skip some role imports from handler
Guillaume Abrioux [Fri, 9 Apr 2021 09:02:12 +0000 (11:02 +0200)]
docker2podman: skip some role imports from handler

when running docker-to-podman playbook, there's no need to call
`ceph-config` and `ceph-rgw` from the role `ceph-handler`.
It can even have side effects when coming from a baremetal cluster that
was previously migrated using the switch-to-containers playbook. Indeed
it might complain about missing .target systemd unit since they are
removed during that migration.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1944999
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoswitch_to_containers: support iscsigws migration
Guillaume Abrioux [Wed, 7 Apr 2021 12:36:28 +0000 (14:36 +0200)]
switch_to_containers: support iscsigws migration

This adds the iscsigws migration to containers.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=<bz-number>
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocommon: selinux tasks related refactor
Guillaume Abrioux [Thu, 1 Apr 2021 12:37:45 +0000 (14:37 +0200)]
common: selinux tasks related refactor

This moves some task from the `ceph-nfs` role in `ceph-common` since
some of them are needed in `ceph-rgwloadbalancer` role.
This avoids duplicated tasks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorgw-loadbalancers: add all rgw_ports to http_port_t type
Guillaume Abrioux [Thu, 1 Apr 2021 07:50:54 +0000 (09:50 +0200)]
rgw-loadbalancers: add all rgw_ports to http_port_t type

This adds all rgw ports to the http_port_t selinux type so it
allows haproxy to connect to those ports in order to avoid AVC.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1923890
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorgw-loadbalancer: Update haproxy.cfg.j2
kalebskeithley [Tue, 9 Mar 2021 21:10:35 +0000 (16:10 -0500)]
rgw-loadbalancer: Update haproxy.cfg.j2

haproxy gets an AVC when configured to connect to port 8081

This commit adds a snippet regarding haproxy in a selinux environment

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1923890
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
4 years agocontainer/registry: use password from stdin
Dimitri Savineau [Tue, 12 Jan 2021 19:29:58 +0000 (14:29 -0500)]
container/registry: use password from stdin

Pass the password variable via stdin for the registry login
authentication.
This allows to remove the no_log statement and see the task output
without displaying the password value.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agonfs: set idmap config for Ceph-NFS
Guillaume Abrioux [Fri, 12 Mar 2021 15:27:12 +0000 (16:27 +0100)]
nfs: set idmap config for Ceph-NFS

Currently NFS Ganesha (ceph-nfs) consumes /etc/idmapd.conf, which
controls mapping of user/owner identities under NFSv4+. With
containerized service deployment, this file is an immutable part of the
container image and cannot be modified.

Here we provide group variables, and a taskk and templates for the
ceph-nfs role, to set the path of the idmap configuration file and
to make the most common adjustment to the contents of that file --
namely to set the 'Domain'. We default the path to /etc/ganesha/idmap.conf
so that we will not conflict with /etc/idmapd.conf on the controller nodes
where ganesha runs. NFSv4 clients, as used for example by the Cinder NFS
driver, consume /etc/idmapd.conf and may require different settings than
what is wanted for NFS Ganesha. Additionally, because we already bind
/etc/ganesha from the host into the ceph-nfs container, the file NFS
Ganesha consumes will no longer be an immutable part of the container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1925646
Signed-off-by: Tom Barron tpb@dyncloud.net
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodashboard: support prometheus storage.tsdb.retention.time parameter
Guillaume Abrioux [Tue, 30 Mar 2021 07:49:10 +0000 (09:49 +0200)]
dashboard: support prometheus storage.tsdb.retention.time parameter

This commit adds the parameter `--storage.tsdb.retention.time` to the
prometheus systemd unit template.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1928000
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorgw: supports pg_autoscale_mode option for pool creation
Guillaume Abrioux [Fri, 26 Mar 2021 16:03:44 +0000 (17:03 +0100)]
rgw: supports pg_autoscale_mode option for pool creation

Support enabling/disabling the pg autoscaler for rgw pools.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodefaults: add a comment about `igw_network`
Guillaume Abrioux [Fri, 26 Mar 2021 17:05:48 +0000 (18:05 +0100)]
defaults: add a comment about `igw_network`

This add a quick documentation in ceph-defaults about `igw_network`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocommon,iscsi: don't use the shaman search endpoint
Dimitri Savineau [Fri, 26 Mar 2021 19:14:15 +0000 (15:14 -0400)]
common,iscsi: don't use the shaman search endpoint

In commits 39649f0 and bf8cdad we switch from using the shaman /repos endpoint
to the /search endpoint for using the architecture filter.
In fact that filter is also available with the /repos endpoint, which requires
less ansible tasks.

This also adds back a condition remove in 5801171 on the ceph-iscsi
repository and that repository doesn't need to filter on the architecture
because the ceph-iscsi project is noarch.
Both ceph-iscsi and tcmu-runner shaman URLs were using the ceph_dev_branch
and ceph_dev_sha1 variables which doesn't make sense. Those variables are
only useful for the ceph core repository.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoupdate: followup on 07029e1
Guillaume Abrioux [Fri, 26 Mar 2021 15:12:42 +0000 (16:12 +0100)]
update: followup on 07029e1

Playbook must fail anyway, the `rescue` block has been introduced for
unmasking the unit after the playbook has failed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodashboard: support igw nodes with dedicated subnet
Guillaume Abrioux [Tue, 2 Mar 2021 08:51:26 +0000 (09:51 +0100)]
dashboard: support igw nodes with dedicated subnet

This adds the possibility to deploy the dashboard with igw nodes using
a dedicated subnet.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1926170
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoPeer addition won't be skipped if remote is not in peer
VasishtaShastry [Wed, 24 Mar 2021 15:47:56 +0000 (21:17 +0530)]
Peer addition won't be skipped if remote is not in peer
rbd-mirroring is not configured as adding peer is getting skipped.
Peer addition should not get skipped if its not added already

Closes - https://bugzilla.redhat.com/show_bug.cgi?id=1942444

Signed-off-by: VasishtaShastry <vipin.indiasmg@gmail.com>
4 years agodocs: rgw multisite docs with new rgw_instances config
Ali Maredia [Mon, 25 Jan 2021 06:33:54 +0000 (01:33 -0500)]
docs: rgw multisite docs with new rgw_instances config

Docs reflect that each instance of `rgw_instances`
can now take rgw_zonemaster, rgw_zonesecondary,
rgw_zonegroupmaster, rgw_multisite_proto.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
4 years agoREADME-MULTISITE: fix typos
Ken Dreyer [Wed, 24 Mar 2021 20:44:52 +0000 (14:44 -0600)]
README-MULTISITE: fix typos

This commit fixes some typos in MULTISITE documentation.

Signed-off-by: Ken Dreyer <ktdreyer@redhat.com>
4 years agoconvert some missed `ansible_*`` calls to `ansible_facts['*']`
Guillaume Abrioux [Thu, 25 Mar 2021 02:47:40 +0000 (03:47 +0100)]
convert some missed `ansible_*`` calls to `ansible_facts['*']`

This converts some missed calls to `ansible_*` that were missed in
initial PR #6312

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocore: refactor code quality issues
Aksh Gupta [Fri, 19 Mar 2021 18:45:26 +0000 (18:45 +0000)]
core: refactor code quality issues

The following commit fixes a few code quality issues detected by DeepSource:
- Use literals instead of function calls to create data structure.
- Refactor unnecessary list comprehension.
- Simplify if statement.
- Refactor useless else block in the loop.

Signed-off-by: Aksh Gupta <akshgpt7@gmail.com>
4 years agolibrary: drop ceph_facts
Guillaume Abrioux [Thu, 25 Mar 2021 02:49:11 +0000 (03:49 +0100)]
library: drop ceph_facts

This is never called in the playbook and seems unmaintained.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoDisable facts by default in ansible.cfg
Alex Schultz [Thu, 11 Mar 2021 15:43:53 +0000 (08:43 -0700)]
Disable facts by default in ansible.cfg

As a continuation of a7f2fa73e63e69dba2e41aaac9732397eec437c9, this
change switches fact injection to off by default in the provided
ansible.cfg.

Signed-off-by: Alex Schultz <aschultz@redhat.com>
4 years agomain: use `ansible_facts` for `architecture`
Guillaume Abrioux [Wed, 24 Mar 2021 08:29:28 +0000 (09:29 +0100)]
main: use `ansible_facts` for `architecture`

commit f6a0e95e51798316fce5e82b2463ff62396a681a reverted the change made
by a7f2fa73e63e69dba2e41aaac9732397eec437c9.

This commit bring back this change.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: switch to quay.ceph.io for dashboard images
Guillaume Abrioux [Tue, 23 Mar 2021 13:49:30 +0000 (14:49 +0100)]
tests: switch to quay.ceph.io for dashboard images

for some reason, `quay.io/app-sre/grafana` no longer exist.
as a workaround, all dashboard related images have been mirrored on
quay.ceph.io.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoiscsi: fetch right repo from shaman
Guillaume Abrioux [Tue, 23 Mar 2021 10:25:51 +0000 (11:25 +0100)]
iscsi: fetch right repo from shaman

due to recent changes in shaman, we must fetch the right repo by
filtering on the desired architecture.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: fix `test_rgw_is_up` test
Guillaume Abrioux [Tue, 23 Mar 2021 08:04:51 +0000 (09:04 +0100)]
tests: fix `test_rgw_is_up` test

The data structure seems to have been modified in ceph@master (quincy).

This commit update the test accordingly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: fix `test_nfs_is_up` test
Guillaume Abrioux [Mon, 22 Mar 2021 16:54:27 +0000 (17:54 +0100)]
tests: fix `test_nfs_is_up` test

the data structure seems to have been modified in ceph@master (quincy).

This commit update the test accordingly.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoceph_volume: fix bug in `is_lv()`
Guillaume Abrioux [Mon, 22 Mar 2021 13:46:55 +0000 (14:46 +0100)]
ceph_volume: fix bug in `is_lv()`

This function makes the `ceph_volume` module be not idempotent in
containerized context because it tries to run a container and bindmount
directories that no longer exist.

In that case, the `lvs` command being executed returns something
different than `0` so we can't call `json.loads(out)['report'][0]['lv']`
since it might throw an python error.

The idea is to return `True` only if `rc` is equal to `0` and
`len(result)` is greater than `0`, which means the command matched an
LV.

Fixes: #6284
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoMake sure the repo url contains the correct arch
Brad Hubbard [Fri, 19 Mar 2021 04:11:42 +0000 (14:11 +1000)]
Make sure the repo url contains the correct arch

We can end up with an arm only repo unless we are specific about the
architecture we require. Brings the deb code in line with the rpm
equivalent.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
4 years agogithub: use actions/stale
Guillaume Abrioux [Mon, 22 Mar 2021 08:29:53 +0000 (09:29 +0100)]
github: use actions/stale

This commit replaces the current stale bot which seems to be broken with
the github actions/stale one.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agofix 'command -v' tasks
Guillaume Abrioux [Thu, 18 Mar 2021 10:36:59 +0000 (11:36 +0100)]
fix 'command -v' tasks

`command -v` is a bash script which needs a shell to run.

Fixes: #6325
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorolling_update: unmask monitor service after a failure
Guillaume Abrioux [Thu, 18 Mar 2021 08:08:51 +0000 (09:08 +0100)]
rolling_update: unmask monitor service after a failure

if for some reason the playbook fails after the service was
stopped, disabled and masked and before it got restarted, enabled and
unmasked, the playbook leaves the service masked and which can make users
confused and forces them to unmask the unit manually.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1917680
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm_adopt: fetch and write ceph minimal config
Guillaume Abrioux [Wed, 17 Mar 2021 09:07:27 +0000 (10:07 +0100)]
cephadm_adopt: fetch and write ceph minimal config

This commit makes the playbook fetch the minimal current ceph
configuration and write it later on monitoring nodes so `cephadm` can
proceed with the adoption.
When a monitoring stack was deployed on a dedicated node, it means no
`ceph.conf` file was written, `cephadm` requires a `ceph.conf` in order
to adopt the daemon present on the node.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1939887
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agofacts: fix nfs/external cluster scenario
Guillaume Abrioux [Tue, 16 Mar 2021 13:13:13 +0000 (14:13 +0100)]
facts: fix nfs/external cluster scenario

These tasks shouldn't be run when at least 1 monitor isn't present in
the inventory.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1937997
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoadopt: convert legacy grafana-server groupname early
Guillaume Abrioux [Tue, 16 Mar 2021 15:33:27 +0000 (16:33 +0100)]
adopt: convert legacy grafana-server groupname early

This is a follow up on PR #6332

cephadm-adopt.yml playbook is affected by the same bug

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1938658
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoRevert "tests: disable nfs testing on master"
Guillaume Abrioux [Wed, 17 Mar 2021 10:45:54 +0000 (11:45 +0100)]
Revert "tests: disable nfs testing on master"

This reverts commit 8372b6792fb94bd7e333ac8017ffca0f139702c7.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agovalidate: followup on 98e32b9
Guillaume Abrioux [Wed, 17 Mar 2021 08:39:54 +0000 (09:39 +0100)]
validate: followup on 98e32b9

update the message accordingly to the check updated in
commit 98e32b92f30c4e234f51f8f3d29e932764405e25

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoclients: build filtered clients group early
Guillaume Abrioux [Tue, 16 Mar 2021 13:51:06 +0000 (14:51 +0100)]
clients: build filtered clients group early

when the group `_filtered_clients` is built, the order can change from
the original `clients` group which can cause issues since we run
`ceph-container-engine` on the first client only. It means later in the
playbook we can make call to the container CLI on a node where the
container engine wasn't installed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: remove 1 client VM in external_clients job
Guillaume Abrioux [Tue, 16 Mar 2021 14:39:10 +0000 (15:39 +0100)]
tests: remove 1 client VM in external_clients job

We only use 2 client in this scenario, there's no need to fire up a
third VM.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: disable nfs testing on master
Guillaume Abrioux [Tue, 16 Mar 2021 09:37:37 +0000 (10:37 +0100)]
tests: disable nfs testing on master

nfs-ganesha builds in shaman are broken.
This commit disables nfs-ganesha testing in order to unlock the CI.

This is a temporary commit intented to be reverted.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agovalidate: update `ceph_repository_community` check
Guillaume Abrioux [Mon, 15 Mar 2021 18:53:21 +0000 (19:53 +0100)]
validate: update `ceph_repository_community` check

this updates the `ceph_repository_community` check in `ceph-validate`
with the right ceph release expected.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agonfs: bump nfs-ganesha version
Guillaume Abrioux [Mon, 15 Mar 2021 17:18:43 +0000 (18:18 +0100)]
nfs: bump nfs-ganesha version

This commit updates the default version of nfs-ganesha to V3.5 which is the
latest version available upstream.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoupdate: convert legacy grafana-server groupname early
Guillaume Abrioux [Fri, 12 Mar 2021 08:26:16 +0000 (09:26 +0100)]
update: convert legacy grafana-server groupname early

If the legacy name `grafana-server` is still being used when upgrading
from Nautilus to Pacific, the task that sets the fact `rolling_update`
to `true` doesn't run on the node(s) included in that group. Indeed the
play where we set this fact (`rolling_update`) only runs on the group
`monitoring_group_name | default('monitoring')`.
As a workaround, we can run earlier the task which converts the
`grafana-server` group name to `monitoring`.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1935554
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoconfig: reset num_osds
Guillaume Abrioux [Fri, 12 Mar 2021 14:49:15 +0000 (15:49 +0100)]
config: reset num_osds

When collocating OSDs with other daemon, `num_osds` is incorrectly calculated
because `ceph-config` is called multiple times.

Indeed, the following code:
```
num_osds: "{{ lvm_list.stdout | default('{}') | from_json | length | int + num_osds | default(0) | int }}"
```

makes `num_osds` be incremented each time `ceph-config` is called.

We have to reset it in order to get the correct number of expected OSDs.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agolibrary: add realm pull to radosgw_realm module
Dimitri Savineau [Mon, 25 Jan 2021 23:06:03 +0000 (18:06 -0500)]
library: add realm pull to radosgw_realm module

This adds the realm pull operation to the current radosgw_realm module.
The pull operation requires the url, access/secret key variables.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoceph-mon: Fix check mode for deploy monitor tasks
Benoît Knecht [Mon, 19 Oct 2020 09:23:59 +0000 (11:23 +0200)]
ceph-mon: Fix check mode for deploy monitor tasks

Skip the `get initial keyring when it already exists` task when both commands
whose `stdout` output it requires have been skipped (e.g. when running in check
mode).

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
4 years agostalebot: update config
Guillaume Abrioux [Fri, 12 Mar 2021 08:42:25 +0000 (09:42 +0100)]
stalebot: update config

This decreases the number of days of inactivity before an issue becomes
sstale.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodocs: Update URL to LVM batch
Kai Stian Olstad [Wed, 10 Mar 2021 08:39:33 +0000 (09:39 +0100)]
docs: Update URL to LVM batch

Signed-off-by: Kai Stian Olstad <kai.stian.olstad@gmail.com>
4 years agodocs: Document the prepare_osd tag
Matthew Vernon [Wed, 10 Mar 2021 16:39:03 +0000 (16:39 +0000)]
docs: Document the prepare_osd tag

There are times where being able to skip OSD creation is useful to the
admin (see #1777 for example), and skipping the prepare_osd tag is a
way to achieve this. Document this fact.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
4 years agoceph-osd: add prepare_osd tag to lvm-batch scenario
Matthew Vernon [Wed, 10 Mar 2021 16:36:52 +0000 (16:36 +0000)]
ceph-osd: add prepare_osd tag to lvm-batch scenario

Sometimes it's useful to be able to skip the OSD creation step when
running ceph-ansible (cf #1777). The lvm scenario has a prepare_osd
tag on the relevant play. This commit adds the same tag to the
lvm-batch scenario.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
4 years agoDocs: fix some typos
Matthew Vernon [Wed, 10 Mar 2021 16:53:45 +0000 (16:53 +0000)]
Docs: fix some typos

While working on the previous PR, I found a couple of typos in the
docs. This fixes those.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
4 years agoUse ansible_facts
Alex Schultz [Wed, 3 Mar 2021 14:43:50 +0000 (07:43 -0700)]
Use ansible_facts

It has come to our attention that using ansible_* vars that are
populated with INJECT_FACTS_AS_VARS=True is not very performant.  In
order to be able to support setting that to off, we need to update the
references to use ansible_facts[<thing>] instead of ansible_<thing>.

Related: ansible#73654
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1935406
Signed-off-by: Alex Schultz <aschultz@redhat.com>
4 years agotests: increase nb of rerun in pytest
Guillaume Abrioux [Wed, 3 Mar 2021 07:51:25 +0000 (08:51 +0100)]
tests: increase nb of rerun in pytest

In order to avoid false positive in the CI that I've been unable to
reproduce.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoFix typo and broken link for documenting RGW frontends
Matthew Vernon [Mon, 22 Feb 2021 14:26:10 +0000 (14:26 +0000)]
Fix typo and broken link for documenting RGW frontends

http://docs.ceph.com/docs/nautilus/radosgw/frontends/ 404s so replace
it with a working "latest" docs link, and correct the spelling of
"additional" while I'm at it.

Signed-off-by: Matthew Vernon <mv3@sanger.ac.uk>
4 years agodashboard: add missing parameter in `ceph_cmd`
Guillaume Abrioux [Mon, 1 Mar 2021 14:22:22 +0000 (15:22 +0100)]
dashboard: add missing parameter in `ceph_cmd`

the `ceph_cmd` fact is missing the `--net=host` parameter.

Some tasks consuming this fact can fail like following:

```
Error: error configuring network namespace for container b8ec913db1fb694ae683faf202680de7a59c714a004e533aba87e8503d29261f: Missing CNI default network
```

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1931365
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodefaults: update rhcs dashboard images versions
Guillaume Abrioux [Wed, 17 Feb 2021 03:22:34 +0000 (04:22 +0100)]
defaults: update rhcs dashboard images versions

The current dashboard images deployed have a bad health index.
Updating to a newer version fixes this issue.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1925350
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorequirements.txt: Move the six dependency into the general requirements
Florian Haas [Fri, 12 Feb 2021 08:29:00 +0000 (09:29 +0100)]
requirements.txt: Move the six dependency into the general requirements

config_template.py depends on six, which isn't listed in the default
requirements.txt. This previously frequently wasn't a problem, because
six used to be a standard package being installed into a venv, and
lots of other projects depended on it.

It also does get installed for unit and integration tests via
tests/requirements.txt, so any broken dependency on six wouldn't be
detected by tox runs.

However, as other projects and distributions have phased out Python
2.7 support the dependency on six becomes less common. Thus, as long
as ceph-ansible does require it for config_template.py, add it to the
base requirements.

Signed-off-by: Florian Haas <florian@citynetwork.eu>
4 years agolibrary: do not always add --yes in batch mode
Guillaume Abrioux [Tue, 9 Feb 2021 14:28:08 +0000 (15:28 +0100)]
library: do not always add --yes in batch mode

When asking `ceph-volume` to report only in `lvm batch` context, there's
a bug described in bz1896803 [1] when `--yes` is passed (which by the
way isn't necessary with `--report`).
This commit ensure `--yes` isn't passed to `ceph-volume` when `--report`
is used.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1896803

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1896803
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoAdd quincy release
Dimitri Savineau [Mon, 1 Feb 2021 22:39:07 +0000 (17:39 -0500)]
Add quincy release

Add the 17th ceph release: quincy.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agopurge: rm service-cid files
Guillaume Abrioux [Tue, 2 Feb 2021 20:22:50 +0000 (21:22 +0100)]
purge: rm service-cid files

This commit makes sure purge playbooks remove those file if for any reason they
have been left.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1920900
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agoswitch2container: do not serialize the ceph-crash migration
Guillaume Abrioux [Thu, 11 Feb 2021 15:28:31 +0000 (16:28 +0100)]
switch2container: do not serialize the ceph-crash migration

There's no need to slow down the playbook execution time by migrating
all the `ceph-crash` instances in a serial way. Let's remove the
`serial: 1` so the migration is achieved in a parallel way.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: increase `mon_max_pg_per_osd`
Guillaume Abrioux [Wed, 10 Feb 2021 14:49:38 +0000 (15:49 +0100)]
tests: increase `mon_max_pg_per_osd`

we aren't deploying enough OSD daemon, so it fails like following:

```
  stderr: 'Error ERANGE: pool id 10 pg_num 256 size 2 would mean 1536 total pgs, which exceeds max 1500 (mon_max_pg_per_osd 250 * num_in_osds 6)'
```

Let's increase the value of `mon_max_pg_per_osd` in order to get around
this issue in the CI.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agodoc: add a note about "latest" tags
Guillaume Abrioux [Thu, 11 Feb 2021 12:58:27 +0000 (13:58 +0100)]
doc: add a note about "latest" tags

See the change for details.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agomergify: add stable-6.0 backport configuration v7.0.0alpha1
Guillaume Abrioux [Wed, 10 Feb 2021 13:53:47 +0000 (14:53 +0100)]
mergify: add stable-6.0 backport configuration

This adds the stable-6.0 backport configuration in mergify.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agocephadm-adopt: remove prometheus workaround v6.0.0
Dimitri Savineau [Thu, 21 Jan 2021 20:26:09 +0000 (15:26 -0500)]
cephadm-adopt: remove prometheus workaround

This was fixed by [1][2]

[1] https://tracker.ceph.com/issues/45120
[2] https://github.com/ceph/ceph/commit/252d4b30

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agodoc: update containerized deployment
Dimitri Savineau [Tue, 26 Jan 2021 19:03:27 +0000 (14:03 -0500)]
doc: update containerized deployment

This adds more documentation to the configuration and usage of
containerizerd deployment.

Closes: #6198
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agodoc: update the documentation
Guillaume Abrioux [Wed, 10 Feb 2021 12:47:21 +0000 (13:47 +0100)]
doc: update the documentation

- mention `stable-6.0` requirements.
- update some patterns.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorolling_update: enforce ceph-container-engine
Dimitri Savineau [Wed, 3 Feb 2021 22:39:49 +0000 (17:39 -0500)]
rolling_update: enforce ceph-container-engine

When running the rolling_update.yml playbook and adding the dashboard
component in the same time then the requirement (like container packages)
aren't installed.
This could lead to a failure in case of using authentication on the
container registry because the playbook will try to login on the registry
but podman/docker aren't yet installed.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1903504
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1918650
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoceph-common: enable rhcs tools repo for monitoring
Dimitri Savineau [Wed, 3 Feb 2021 15:28:24 +0000 (10:28 -0500)]
ceph-common: enable rhcs tools repo for monitoring

The monitoring node running grafana needs the rhcs tools repostory
enabled in non containerized deployment to be able to install the
ceph-grafana-dashboards rpm package.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1918650
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agotests: pin ansible-lint version
Guillaume Abrioux [Wed, 10 Feb 2021 06:41:43 +0000 (07:41 +0100)]
tests: pin ansible-lint version

This commit pins the ansible-lint version to 4.3.7 as ceph-ansible isn't
compatible with recent changes in 5.0.0

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agotests: set `mon_max_pg_per_osd` in rgw_multisite
Guillaume Abrioux [Tue, 9 Feb 2021 14:50:43 +0000 (15:50 +0100)]
tests: set `mon_max_pg_per_osd` in rgw_multisite

Otherwise, the job fails when it tries to create a bucket with `s3cmd mb`
command because we have too many PGs per OSD.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorgw: fix a typo in multisite
Guillaume Abrioux [Thu, 4 Feb 2021 16:45:05 +0000 (17:45 +0100)]
rgw: fix a typo in multisite

if `rgw_zonegroupmaster` is not defined at the rgw instance level in
`rgw_instances` it will fallback to a wrong variable (`rgw_zonemaster`).

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1925247
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
4 years agorolling_update: exclude clients from node-exporter
Dimitri Savineau [Wed, 3 Feb 2021 18:07:24 +0000 (13:07 -0500)]
rolling_update: exclude clients from node-exporter

Since b105549 we don't install node-exporter on client nodes so we should
also exclude the client node from the node-exporter upgrade.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agodocs: nautilus uses ansible 2.9
Dimitri Savineau [Thu, 28 Jan 2021 20:28:14 +0000 (15:28 -0500)]
docs: nautilus uses ansible 2.9

This updates the ansible release required to deploy nautilus with the
stable-4.0 branch.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agodashboard: update with the new monitoring group
Dimitri Savineau [Wed, 3 Feb 2021 17:59:14 +0000 (12:59 -0500)]
dashboard: update with the new monitoring group

Since eefe11d the grafana-server group has been renamed to monitoring
but the dashboard playbook wasn't updated.
This was still working due to the backward compatibility added in the
ceph-facts role.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agovagrant: remove centos/8 workaround
Dimitri Savineau [Thu, 4 Feb 2021 22:10:20 +0000 (17:10 -0500)]
vagrant: remove centos/8 workaround

The CentOS 8 vagrant box has finally been updated [1] with a recent
version (the latest one 2011 which means CentOS 8.3).
We don't need to download the vagrant libvirt box with a direct url
anymore from the CentOS infrastructure.

[1] https://app.vagrantup.com/centos/boxes/8

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agoupdate: update ceph release pattern in complete upgrade play
Guillaume Abrioux [Fri, 5 Feb 2021 21:27:38 +0000 (22:27 +0100)]
update: update ceph release pattern in complete upgrade play

since master is now deploying quincy, we must update this.
Otherwise, it will fail like following:

```
Error EPERM: require_osd_release cannot be lowered once it has been set
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>