]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
7 years agoMerge pull request #2054 from jprovaznik/bindaddr
Sébastien Han [Mon, 23 Oct 2017 10:20:46 +0000 (12:20 +0200)]
Merge pull request #2054 from jprovaznik/bindaddr

ceph-nfs - add bind address variable

7 years agoceph-nfs - add bind address variable 2054/head
Jan Provaznik [Mon, 16 Oct 2017 10:06:59 +0000 (12:06 +0200)]
ceph-nfs - add bind address variable

7 years agoMerge pull request #2082 from ceph/restapi-cephconf
Sébastien Han [Fri, 20 Oct 2017 12:07:48 +0000 (14:07 +0200)]
Merge pull request #2082 from ceph/restapi-cephconf

common: move restapi template to config

7 years agoMerge pull request #2076 from ceph/2.4-3.0-backward
Sébastien Han [Fri, 20 Oct 2017 11:58:30 +0000 (13:58 +0200)]
Merge pull request #2076 from ceph/2.4-3.0-backward

[skip ci] all: backward compatibility between stable-2.2 and 3.0

7 years agoall: backward compatibility between stable-2.2 and 3.0 2076/head
Sébastien Han [Wed, 18 Oct 2017 16:03:30 +0000 (18:03 +0200)]
all: backward compatibility between stable-2.2 and 3.0

stable-3.0 brought numerous changes in ceph-ansible variables, this PR
aims to maintain backward compatibility for someone running stable-2.2
upgrading to stable-3.0 but keeps its groups_vars untouched.
We will then determine the right options to make sure the upgrade works
but we are expecting that new variables should be used.

We will drop this in a near future, maybe 3.1 or 3.2.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agomgr: force module addition
Sébastien Han [Fri, 20 Oct 2017 09:53:39 +0000 (11:53 +0200)]
mgr: force module addition

Some module require --force to be enabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agocommon: move restapi template to config 2082/head
Sébastien Han [Fri, 20 Oct 2017 09:14:13 +0000 (11:14 +0200)]
common: move restapi template to config

Closes: github.com/ceph/ceph-ansible/issues/1981
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agomgr: play 'enable modules' sequence only on luminous
Guillaume Abrioux [Thu, 19 Oct 2017 13:39:43 +0000 (15:39 +0200)]
mgr: play 'enable modules' sequence only on luminous

This feature isn't available before luminous, therefore, we need to play
them only on luminous and after otherwise the playbook will fail.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 3f3d4b9c727d06154c422d445fc2a245aceaed89)

7 years agoupgrade: fix upgrade jewel to luminous for nfs nodes
Guillaume Abrioux [Thu, 19 Oct 2017 16:30:08 +0000 (18:30 +0200)]
upgrade: fix upgrade jewel to luminous for nfs nodes

nfs nodes can't be upgraded from jewel to luminous because ceph-nfs role
is skipped because of the condition `when:
"ceph_release_num[ceph_release] >= ceph_release_num.luminous"`. Indeed,
package is upgraded in `ceph-nfs` role, therefore,
`ceph_release` is still set to the old version. It means the when can't
be satisfied.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoupgrade: fix upgrade jewel to luminous for mgr nodes
Guillaume Abrioux [Thu, 19 Oct 2017 13:07:58 +0000 (15:07 +0200)]
upgrade: fix upgrade jewel to luminous for mgr nodes

mgr nodes can't be upgraded from jewel to luminous because ceph-mgr role
is skipped because of the condition `when:
"ceph_release_num[ceph_release] >= ceph_release_num.luminous"`. Indeed,
ceph-mgr package is upgraded in `ceph-mgr` role, therefore,
`ceph_release` is still set to the old version. It means the when can't
be satisfied.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 302e563601cd6820b1ae44fabdfb1506688c7c9b)

7 years agoMerge pull request #2081 from ceph/fix_mgr_upgrade
Sébastien Han [Thu, 19 Oct 2017 18:53:43 +0000 (20:53 +0200)]
Merge pull request #2081 from ceph/fix_mgr_upgrade

tests: fix docker_collocation, change jewel upgrade

7 years agotests: only test upgrade jewel > luminous 2081/head
Guillaume Abrioux [Thu, 19 Oct 2017 14:12:12 +0000 (16:12 +0200)]
tests: only test upgrade jewel > luminous

Since it has been decided to stop testing against kraken, we have to
test upgrade from jewel to luminous instead of kraken.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agotests: re-add missing param in tox
Guillaume Abrioux [Thu, 19 Oct 2017 13:24:02 +0000 (15:24 +0200)]
tests: re-add missing param in tox

this line has been removed by mistake in a53aa9e.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2000 from ceph/merge-osd-scenarios
Sébastien Han [Thu, 19 Oct 2017 07:18:02 +0000 (09:18 +0200)]
Merge pull request #2000 from ceph/merge-osd-scenarios

[skip ci] ci: new osd scenarios

7 years agoMerge pull request #2075 from ceph/fix_3a58757
Sébastien Han [Wed, 18 Oct 2017 13:19:41 +0000 (15:19 +0200)]
Merge pull request #2075 from ceph/fix_3a58757

[skip ci] mgr: fix broken task on jewel

7 years agomgr: fix broken task on jewel 2075/head
Guillaume Abrioux [Wed, 18 Oct 2017 09:43:40 +0000 (11:43 +0200)]
mgr: fix broken task on jewel

3a58757 introduced an issue for Jewel deployments, since this role is
skipped, `enabled_ceph_mgr_modules.stdout` doesn't exist, therefore, it
ends up with an attribute error.

Uses `.get()` to retrieve `stdout` with a default value so it won't fail
if this attribute doesn't exist (jewel).

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2073 from ceph/fix_rbd_handler
Sébastien Han [Wed, 18 Oct 2017 09:12:05 +0000 (11:12 +0200)]
Merge pull request #2073 from ceph/fix_rbd_handler

[skip ci] rbd: fix restart script for jewel

7 years agorbd: fix restart script for jewel 2073/head
Guillaume Abrioux [Tue, 17 Oct 2017 16:28:06 +0000 (18:28 +0200)]
rbd: fix restart script for jewel

In Jewel, we don't use bootstrap-rbd keyring for rbd-mirror nodes, it
results with a socket path/name different according to which ceph
release you are deploying.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2053 from Fbrachere/mgr-modules
Sébastien Han [Wed, 18 Oct 2017 08:27:31 +0000 (10:27 +0200)]
Merge pull request #2053 from Fbrachere/mgr-modules

Add ability to enable ceph mgr modules.

7 years agoci: new osd scenarios 2000/head
Sébastien Han [Thu, 5 Oct 2017 14:22:04 +0000 (16:22 +0200)]
ci: new osd scenarios

This commit add new osd scenarios, it aims to simplify the CI setup and
brings a better coverage on the OSD scenarios.
We decided to differentiate between filestore and bluestore, thinking
ahead when filestore won't be supported anymore.
So we now have two classes of tests:

* Filestore
* Bluestore

In each of those classes we have container and non-container.
Then for each we test the following:

* collocated
* collocated dmcrypt
* non-collocated
* non-collocated dmcrypt
* auto discovery collocated
* auto discovery collocated dmcrypt

This gives us a nice coverage and also reduces the footprint on the CI.
We are now up to 4 scenarios, each containing 6 OSD VMs.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2068 from ceph/fix-collocation2
Sébastien Han [Wed, 18 Oct 2017 07:15:50 +0000 (09:15 +0200)]
Merge pull request #2068 from ceph/fix-collocation2

defaults: fix handlers for collocation

7 years agodefaults: fix handlers for collocation 2068/head
Sébastien Han [Tue, 17 Oct 2017 13:54:17 +0000 (15:54 +0200)]
defaults: fix handlers for collocation

When doing collocation the condition "inventory_hostname in play_hosts"
is breaking the restart workflow.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2065 from ceph/rhcs-rm
Sébastien Han [Tue, 17 Oct 2017 15:05:14 +0000 (17:05 +0200)]
Merge pull request #2065 from ceph/rhcs-rm

[skip ci] rpm: remove ability to install ceph community version

7 years agoMerge pull request #2050 from ceph/sort_dict
Sébastien Han [Tue, 17 Oct 2017 13:23:34 +0000 (15:23 +0200)]
Merge pull request #2050 from ceph/sort_dict

ceph-defaults: fix handlers that are always triggered

7 years agoMerge pull request #2055 from ceph/update-mirror-nfs
Guillaume Abrioux [Tue, 17 Oct 2017 12:51:39 +0000 (14:51 +0200)]
Merge pull request #2055 from ceph/update-mirror-nfs

upgrade: support for rbd mirror and nfs

7 years agoMerge pull request #2062 from berendt/remove-readme-files-in-roles-directories
Sébastien Han [Tue, 17 Oct 2017 09:55:48 +0000 (11:55 +0200)]
Merge pull request #2062 from berendt/remove-readme-files-in-roles-directories

[skip ci] Cleanup readme files in roles directories

7 years agorpm: remove ability to install ceph community version 2065/head
Sébastien Han [Tue, 17 Oct 2017 09:49:41 +0000 (11:49 +0200)]
rpm: remove ability to install ceph community version

Downstream version of ceph-ansible could still trigger install from
upstream repo and import keys.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1503019
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoCleanup readme files in roles directories 2062/head
Christian Berendt [Tue, 17 Oct 2017 08:44:58 +0000 (10:44 +0200)]
Cleanup readme files in roles directories

The contents of the README files are no longer up to date.
Documentation for all roles is located below the docs directory.

7 years agoMerge pull request #2064 from berendt/sphinx-conf-do-not-set-release-version
Sébastien Han [Tue, 17 Oct 2017 09:06:28 +0000 (11:06 +0200)]
Merge pull request #2064 from berendt/sphinx-conf-do-not-set-release-version

Do not set release/version in sphinx configuration

7 years agoMerge pull request #2063 from berendt/docs-index-syntax-issue
Sébastien Han [Tue, 17 Oct 2017 09:06:02 +0000 (11:06 +0200)]
Merge pull request #2063 from berendt/docs-index-syntax-issue

Add missing backticks in docs index

7 years agoAdd missing backticks in docs index 2063/head
Christian Berendt [Tue, 17 Oct 2017 09:00:02 +0000 (11:00 +0200)]
Add missing backticks in docs index

7 years agoDo not set release/version in sphinx configuration 2064/head
Christian Berendt [Tue, 17 Oct 2017 08:55:54 +0000 (10:55 +0200)]
Do not set release/version in sphinx configuration

7 years agoupgrade: support for rbd mirror and nfs 2055/head
Sébastien Han [Mon, 16 Oct 2017 12:15:43 +0000 (14:15 +0200)]
upgrade: support for rbd mirror and nfs

- Add upgrade support for rbd mirror and nfs daemons.
- Only works with systemd (remove sysvinit and upstart occurence)
- A bit of cleanup

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoswitch: nicer way to check mon quorum
Sébastien Han [Mon, 16 Oct 2017 12:27:57 +0000 (14:27 +0200)]
switch: nicer way to check mon quorum

re-use the same syntax as rolling_udate.yml

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2057 from berendt/gh2056
Sébastien Han [Mon, 16 Oct 2017 15:49:11 +0000 (17:49 +0200)]
Merge pull request #2057 from berendt/gh2056

In docker start scripts replace \u00a0 with \u0020

7 years agoIn docker start scripts replace \u00a0 with \u0020 2057/head
Christian Berendt [Mon, 16 Oct 2017 13:16:48 +0000 (15:16 +0200)]
In docker start scripts replace \u00a0 with \u0020

This will solve the following issue when starting docker containers on ubuntu:

invalid argument "1\u00a0" for --cpus=1 : failed to parse 1  as a rational number

Closes-bug: #2056

7 years agoAdd ability to enable ceph mgr modules. 2053/head
Fabien Brachere [Mon, 16 Oct 2017 13:04:23 +0000 (15:04 +0200)]
Add ability to enable ceph mgr modules.

7 years agoMerge pull request #1963 from ceph/pull-in-para
Guillaume Abrioux [Fri, 13 Oct 2017 17:35:11 +0000 (19:35 +0200)]
Merge pull request #1963 from ceph/pull-in-para

site-docker.yml try to fetch images in //

7 years agoMerge pull request #2051 from ceph/mds-fs
Guillaume Abrioux [Fri, 13 Oct 2017 17:34:06 +0000 (19:34 +0200)]
Merge pull request #2051 from ceph/mds-fs

mds: fix fs pool creation

7 years agoMerge pull request #2052 from ceph/fix-contriub-tag
Sébastien Han [Fri, 13 Oct 2017 15:20:33 +0000 (17:20 +0200)]
Merge pull request #2052 from ceph/fix-contriub-tag

[skip ci] contrib: galaxy fix the array

7 years agocontrib: galaxy fix the array 2052/head
Sébastien Han [Fri, 13 Oct 2017 15:09:58 +0000 (17:09 +0200)]
contrib: galaxy fix the array

Fix the array where we build the list of which tag is newer and then
needs to be pushed.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoceph-defaults: fix handlers that are always triggered 2050/head
Guillaume Abrioux [Fri, 13 Oct 2017 13:16:18 +0000 (15:16 +0200)]
ceph-defaults: fix handlers that are always triggered

Handlers are always triggered in ceph-ansible because ceph.conf file is
generated with a randomly order for the different keys/values pairs
in sections.

In python, a dict is not sorted. It means in our case each time we try
to generate the ceph.conf file it will be rendered with a random order
since the mecanism behind consist of rendering a file from a python dict
with keys/values. Therefore, as a quick workaround, forcing this dict to be
sorted before rendering the configuration file will ensure that it will be
rendered always the same way.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agomds: fix fs pool creation 2051/head
Sébastien Han [Fri, 13 Oct 2017 14:01:19 +0000 (16:01 +0200)]
mds: fix fs pool creation

1. add the variables to docker_collocation
2. trigger the check when a MDS is part of the inventory file, not when
we run on an MDS...

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoci: use a container client VM 1963/head
Sébastien Han [Fri, 13 Oct 2017 13:26:03 +0000 (15:26 +0200)]
ci: use a container client VM

The client won't run on centos7 anymore but on Atomic host just like the
rest of the daemons.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agosite-docker.yml try to fetch images in //
Sébastien Han [Wed, 27 Sep 2017 22:11:53 +0000 (00:11 +0200)]
site-docker.yml try to fetch images in //

The container deployment is serialized, adding this task as a best
effort. If docker is already present we pull the image otherwise we wait
for the role to play.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2045 from ceph/reboot
Guillaume Abrioux [Fri, 13 Oct 2017 08:43:19 +0000 (10:43 +0200)]
Merge pull request #2045 from ceph/reboot

ci: reboot with ansible instead of vagrant reload

7 years agoMerge pull request #2047 from ceph/enable_ceph-rbd-mirror.target
Guillaume Abrioux [Fri, 13 Oct 2017 08:34:10 +0000 (10:34 +0200)]
Merge pull request #2047 from ceph/enable_ceph-rbd-mirror.target

rbd-mirror: enable ceph-rbd-mirror.target

7 years agoMerge pull request #2031 from major/simplify-ntp
Sébastien Han [Fri, 13 Oct 2017 07:16:20 +0000 (09:16 +0200)]
Merge pull request #2031 from major/simplify-ntp

Simplify NTP checks/install

7 years agoci: reboot with ansible instead of vagrant reload 2045/head
Sébastien Han [Thu, 12 Oct 2017 21:41:02 +0000 (23:41 +0200)]
ci: reboot with ansible instead of vagrant reload

vagrant is serialized and takes a lot of time compare to simple reboot.
See the benchmarks below for 3 VMs:

[leseb@rick docker]$ time ANSIBLE_SSH_ARGS="-F
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/vagrant_ssh_config"  ansible-playbook -i /home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/hosts reboot.yml

PLAY [mons]
****************************************************************************************************************************************************************************************************

TASK [Gathering Facts]
*****************************************************************************************************************************************************************************************
ok: [mon1]
ok: [mon2]
ok: [mon0]

TASK [restart machine]
*****************************************************************************************************************************************************************************************
changed: [mon2]
changed: [mon1]
changed: [mon0]

TASK [wait for server to boot]
*********************************************************************************************************************************************************************************
ok: [mon2 -> localhost]
ok: [mon0 -> localhost]
ok: [mon1 -> localhost]

TASK [uptime]
**************************************************************************************************************************************************************************************************
changed: [mon2]
changed: [mon0]
changed: [mon1]

PLAY RECAP
*****************************************************************************************************************************************************************************************************
mon0                       : ok=4    changed=2    unreachable=0
failed=0
mon1                       : ok=4    changed=2    unreachable=0
failed=0
mon2                       : ok=4    changed=2    unreachable=0
failed=0

real    0m35.112s
user    0m5.737s
sys     0m1.849s

[leseb@rick docker]$ time vagrant reload
==> mon0: Halting domain...
==> mon0: Starting domain.
==> mon0: Waiting for domain to get an IP address...
==> mon0: Waiting for SSH to become available...
==> mon0: Creating shared folders metadata...
==> mon0: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon0: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon0: flag to force provisioning. Provisioners marked to run always
will still run.
==> mon1: Halting domain...
==> mon1: Starting domain.
==> mon1: Waiting for domain to get an IP address...
==> mon1: Waiting for SSH to become available...
==> mon1: Creating shared folders metadata...
==> mon1: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon1: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon1: flag to force provisioning. Provisioners marked to run always
will still run.
==> mon2: Halting domain...
==> mon2: Starting domain.
==> mon2: Waiting for domain to get an IP address...
==> mon2: Waiting for SSH to become available...
==> mon2: Creating shared folders metadata...
==> mon2: Rsyncing folder:
/home/leseb/reproduce-ci/tmp.zgGC7d5mIC/build/workspace/ceph-ansible/tests/functional/centos/7/docker/
=> /home/vagrant/sync
==> mon2: Machine already provisioned. Run `vagrant provision` or use
the `--provision`
==> mon2: flag to force provisioning. Provisioners marked to run always
will still run.

real    1m31.850s
user    0m7.387s
sys     0m0.796s

Reboot via Ansible: 0m35.112s
Reboot via vagrant: 1m31.850s

We save 1/3 time.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agorbd-mirror: enable ceph-rbd-mirror.target 2047/head
Guillaume Abrioux [Fri, 13 Oct 2017 06:27:43 +0000 (08:27 +0200)]
rbd-mirror: enable ceph-rbd-mirror.target

on jewel `ceph-rbd-mirror.target` isn't enabled, therefore, if the node
is rebooted, the service doesn't get started.

from ceph-rbd-mirror unit file:
```
[Install]
WantedBy=ceph-rbd-mirror.target
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2039 from major/enable-profile-tasks-callback
Sébastien Han [Thu, 12 Oct 2017 20:25:22 +0000 (22:25 +0200)]
Merge pull request #2039 from major/enable-profile-tasks-callback

Enable profile_tasks callback plugin

7 years agoMerge pull request #2044 from major/avoid-jinja-in-when
Sébastien Han [Thu, 12 Oct 2017 20:23:06 +0000 (22:23 +0200)]
Merge pull request #2044 from major/avoid-jinja-in-when

Remove jinja2 delimiters from `when` keys

7 years agoSimplify NTP checks/install 2031/head
Major Hayden [Wed, 11 Oct 2017 18:21:20 +0000 (13:21 -0500)]
Simplify NTP checks/install

This patch simplifies the checks and installation tasks for NTP.

Debian and Red Hat had a check for NTP's presence but would then
install NTP right afterwards anyways. In addition, there were
tasks for atomic that weren't used anywhere else in the role.

This patch also uses a dynamic include to reduce delays from
skipped tasks.

7 years agoMerge pull request #2038 from major/fix-cmd-warning
Sébastien Han [Thu, 12 Oct 2017 16:46:52 +0000 (18:46 +0200)]
Merge pull request #2038 from major/fix-cmd-warning

Suppress yum/dnf/rpm command warnings

7 years agoEnable profile_tasks callback plugin 2039/head
Major Hayden [Thu, 12 Oct 2017 16:43:29 +0000 (11:43 -0500)]
Enable profile_tasks callback plugin

This patch adds the `profile_tasks` callback plugin to the whitelist
so that we can identify the tasks which are taking the longest amount
of time to run.

7 years agoRemove jinja2 delimiters from `when` keys 2044/head
Major Hayden [Thu, 12 Oct 2017 16:27:36 +0000 (11:27 -0500)]
Remove jinja2 delimiters from `when` keys

This patch changes the `when:` keys so that they have no jinja2
delimiters. This avoids Ansible warnings which could turn into
errors in a future Ansible release.

7 years agoMerge pull request #2036 from ceph/cephfs-pool
Guillaume Abrioux [Thu, 12 Oct 2017 15:47:10 +0000 (17:47 +0200)]
Merge pull request #2036 from ceph/cephfs-pool

mds: precisely define cephfs pool

7 years agoMerge pull request #2037 from major/remove-always-run
Sébastien Han [Thu, 12 Oct 2017 15:15:28 +0000 (17:15 +0200)]
Merge pull request #2037 from major/remove-always-run

Avoid deprecated always_run

7 years agoMerge pull request #2028 from ceph/fix_testinfra
Sébastien Han [Thu, 12 Oct 2017 14:19:33 +0000 (16:19 +0200)]
Merge pull request #2028 from ceph/fix_testinfra

tests: rbd/rgw adapt testinfra for jewel

7 years agomds: precisely define cephfs pool 2036/head
Sébastien Han [Thu, 12 Oct 2017 12:55:53 +0000 (14:55 +0200)]
mds: precisely define cephfs pool

We now have a variable called ceph_pools that is mandatory when
deploying a MDS.
It's a dictionnary that contains a pool name and a PG count. PG count is
mandatory and must be set, the playbook will fail otherwise.

Closes: https://github.com/ceph/ceph-ansible/issues/2017
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoSuppress yum/dnf/rpm command warnings 2038/head
Major Hayden [Thu, 12 Oct 2017 13:38:01 +0000 (08:38 -0500)]
Suppress yum/dnf/rpm command warnings

Ansible throws warnings when using yum/dnf/rpm with the command
module:

    [WARNING]: Consider using yum module rather than running yum

This patch adds the `warn: no` argument to suppress the warnings
in the Ansible output.

7 years agoAvoid deprecated always_run 2037/head
Major Hayden [Thu, 12 Oct 2017 13:29:41 +0000 (08:29 -0500)]
Avoid deprecated always_run

The `always_run` key is deprecated and being removed in Ansible 2.4.
Using it causes a warning to be displayed:

    [DEPRECATION WARNING]: always_run is deprecated.

This patch changes all instances of `always_run` to use the `always`
tag, which causes the task to run each time the playbook runs.

7 years agotests: add missing override for collocation scenario 2028/head
Guillaume Abrioux [Thu, 12 Oct 2017 08:18:00 +0000 (10:18 +0200)]
tests: add missing override for collocation scenario

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2035 from ceph/replace-disk
Sébastien Han [Thu, 12 Oct 2017 09:55:23 +0000 (11:55 +0200)]
Merge pull request #2035 from ceph/replace-disk

[skip ci] infra: replace osd playbook

7 years agoinfra: replace osd playbook 2035/head
Sébastien Han [Thu, 12 Oct 2017 09:53:30 +0000 (11:53 +0200)]
infra: replace osd playbook

This playbook can replace failed OSD in containerized and
non-containerized env.
The current limitation is that it won't allow you to choose between
filestore/bluestore and will do collocation as well.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2030 from major/ceph-common-pass-pkgs-as-list
Sébastien Han [Thu, 12 Oct 2017 07:15:58 +0000 (09:15 +0200)]
Merge pull request #2030 from major/ceph-common-pass-pkgs-as-list

Pass list of packages instead of with_items

7 years agotests: rbd/rgw adapt testinfra for jewel
Guillaume Abrioux [Wed, 11 Oct 2017 14:21:52 +0000 (16:21 +0200)]
tests: rbd/rgw adapt testinfra for jewel

- the rbd-mirror unit systemd name is not the same when running jewel vs
luminous.
- servicemap is not available on jewel.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2029 from ceph/rgw-jinja
Sébastien Han [Wed, 11 Oct 2017 20:22:48 +0000 (22:22 +0200)]
Merge pull request #2029 from ceph/rgw-jinja

config: fix rgw section rendering for collocation

7 years agoPass list of packages instead of with_items 2030/head
Major Hayden [Wed, 11 Oct 2017 17:18:12 +0000 (12:18 -0500)]
Pass list of packages instead of with_items

Modern versions of Ansible can handle a list of packages passed
directly to the package modules. This patch optimizes the package
install process by passing the list of packages directly to the
module.

7 years agoconfig: proper render ceph.conf when doing collocation 2029/head
Sébastien Han [Wed, 11 Oct 2017 16:29:34 +0000 (18:29 +0200)]
config: proper render ceph.conf when doing collocation

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2027 from ceph/hub-backport
Sébastien Han [Wed, 11 Oct 2017 13:20:19 +0000 (15:20 +0200)]
Merge pull request #2027 from ceph/hub-backport

[skip ci]

7 years agocontrib: backport auto create PR 2027/head
Sébastien Han [Wed, 11 Oct 2017 13:19:34 +0000 (15:19 +0200)]
contrib: backport auto create PR

Fix branch and repo

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2026 from ceph/hub-backport
Sébastien Han [Wed, 11 Oct 2017 13:16:35 +0000 (15:16 +0200)]
Merge pull request #2026 from ceph/hub-backport

[skip ci]

7 years agocontrib: backport auto create PR 2026/head
Sébastien Han [Wed, 11 Oct 2017 12:47:43 +0000 (14:47 +0200)]
contrib: backport auto create PR

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2022 from ceph/fix-purge-iscis 2025/head
Sébastien Han [Wed, 11 Oct 2017 12:21:19 +0000 (14:21 +0200)]
Merge pull request #2022 from ceph/fix-purge-iscis

[skip ci] purge-iscsi: fix group name

7 years agoMerge pull request #2021 from major/remove-duplicate-package-key
Sébastien Han [Wed, 11 Oct 2017 12:17:21 +0000 (14:17 +0200)]
Merge pull request #2021 from major/remove-duplicate-package-key

Remove duplicate 'package' key

7 years agoosd: rollback bindmount of /run/udev 2022/head
Sébastien Han [Wed, 11 Oct 2017 11:21:37 +0000 (13:21 +0200)]
osd: rollback bindmount of /run/udev

This is causing unknown issues when trying to start a dmcrypt container.
Basically the container is stuck at mount opening the LUKS device. This
is still unknown why this is causing trouble but we need to move
forward. Also, this doesn't seem to help in any ways to fix the race
condition we've seen.

Here is the log for dmcrypt:

cryptsetup 1.7.4 processing "cryptsetup --debug --verbose --key-file
key luksClose fbf8887d-8694-46ca-b9ff-be79a668e2a9"
Running command close.
Locking memory.
Installing SIGINT/SIGTERM handler.
Unblocking interruption on signal.
Allocating crypt device context by device
fbf8887d-8694-46ca-b9ff-be79a668e2a9.
Initialising device-mapper backend library.
dm version   [ opencount flush ]   [16384] (*1)
dm versions   [ opencount flush ]   [16384] (*1)
Detected dm-crypt version 1.14.1, dm-ioctl version 4.35.0.
Device-mapper backend running with UDEV support enabled.
dm status fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush ]
[16384] (*1)
Releasing device-mapper backend.
Trying to open and read device /dev/sdc1 with direct-io.
Allocating crypt device /dev/sdc1 context.
Trying to open and read device /dev/sdc1 with direct-io.
Initialising device-mapper backend library.
dm table fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush
securedata ]   [16384] (*1)
Trying to open and read device /dev/sdc1 with direct-io.
Crypto backend (gcrypt 1.5.3) initialized in cryptsetup library
version 1.7.4.
Detected kernel Linux 3.10.0-693.el7.x86_64 x86_64.
Reading LUKS header of size 1024 from device /dev/sdc1
Key length 32, device size 1943016847 sectors, header size 2050
sectors.
Deactivating volume fbf8887d-8694-46ca-b9ff-be79a668e2a9.
dm status fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush ]
[16384] (*1)
Udev cookie 0xd4d14e4 (semid 32769) created
Udev cookie 0xd4d14e4 (semid 32769) incremented to 1
Udev cookie 0xd4d14e4 (semid 32769) incremented to 2
Udev cookie 0xd4d14e4 (semid 32769) assigned to REMOVE task(2) with
flags         (0x0)
dm remove fbf8887d-8694-46ca-b9ff-be79a668e2a9  [ opencount flush
retryremove ]   [16384] (*1)
fbf8887d-8694-46ca-b9ff-be79a668e2a9: Stacking NODE_DEL [verify_udev]
Udev cookie 0xd4d14e4 (semid 32769) decremented to 1
Udev cookie 0xd4d14e4 (semid 32769) waiting for zero

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agopurge-iscsi: fix group name
Sébastien Han [Wed, 11 Oct 2017 10:52:12 +0000 (12:52 +0200)]
purge-iscsi: fix group name

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1500281
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoRemove duplicate 'package' key 2021/head
Major Hayden [Tue, 10 Oct 2017 20:39:16 +0000 (15:39 -0500)]
Remove duplicate 'package' key

This patch fixes a typo where "package:" was used twice in the same
task.

7 years agoMerge pull request #2015 from ceph/fix_nfs-ganesha-repos v3.0.0
Sébastien Han [Tue, 10 Oct 2017 15:15:33 +0000 (17:15 +0200)]
Merge pull request #2015 from ceph/fix_nfs-ganesha-repos

nfs: move repository configuration in ceph-nfs role

7 years agonfs: add missing condition for debian_rhcs 2015/head
Guillaume Abrioux [Tue, 10 Oct 2017 14:26:01 +0000 (16:26 +0200)]
nfs: add missing condition for debian_rhcs

in addition to c4dcdaa20 this commit adds the missing condition on
install tasks for debian_rhcs deployment. Without them, these tasks are
played on any kind of deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2020 from jprovaznik/dexports
Sébastien Han [Tue, 10 Oct 2017 13:17:28 +0000 (15:17 +0200)]
Merge pull request #2020 from jprovaznik/dexports

Ceph-nfs dynamic exports fixes

7 years agoCeph-nfs dynamic exports fixes 2020/head
Jan Provaznik [Tue, 10 Oct 2017 10:43:23 +0000 (12:43 +0200)]
Ceph-nfs dynamic exports fixes

* DBus on host should include ganesha service file
* to allow ganesha container to respond on DBus it needs to run
  in --privileged mode (ganesha folks contacted to look at this)
* ceph_nfs_include_exports_dir variable replaced with more general
  ceph_nfs_dynamic_exports

7 years agoiscsi-gw: move repository configuration to ceph-iscsi-gw
Guillaume Abrioux [Tue, 10 Oct 2017 08:39:02 +0000 (10:39 +0200)]
iscsi-gw: move repository configuration to ceph-iscsi-gw

This is something that has nothing to do in `ceph-common`, this
is too specific to `ceph-iscsi-gw` role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoDocs: fix error `Unknown target name`
Guillaume Abrioux [Mon, 9 Oct 2017 19:38:31 +0000 (21:38 +0200)]
Docs: fix error `Unknown target name`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agonfs: move repository configuration in ceph-nfs role
Guillaume Abrioux [Mon, 9 Oct 2017 19:34:17 +0000 (21:34 +0200)]
nfs: move repository configuration in ceph-nfs role

This is something that has nothing to do in `ceph-common`, this
is too specific to `ceph-nfs` role.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2018 from ceph/purge-journal
Sébastien Han [Tue, 10 Oct 2017 08:01:18 +0000 (10:01 +0200)]
Merge pull request #2018 from ceph/purge-journal

[skip ci] purge: fix journal purge

7 years agopurge: fix journal purge 2018/head
Sébastien Han [Tue, 10 Oct 2017 07:57:39 +0000 (09:57 +0200)]
purge: fix journal purge

Using a condition when osd_scenario == 'non-collocated' was wrong since
these partitions can be collocated on a single device also. Removing the
check makes the purge of these partitions.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1499871
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2014 from ceph/fixes-2 v3.0.0rc19
Guillaume Abrioux [Mon, 9 Oct 2017 18:14:06 +0000 (20:14 +0200)]
Merge pull request #2014 from ceph/fixes-2

infra: use the pg check in the right place

7 years agonfs: move packages installation to own role 2014/head
Guillaume Abrioux [Mon, 9 Oct 2017 15:10:39 +0000 (17:10 +0200)]
nfs: move packages installation to own role

Make role `ceph-nfs` handling itself the installation of nfs
packages.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agomds: move installation packages in role itself
Guillaume Abrioux [Mon, 9 Oct 2017 13:37:51 +0000 (15:37 +0200)]
mds: move installation packages in role itself

Make role `ceph-mds` handling itself the installation of `ceph-mds`
package.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoiscsi: move package install to ceph-iscsi-role
Sébastien Han [Mon, 9 Oct 2017 13:30:54 +0000 (15:30 +0200)]
iscsi: move package install to ceph-iscsi-role

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agomgr: move installation packages in role itself
Guillaume Abrioux [Mon, 9 Oct 2017 13:26:15 +0000 (15:26 +0200)]
mgr: move installation packages in role itself

Make role `ceph-mgr` handling itself the installation of `ceph-mgr`
package because it's complicated to manage it regarding we are going to
install `jewel vs. luminous`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agotests: adapt current testing for collocation scenario
Guillaume Abrioux [Mon, 9 Oct 2017 11:48:03 +0000 (13:48 +0200)]
tests: adapt current testing for collocation scenario

Since we introduced collocation testing scenario, we need to adapt
current tests to this new scenario.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoci: disable vnc console
Sébastien Han [Mon, 9 Oct 2017 09:56:46 +0000 (11:56 +0200)]
ci: disable vnc console

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoosd: bindmount /run/udev
Sébastien Han [Mon, 9 Oct 2017 08:41:14 +0000 (10:41 +0200)]
osd: bindmount /run/udev

Ensures that "udevadm" is able to check the status of udev's event queue.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoci: re-add osd_pool_default_size to 1 with the override
Sébastien Han [Sun, 8 Oct 2017 15:29:32 +0000 (17:29 +0200)]
ci: re-add osd_pool_default_size to 1 with the override

If we don't do this the client will create pools with a replica 3 since
osd_pool_default_size was gone in ceph-override.json. This was making
switch_to_containers failing.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agotox: decrease sleep to 2min instead of 5.
Sébastien Han [Sun, 8 Oct 2017 13:56:39 +0000 (15:56 +0200)]
tox: decrease sleep to 2min instead of 5.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoinfra: add independant purge-iscsi-gateways.yml
Sébastien Han [Sun, 8 Oct 2017 13:54:36 +0000 (15:54 +0200)]
infra: add independant purge-iscsi-gateways.yml

The current inclusion of purge-iscsi-gateways.yml in purge-cluster.yml
is not working well and blocking the CI too. So removing it from
purge-cluster.yml and re-add the original purge-iscsi-gateways.yml.

Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoconfig: do not duplicate sections when doing collocation
Sébastien Han [Sun, 8 Oct 2017 13:16:40 +0000 (15:16 +0200)]
config: do not duplicate sections when doing collocation

Prior to this commit, when collocating a RGW and NFS on the same box the
ceph.conf layout was the following:

[client.rgw.rgw0]
host = mds0
host = rgw0
rgw frontends = civetweb port=192.168.15.50:8080
num_threads=100[client.rgw.mds0]
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100
rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring
rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0
log file = /var/log/ceph/test-rgw-mds0.log
log file = /var/log/ceph/test-rgw-rgw0.log

[mds.mds0]
host = mds0

[global]
rgw override bucket index max shards = 16
fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5
rgw bucket default quota max objects = 1638400
osd_pool_default_size = 1
public network = 192.168.15.0/24
mon host = 192.168.15.10,192.168.15.11,192.168.15.12
osd_pool_default_pg_num = 8
cluster network = 192.168.16.0/24

[mds.rgw0]
host = rgw0

[client.rgw.mds0]
host = mds0
rgw data = /var/lib/ceph/radosgw/test-rgw.mds0
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100
log file = /var/log/ceph/test-rgw-mds0.log

Basically appending all the sections. This commits solves that.
Now the sections appear like this:

-bash-4.2# cat /etc/ceph/test.conf
[client.rgw.rgw0]
log file = /var/log/ceph/test-rgw-rgw0.log
host = rgw0
keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring
rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100

[client.rgw.mds0]
log file = /var/log/ceph/test-rgw-mds0.log
host = mds0
keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring
rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100

[global]
cluster network = 192.168.16.0/24
mon host = 192.168.15.10,192.168.15.11,192.168.15.12
osd_pool_default_size = 1
public network = 192.168.15.0/24
rgw bucket default quota max objects = 1638400
osd_pool_default_pg_num = 8
rgw override bucket index max shards = 16
fsid = 77a21980-3033-4174-9264-1abc7185bcb3

[mds.rgw0]
host = rgw0

[mds.mds0]
host = mds0

Signed-off-by: Sébastien Han <seb@redhat.com>