]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
6 years agoFix CNI error when net=host is not used on OSD calls
John Fulton [Tue, 5 Feb 2019 20:28:37 +0000 (15:28 -0500)]
Fix CNI error when net=host is not used on OSD calls

Follow up fix that 410abd7 missed.

Related: ceph#3561

Signed-off-by: John Fulton <fulton@redhat.com>
6 years agoCreate Ceph Initial Dirs earlier
John Fulton [Mon, 4 Feb 2019 23:21:42 +0000 (23:21 +0000)]
Create Ceph Initial Dirs earlier

Include tasks from create_ceph_initial_dirs earlier during
ceph config role.

Fixes: #3568
Signed-off-by: John Fulton <fulton@redhat.com>
6 years agoFix CNI error when net=host is not used in some podman calls
John Fulton [Thu, 31 Jan 2019 21:17:20 +0000 (16:17 -0500)]
Fix CNI error when net=host is not used in some podman calls

With 'podman version 1.0.0' on RHEL8 beta the 'get ceph version' and
'ceph monitor mkfs' commands fail [1] with "error configuring network
namespace for container Missing CNI default network".

When net=host is added these errors are resolved. net=host is used in
many other calls (grep -R net=host | wc -l --> 38).

Fixes: #3561
Signed-off-by: John Fulton <fulton@redhat.com>
(cherry picked from commit 410abd77455a92a85f0674577e22af0af894964f)

6 years agosite-container: import role ceph-facts
Guillaume Abrioux [Tue, 5 Feb 2019 15:17:08 +0000 (16:17 +0100)]
site-container: import role ceph-facts

when ceph-container-common notifies handlers because a new container
image has been pulled, ceph-handler will throw an error because of
undefined variables since they are set in ceph-facts role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoset RuntimeDirectory in all systemd unit templates
Guillaume Abrioux [Tue, 5 Feb 2019 13:19:20 +0000 (14:19 +0100)]
set RuntimeDirectory in all systemd unit templates

/var/run/ceph resides in a non persistent filesystem (tmpfs)
After a reboot, all daemons won't start because this directory will be
missing.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: increase amount of memory for all vms
Guillaume Abrioux [Tue, 5 Feb 2019 08:49:50 +0000 (09:49 +0100)]
tests: increase amount of memory for all vms

double the amount of memory from 512m to 1024m.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoosd: bind mount /var/run/udev/
Guillaume Abrioux [Tue, 5 Feb 2019 08:25:20 +0000 (09:25 +0100)]
osd: bind mount /var/run/udev/

without this, the command `ceph-volume lvm list --format json` hangs and
takes a very long time to complete.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: remove useless test
Guillaume Abrioux [Mon, 4 Feb 2019 15:58:05 +0000 (16:58 +0100)]
tests: remove useless test

`test_mon_host_line_has_correct_value()` will cover this test in
anycase. It doesn't worth to have a dedicated test for this.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: update test_mon_host_line_has_correct_value()
Guillaume Abrioux [Mon, 4 Feb 2019 15:14:37 +0000 (16:14 +0100)]
tests: update test_mon_host_line_has_correct_value()

since msgr2 introduction, this test must be updated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: add a rhel8 scenario testing
Guillaume Abrioux [Wed, 30 Jan 2019 13:16:19 +0000 (14:16 +0100)]
tests: add a rhel8 scenario testing

test upstream with rhel8 vagrant image

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agofacts: set timeout_command fact in ceph-defaults
Guillaume Abrioux [Fri, 1 Feb 2019 14:08:53 +0000 (15:08 +0100)]
facts: set timeout_command fact in ceph-defaults

- also add `--foreground` which seems to fix some issue we are facing when
using timeout with `podman`.
- use this fact in the `is ceph running already?` task.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agopodman: support podman installation on rhel8
Guillaume Abrioux [Wed, 16 Jan 2019 09:27:23 +0000 (10:27 +0100)]
podman: support podman installation on rhel8

Add required changes to support podman on rhel8

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1667101
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoansible.cfg: change log_path to directory used by fact_caching_connection
Patrick C. F. Ernzer [Wed, 16 Jan 2019 22:40:27 +0000 (23:40 +0100)]
ansible.cfg: change log_path to directory used by fact_caching_connection

Since fact_caching_connection uses a directory in $HOME already, write the
ansible.log to the same directory.

Fixes: #3509
Signed-off-by: Patrick C. F. Ernzer <pcfe@redhat.com>
6 years agoMake python print statements python3 compatible
John Fulton [Fri, 1 Feb 2019 13:32:14 +0000 (08:32 -0500)]
Make python print statements python3 compatible

The restart_osd_daemon.sh generated from the j2 template
contains a python call which uses 'print x' instead of
'print(x)'. Add the missing parentheses to make this call
compatible with both 2 and 3.

Also add parentheses to other python print calls found
in roles/ceph-client/defaults/main.yml and
infrastructure-playbooks/cluster-os-migration.yml.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1671721
Signed-off-by: John Fulton <fulton@redhat.com>
6 years agotests: do not run lvm_setup.yml on lvm_auto_discovery tests
Andrew Schoen [Thu, 31 Jan 2019 20:33:31 +0000 (14:33 -0600)]
tests: do not run lvm_setup.yml on lvm_auto_discovery tests

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agoceph-config: do not always assume containers when calculating num_osds
Andrew Schoen [Thu, 31 Jan 2019 19:38:53 +0000 (13:38 -0600)]
ceph-config: do not always assume containers when calculating num_osds

CEPH_CONTAINER_IMAGE should be None if containerized_deployment
is False.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agotests: fix Vagrantfile symlink for lvm-auto-discovery tests
Andrew Schoen [Thu, 31 Jan 2019 16:38:20 +0000 (10:38 -0600)]
tests: fix Vagrantfile symlink for lvm-auto-discovery tests

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agodocs: using osd_auto_discovery and osd_scenario lvm
Andrew Schoen [Thu, 10 Jan 2019 19:25:03 +0000 (13:25 -0600)]
docs: using osd_auto_discovery and osd_scenario lvm

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agotests: adds the lvm_auto_discovery container testing scenario
Andrew Schoen [Thu, 10 Jan 2019 19:20:32 +0000 (13:20 -0600)]
tests: adds the lvm_auto_discovery container testing scenario

This tests osd_auto_discovery: True, containerized_deployment: True
and the lvm osd scenario

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agotests: create as many drives for virtualbox as libvirt
Andrew Schoen [Thu, 10 Jan 2019 19:06:17 +0000 (13:06 -0600)]
tests: create as many drives for virtualbox as libvirt

This just ensures that virtualbox and libvirt are making
the same amount of devices for tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agotests: adds the lvm_auto_discovery scenario
Andrew Schoen [Thu, 10 Jan 2019 19:05:56 +0000 (13:05 -0600)]
tests: adds the lvm_auto_discovery scenario

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agoceph-facts: generate devices when osd_auto_discovery is true
Andrew Schoen [Thu, 10 Jan 2019 17:26:19 +0000 (11:26 -0600)]
ceph-facts: generate devices when osd_auto_discovery is true

This task used to live in ceph-osd, but we need it defined here to that
ceph-config can use it when trying to determine the number of osds.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agovalidate: do not validate lvm config if osd_auto_discovery is true
Andrew Schoen [Thu, 10 Jan 2019 17:22:53 +0000 (11:22 -0600)]
validate: do not validate lvm config if osd_auto_discovery is true

If osd_auto_discovery is set with the lvm scenario it's expected for
lvm_volumes and devices to be empty.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agotests: ensure iptables rule is inserted for rgw_multisite job
Guillaume Abrioux [Fri, 1 Feb 2019 08:10:56 +0000 (09:10 +0100)]
tests: ensure iptables rule is inserted for rgw_multisite job

wip

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: run dev_setup and lvm_setup on secondary cluster for rgw_multisite
Guillaume Abrioux [Thu, 31 Jan 2019 15:58:01 +0000 (16:58 +0100)]
tests: run dev_setup and lvm_setup on secondary cluster for rgw_multisite

Otherwise, the deployment of the second cluster fails.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoDo not timeout podman/docker pull if timeout value is '0'
John Fulton [Wed, 30 Jan 2019 20:06:55 +0000 (15:06 -0500)]
Do not timeout podman/docker pull if timeout value is '0'

If user sets "docker_pull_timeout: '0'" then do not use the
timeout command when running podman/docker pull. Also, use
"timeout -s KILL"; without KILL, podman on RHEL8 beta does
not timeout and deployment can hang.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1670625
Signed-off-by: John Fulton <fulton@redhat.com>
6 years agoconfig: support num_osds fact setting in containerized deployment
Guillaume Abrioux [Wed, 30 Jan 2019 23:07:30 +0000 (00:07 +0100)]
config: support num_osds fact setting in containerized deployment

This part of the code must be supported in containerized deployment

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1664112
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: add missing hosts file for ubuntu testing
Guillaume Abrioux [Wed, 30 Jan 2019 22:01:20 +0000 (23:01 +0100)]
tests: add missing hosts file for ubuntu testing

we need it for dev-ubuntu-container-all_daemons job

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: do not deploy iscsigw node on ubuntu
Guillaume Abrioux [Wed, 30 Jan 2019 21:58:01 +0000 (22:58 +0100)]
tests: do not deploy iscsigw node on ubuntu

iSCSI gateways can only be deployed on Red Hat OS family.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: run lvm_setup.yml only when osd_scenario is lvm
Guillaume Abrioux [Wed, 30 Jan 2019 21:42:42 +0000 (22:42 +0100)]
tests: run lvm_setup.yml only when osd_scenario is lvm

especially for ooo_collocation scenario which is still using ceph-disk
testing.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoInstall nfs-ganesha stable v2.7
Ramana Raja [Fri, 25 Jan 2019 10:15:21 +0000 (15:45 +0530)]
Install nfs-ganesha stable v2.7

nfs-ganesha v2.5 and 2.6 have hit EOL. Install nfs-ganesha v2.7
stable that is currently being maintained.

Signed-off-by: Ramana Raja <rraja@redhat.com>
6 years agocommon: clean monitor initial keyring code
Guillaume Abrioux [Thu, 10 Jan 2019 13:08:42 +0000 (14:08 +0100)]
common: clean monitor initial keyring code

let's not be blocked by the fact we don't have the initial keyring in
`{{ fetch_directory }}`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agofacts: clean fsid generation code
Guillaume Abrioux [Tue, 8 Jan 2019 09:57:51 +0000 (10:57 +0100)]
facts: clean fsid generation code

clean some leftover and duplicate code.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agodo not set ceph_release to dummy
Patrick Donnelly [Sun, 27 Jan 2019 05:11:41 +0000 (21:11 -0800)]
do not set ceph_release to dummy

When we're deploying a dev branch.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agotests: do not play dev_setup on containerized deployment
Guillaume Abrioux [Tue, 29 Jan 2019 11:16:28 +0000 (12:16 +0100)]
tests: do not play dev_setup on containerized deployment

using `!` mark in tox.ini doesn't work on comma separated list.
The idea here is to skip all containerized scenario in dev_setup.yml and
use the `!` for the update scenario.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: update envlist
Guillaume Abrioux [Mon, 28 Jan 2019 12:16:26 +0000 (13:16 +0100)]
tests: update envlist

- switch_to_containers, ooo_collocation, podman should be able to specify
which os they are running on.
- those scenarios are only container scenario.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agouse shortname in keyring path
Patrick Donnelly [Sat, 26 Jan 2019 02:48:28 +0000 (18:48 -0800)]
use shortname in keyring path

socket.gethostname may return a FQDN. Problem found in Linode.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
6 years agotests: fix rgw testinfra failure
Guillaume Abrioux [Fri, 25 Jan 2019 10:05:55 +0000 (11:05 +0100)]
tests: fix rgw testinfra failure

fix the wrong path used in various rgw testinfra tests.
set `1` as default value for `radosgw_num_instances`: if
`ansible_vars.get(radosgw_num_instances)` returns `None`, we can assume
there's only 1 instance since it's the default value in ceph-defaults.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoFix ceph.conf generation
Zack Cerza [Thu, 24 Jan 2019 19:49:09 +0000 (12:49 -0700)]
Fix ceph.conf generation

877979c78 in #3486 broke ceph.conf generation entirely. Remove the stray
curly brace.

Signed-off-by: Zack Cerza <zack@redhat.com>
6 years agoshrink_osd: use cv zap by fsid to remove parts/lvs
Noah Watkins [Thu, 17 Jan 2019 23:08:19 +0000 (15:08 -0800)]
shrink_osd: use cv zap by fsid to remove parts/lvs

Fixes:
  https://bugzilla.redhat.com/show_bug.cgi?id=1569413
  https://bugzilla.redhat.com/show_bug.cgi?id=1572933

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
6 years agotest: add missing test dependency
Noah Watkins [Wed, 16 Jan 2019 23:50:23 +0000 (15:50 -0800)]
test: add missing test dependency

[nwatkins@smash ceph-ansible]$ virtualenv env
[nwatkins@smash ceph-ansible]$ env/bin/pip install -r tests/requirements.txt
[nwatkins@smash ceph-ansible]$ env/bin/python -c "import mock"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'mock'

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
6 years agocv: support zap by osd fsid
Noah Watkins [Wed, 16 Jan 2019 23:50:08 +0000 (15:50 -0800)]
cv: support zap by osd fsid

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
6 years agotests: fix symlink to Vagrantfile
Guillaume Abrioux [Thu, 24 Jan 2019 09:54:32 +0000 (10:54 +0100)]
tests: fix symlink to Vagrantfile

fix the symplink for Vagrantfile in rgw-multisite/container/secondary

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: set CEPH_STABLE_RELEASE to mimic for dev-* jobs
Guillaume Abrioux [Thu, 24 Jan 2019 08:01:05 +0000 (09:01 +0100)]
tests: set CEPH_STABLE_RELEASE to mimic for dev-* jobs

CEPH_STABLE_RELEASE must be set to mimic to perform a mimic to nautilus
upgrade on dev-* jobs.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: remove an outdated comment
Guillaume Abrioux [Mon, 21 Jan 2019 10:29:26 +0000 (11:29 +0100)]
tests: remove an outdated comment

This comment is outdated, let's remove it.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: update dev_setup for nfs_ganesha_stable value
Guillaume Abrioux [Mon, 7 Jan 2019 14:38:15 +0000 (15:38 +0100)]
tests: update dev_setup for nfs_ganesha_stable value

since we now set this variable in inventory host, the regexp needs to be
updated, the assignment operator is `=`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: rename all node
Guillaume Abrioux [Thu, 20 Dec 2018 12:52:22 +0000 (13:52 +0100)]
tests: rename all node

let's name all node the same way to avoid confusion.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: set `ANSIBLE_KEEP_REMOTE_FILES`
Guillaume Abrioux [Wed, 19 Dec 2018 13:23:48 +0000 (14:23 +0100)]
tests: set `ANSIBLE_KEEP_REMOTE_FILES`

this is useful when trying to debug an ansible module issue.
This will allow us to replay a failing module on a node when needed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: change ceph_osd_docker_run_script_path for add_osds
Guillaume Abrioux [Wed, 19 Dec 2018 12:43:39 +0000 (13:43 +0100)]
tests: change ceph_osd_docker_run_script_path for add_osds

set `ceph_osd_docker_run_script_path` to /var/tmp for `add_osds`
scenario

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: play lvm_setup.yml on all scenarios
Guillaume Abrioux [Wed, 19 Dec 2018 09:17:49 +0000 (10:17 +0100)]
tests: play lvm_setup.yml on all scenarios

We should play lvm_setup.yml on all scenario except `lvm_batch`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: reorganize directories layout
Guillaume Abrioux [Fri, 14 Dec 2018 11:01:16 +0000 (12:01 +0100)]
tests: reorganize directories layout

This commit reorganizes the testing directory layout.
The idea is to have more consistency with the names of scenario and
their corresponding path, eg: non-container vs. container: each scenario
has a subdirectory for container deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotox: add new factor for OS
Guillaume Abrioux [Fri, 14 Dec 2018 09:45:04 +0000 (10:45 +0100)]
tox: add new factor for OS

This way we can test every scenario on all distribution.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotox: refact environment naming
Guillaume Abrioux [Wed, 5 Dec 2018 22:19:48 +0000 (23:19 +0100)]
tox: refact environment naming

this commit refacts the way the environment are named by adding a factor
`{non_container,container}`. This will avoid a lot of duplicate
definition in tox.ini and bring kind of consistency.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: update default value for CEPH_STABLE_RELEASE
Guillaume Abrioux [Tue, 27 Nov 2018 08:02:09 +0000 (09:02 +0100)]
tests: update default value for CEPH_STABLE_RELEASE

- update value for `CEPH_STABLE_RELEASE`: next release will ship with
`nautilus`. This variable is used for stable branch only, this way, it
will be ready when next stable version will be released.

- test upgrade from mimic to ceph@master: don't run dev_setup.yml on update
scenario, and run it in [update] section so we update from mimic to
ceph@master.

- run lvm_setup.yml for all scenarios except `lvm_batch`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: cleanup tox definition
Guillaume Abrioux [Mon, 26 Nov 2018 22:22:35 +0000 (23:22 +0100)]
tests: cleanup tox definition

remove useless environment variable definition since we know we only
test ceph@master on ceph-ansible master branch.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: require six==1.10.0
Guillaume Abrioux [Wed, 5 Dec 2018 08:36:22 +0000 (09:36 +0100)]
tests: require six==1.10.0

sometimes it can fail because the version of `six` package is prior to
1.10.0.
This commit ensures the version is enforced.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agotests: fix identation issue in test_rgw.py
Rishabh Dave [Wed, 23 Jan 2019 10:49:31 +0000 (16:19 +0530)]
tests: fix identation issue in test_rgw.py

The error was introduced by the commit
1ac94c048ff1d1385de2892d0ecef7879ec563e9.

Fixes: https://github.com/ceph/ceph-ansible/issues/3528
Signed-off-by: Rishabh Dave <ridave@redhat.com>
6 years agooverride ceph_release with ceph_stable_release
Guillaume Abrioux [Tue, 22 Jan 2019 13:25:45 +0000 (14:25 +0100)]
override ceph_release with ceph_stable_release

when `ceph_origin` is set to `'repository'` and `ceph_repository` to
`'community'` we need to ensure `ceph_release` reflect
`ceph_stable_release`.

4a3f180f9d29d5a31468ebb3d1c5f31a53a93960 simply removed the override
while it should just have to be run only when the condition mentioned
above is satisfied.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agorolling_update: support multiple rgw instance
Guillaume Abrioux [Tue, 22 Jan 2019 10:12:37 +0000 (11:12 +0100)]
rolling_update: support multiple rgw instance

1ac94c048ff1d1385de2892d0ecef7879ec563e9 introduced the support of
multiple rgw instances on a single host but somehow has missed to
implement this feature in rolling_update.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoconfig: make sure ceph_release is set for all client node
Guillaume Abrioux [Mon, 21 Jan 2019 15:08:00 +0000 (16:08 +0100)]
config: make sure ceph_release is set for all client node

`ceph_release` is set in `ceph-container-common` but this role is
played only on first node for clients, this means ceph-config will fail
on all client nodes except the first one.

This commit ensure ceph_release is set for all client nodes.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agomon: enable msgr2
Sébastien Han [Mon, 21 Jan 2019 11:08:56 +0000 (12:08 +0100)]
mon: enable msgr2

Enabling msgr2 style declaration for Nautilus and above. Prior releases
will keep the right syntax.
When upgrading from Mimic to Nautilus we must maintain something in the
form of:

mon_host = [v1:127.0.0.1:6789/0,v2:127.0.0.1:3300/0]

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agomon: ability to change mon listening port on container
Sébastien Han [Wed, 9 Jan 2019 12:23:07 +0000 (13:23 +0100)]
mon: ability to change mon listening port on container

You can now use 'ceph_mon_container_listen_port' to change the port the
monitor will listen on.
Setting the default to 3300 (assigned by IANA) since Nautilus has released the messenger2
transport protocol.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoRevert "mon: force peer addition"
Sébastien Han [Mon, 21 Jan 2019 12:53:53 +0000 (13:53 +0100)]
Revert "mon: force peer addition"

This reverts commit ee08d1f89a588e878324141dd0f80c65058a377d which was
mostly to workaround a bug in ceph@master. Now, ceph@master is fixed so
reverting this. Thanks to https://github.com/ceph/ceph/pull/25900

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoceph-fact: resync group_vars file
Sébastien Han [Wed, 9 Jan 2019 12:22:22 +0000 (13:22 +0100)]
ceph-fact: resync group_vars file

Run ./generate_group_vars_sample.sh to populate the groups_vars file.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoPreserve rolling_update backward compatibility with ansible < 2.5
Giulio Fidente [Fri, 18 Jan 2019 08:03:40 +0000 (09:03 +0100)]
Preserve rolling_update backward compatibility with ansible < 2.5

Signed-off-by: Giulio Fidente <gfidente@redhat.com>
6 years agorgw: add support for multiple rgw instances on a single host
guihecheng [Fri, 9 Nov 2018 00:56:57 +0000 (08:56 +0800)]
rgw: add support for multiple rgw instances on a single host

With this, we could have multiple rgw instances on a single host
with a single run, don't have to use rgw-standalone.yml which does not
seems able to bind ports separately.
If you want to have multiple rgw instances, just change 'radosgw_instances'
to the number you want, which defaults to 1.
Not compatible with Multi-Site yet.

Signed-off-by: guihecheng <guihecheng@cmiot.chinamobile.com>
6 years agorefact the 'raw' installation of python
Guillaume Abrioux [Wed, 16 Jan 2019 05:57:02 +0000 (06:57 +0100)]
refact the 'raw' installation of python

to avoid duplicating code in `site.yml.sample`, `site-docker.yml.sample`
and `setup.yml`, let's isolate this part of the code and simply include
it each time we need it.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agosite: Make sure is_atomic is defined
Brad Hubbard [Wed, 9 Jan 2019 23:19:02 +0000 (09:19 +1000)]
site: Make sure is_atomic is defined

configure_firewall tests the is_atomic variable if the firewalld package
is not present. is_atomic is defined in ceph_facts so include that.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
6 years agoconfig: remove code related to ceph release prior to luminous
Guillaume Abrioux [Thu, 29 Nov 2018 09:57:54 +0000 (10:57 +0100)]
config: remove code related to ceph release prior to luminous

This part of the code is not needed since ceph-ansible@master is
intended to deploy ceph@master only.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoceph-default: rm useless condition
Guillaume Abrioux [Wed, 2 Jan 2019 13:30:27 +0000 (14:30 +0100)]
ceph-default: rm useless condition

This condition is useless and it's also creating issues we don't see in
our CI. ceph_release is set by either ceph-common or ceph-docker-common
so let's keep it this way.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1645379
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoRemove spurious ceph. prefix for roles path in test.yml
Giulio Fidente [Fri, 11 Jan 2019 09:57:49 +0000 (10:57 +0100)]
Remove spurious ceph. prefix for roles path in test.yml

Signed-off-by: Giulio Fidente <gfidente@redhat.com>
6 years agoClean .spec file from ceph-common-coreos role references
Giulio Fidente [Fri, 11 Jan 2019 09:38:56 +0000 (10:38 +0100)]
Clean .spec file from ceph-common-coreos role references

The removal of ceph-common-coreos missed the legacy references
in the .spec file and the group_vars sample.

Closes #3493

6 years agomon: force peer addition
Sébastien Han [Tue, 8 Jan 2019 17:36:14 +0000 (18:36 +0100)]
mon: force peer addition

Somewhat something changed with the introduction of msg2 and we have to
add each node as a peer so the monitors can form a quorum. This might be
due to our CI environment, although adding this is completly harmless
and solves monitors not being able to form quorum.

It seems that the initial monitor map wasn't containing the right
information about the peers (addresses like 0.0.0.0/0r1, for each rank.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agotestinfra/osds double the amount of ports OSDs listen to
Alfredo Deza [Mon, 7 Jan 2019 17:59:43 +0000 (12:59 -0500)]
testinfra/osds double the amount of ports OSDs listen to

Since msgr2 changes got merged, the OSDs in master (to be nautilus) will
double the amount of ports they listen to.

Signed-off-by: Alfredo Deza <adeza@redhat.com>
6 years agonfs-ganesha: fixed nfs_ganesha_dev_apt_repo variable
Bruceforce [Thu, 3 Jan 2019 15:08:58 +0000 (16:08 +0100)]
nfs-ganesha: fixed nfs_ganesha_dev_apt_repo variable
The nfs_ganesha_dev_apt_repo variable was set incorrect in task
"fetch nfs-ganesha development repository"

Signed-off-by: Bruceforce <Bruceforce@users.noreply.github.com>
6 years agorgw: do not create mandatory directories
Sébastien Han [Wed, 12 Dec 2018 10:35:02 +0000 (11:35 +0100)]
rgw: do not create mandatory directories

The packages are responsible for this, currently tracked in ceph https://github.com/ceph/ceph/pull/25503

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agorbd-mirror: copy bootstrap key after package install
Sébastien Han [Mon, 10 Dec 2018 14:30:48 +0000 (15:30 +0100)]
rbd-mirror: copy bootstrap key after package install

If we don't copy the key after the package install the directory /var/lib/ceph/bootstrap-rbd-mirror
will not exist and the copy will fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoconfig: only pre-create ceph dirs on containers
Sébastien Han [Mon, 10 Dec 2018 13:43:30 +0000 (14:43 +0100)]
config: only pre-create ceph dirs on containers

We don't need to create the directories on non-containers, they are
created by the packages.

Closes: https://github.com/ceph/ceph-ansible/issues/3430
Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoceph-infra: disable unrequired NTP services
Rishabh Dave [Wed, 12 Dec 2018 11:23:23 +0000 (16:53 +0530)]
ceph-infra: disable unrequired NTP services

When one of the currently supported NTP services has been set up,
disable rest of the NTP services on Ceph nodes.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
6 years agoceph-infra: merge ntp_debian.yml and ntp_rpm.yml
Rishabh Dave [Wed, 12 Dec 2018 11:15:00 +0000 (16:45 +0530)]
ceph-infra: merge ntp_debian.yml and ntp_rpm.yml

Merge ntp_debian.yml and ntp_rpm.yml into one (the new file is called
setup_ntp.yml) since they are almost identical. Also avoid repetition
of the common setup step for ntpd and chronyd services.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
6 years agocopy certificates as root user
Rishabh Dave [Wed, 2 Jan 2019 11:34:49 +0000 (17:04 +0530)]
copy certificates as root user

Since the current user on the controller node, might not have the
permission to read the TLS certificate and related files, copy these
files to the Ceph nodes as root user.

Fixes: https://github.com/ceph/ceph-ansible/issues/3465
Signed-off-by: Rishabh Dave <ridave@redhat.com>
6 years agoupdate: do not enforce `serial: 1` on client nodes
Guillaume Abrioux [Wed, 2 Jan 2019 15:53:06 +0000 (16:53 +0100)]
update: do not enforce `serial: 1` on client nodes

There is no need to enforce `serial: 1` on client nodes.
Let's make it parameterizable by introducing a new *extra* variable
`client_update_batch`, if not filled this will default to `{{
ansible_forks }}`.

NOTE: this is only usable as an extra variable passed with
`-e client_update_batch=<num>`

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1650184
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoVagrantfile: remove useless default values
Guillaume Abrioux [Wed, 2 Jan 2019 13:46:54 +0000 (14:46 +0100)]
Vagrantfile: remove useless default values

Those default values are useless and might cause issues.

- `osd_scenario` should be mandatory anyway.
- `pool_default_size` is not used anymore (this has been refactored
recently.

Closes: #3468
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoadd 'custom' as valid ceph_repository value
Justin Riley [Fri, 21 Dec 2018 02:33:05 +0000 (21:33 -0500)]
add 'custom' as valid ceph_repository value

This is documented as valid:

https://github.com/ceph/ceph-ansible/blob/561746f75e3913b30e6ae3f14768ebc8a516bf66/group_vars/all.yml.sample#L245

Signed-off-by: Justin Riley <justin.t.riley@gmail.com>
6 years agoceph_key: if initial keys are missing, report which ones
Dan Mick [Tue, 18 Dec 2018 00:43:35 +0000 (16:43 -0800)]
ceph_key: if initial keys are missing, report which ones

Fixes: #3461
Signed-off-by: Dan Mick <dan.mick@redhat.com>
6 years agodocument missing support for non-containerized deployment
Kai Wembacher [Thu, 20 Dec 2018 23:35:53 +0000 (00:35 +0100)]
document missing support for non-containerized deployment

Signed-off-by: Kai Wembacher <kai@ktwe.de>
6 years agoCONTRIBUTING: add more guiline for backport
Sébastien Han [Thu, 20 Dec 2018 14:25:45 +0000 (15:25 +0100)]
CONTRIBUTING: add more guiline for backport

Clarify the backport process.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoClarify RGWs configuration when using ceph_conf_overrides.
jtudelag [Mon, 26 Feb 2018 08:49:57 +0000 (09:49 +0100)]
Clarify RGWs configuration when using ceph_conf_overrides.

To avoid future misconfigurations, clarify that the only valid
scheme is [client.rgw.*] instead of [client.radosgw.*].

6 years agoExample ceph_add_users_buckets playbook
Daniel-Pivonka [Thu, 29 Nov 2018 19:04:04 +0000 (14:04 -0500)]
Example ceph_add_users_buckets playbook

This is example playbook will show how to bulk add rgw users and buckets

Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
6 years agorgw users/buckets module
Daniel-Pivonka [Thu, 29 Nov 2018 15:17:40 +0000 (10:17 -0500)]
rgw users/buckets module

ansible module to bulk create rgw users and buckets

Signed-off-by: Daniel-Pivonka <dpivonka@redhat.com>
6 years agoadd support for rocksdb and wal on the same partition in non-collocated
Kai Wembacher [Thu, 13 Dec 2018 07:42:49 +0000 (08:42 +0100)]
add support for rocksdb and wal on the same partition in non-collocated

Signed-off-by: Kai Wembacher <kai@ktwe.de>
6 years agoset any_errors_fatal to true for all host sections
Rishabh Dave [Mon, 17 Dec 2018 10:34:46 +0000 (16:04 +0530)]
set any_errors_fatal to true for all host sections

Add `any_errors_fatal: true` to all host sections in `site.yml.sample`
and `site-container.yml.sample` so that the playbook execution
ceases spontaneously and instantaneously when errors occurs.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
6 years agolint: Remote package tasks should have a retry
Sébastien Han [Thu, 20 Dec 2018 09:00:26 +0000 (10:00 +0100)]
lint: Remote package tasks should have a retry

Make linter happy and add more robustness to remote tasks by retrying 3
times (the default) before failing.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agoretry on packages and repositories failures
Guillaume Abrioux [Wed, 19 Dec 2018 13:55:01 +0000 (14:55 +0100)]
retry on packages and repositories failures

add register/until on all packaging related tasks to avoid non valid CI
failure.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
6 years agoplaybook: report storage device inventory
Noah Watkins [Wed, 5 Dec 2018 23:15:02 +0000 (15:15 -0800)]
playbook: report storage device inventory

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
6 years agoceph-volume: add support for inventory command
Noah Watkins [Wed, 5 Dec 2018 23:14:08 +0000 (15:14 -0800)]
ceph-volume: add support for inventory command

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
6 years agotest: use yaml stdout callback
Sébastien Han [Fri, 14 Dec 2018 10:14:30 +0000 (11:14 +0100)]
test: use yaml stdout callback

This provides a much more readable output for tasks. It'll be easier to
debug traces.

Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agomon: remove ceph aliases for containers
Sébastien Han [Thu, 13 Dec 2018 10:38:23 +0000 (11:38 +0100)]
mon: remove ceph aliases for containers

These aliases have led to several issues making believe that ceph
binaries are actually present on the host when running the command.
However it wasn't explicit that the commands were only ran inside a
container.
It has brought to much confusion so we decided to remove them.

Closes: https://github.com/ceph/ceph-ansible/issues/3445
Signed-off-by: Sébastien Han <seb@redhat.com>
6 years agopurge-cluster: skip tasks that use ceph-volume if it's not installed
Andrew Schoen [Tue, 11 Dec 2018 16:52:26 +0000 (10:52 -0600)]
purge-cluster: skip tasks that use ceph-volume if it's not installed

This will allow the playbook to be idempotent.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1656935
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
6 years agopurge-container: move facts gathering after ceph-defaults role import
Guillaume Abrioux [Wed, 12 Dec 2018 15:34:14 +0000 (16:34 +0100)]
purge-container: move facts gathering after ceph-defaults role import

This task has to be called after the role `ceph-defaults` has been
played, otherwise, `mon_group_name` will never be known.

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