]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/log
ceph-ansible.git
7 years agoroles: ceph-mgr: Install the ceph-mgr package on SUSE
Markos Chandras [Thu, 14 Dec 2017 18:13:09 +0000 (18:13 +0000)]
roles: ceph-mgr: Install the ceph-mgr package on SUSE

The ceph-mgr package name is identical to RedHat so add the SUSE family
to the existing task.

(cherry picked from commit 162b7d2b23b72adabdae32275962409e19ba4e0b)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoclient: don't make `osd_pool_default_pg_num` mandatory
Guillaume Abrioux [Tue, 12 Dec 2017 10:28:36 +0000 (11:28 +0100)]
client: don't make `osd_pool_default_pg_num` mandatory

making `osd_pool_default_pg_num` mandatory is a bit agressive and is
unrelated when you just want to create users keyrings.

Closes: #2241
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a24fd1cfd9a2f5a5daa9bee1f533cd2da0cc8fe2)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoclient: don't try to generate keys
Guillaume Abrioux [Tue, 12 Dec 2017 10:25:26 +0000 (11:25 +0100)]
client: don't try to generate keys

the entrypoint to generate users keyring is `ceph-authtool`, therefore,
it can expand the `$(ceph-authtool --gen-print-key)` inside the
container. Users must generate a keyring themselves.
This commit also adds a check to ensure keyring are properly filled when
`user_config: true`.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ab1dd3027a4b9932e58f28b86ab46979eb1f1682)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agodocker: add missing condition for selinux tasks
Guillaume Abrioux [Tue, 12 Dec 2017 13:55:02 +0000 (14:55 +0100)]
docker: add missing condition for selinux tasks

on `client` and `mds` roles, it tries to set selinux even on non rhel
based distributions.`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 26afe46e1333df8bec554feb3f57ab8c60390655)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agodefault: look for the right return code on socket stat in-use
Sébastien Han [Thu, 14 Dec 2017 10:31:28 +0000 (11:31 +0100)]
default: look for the right return code on socket stat in-use

As reported in https://github.com/ceph/ceph-ansible/issues/2254, the
check with fuser is not ideal. If fuser is not available the return code
is 127. Here we want to make sure that we looking for the correct return
code, so 1.

Closes: https://github.com/ceph/ceph-ansible/issues/2254
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 7eaf444328c8c381c673883913cf71b8ebe9d064)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2243 from ceph/2226-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:45:52 +0000 (10:45 +0100)]
Merge pull request #2243 from ceph/2226-bkp

[skip ci] backport of 2226

7 years agoMerge pull request #2237 from ceph/2211-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:45:33 +0000 (10:45 +0100)]
Merge pull request #2237 from ceph/2211-bkp

Set tighter permissions on keyrings when containerized

7 years agoMerge pull request #2231 from ceph/doc_update-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:45:12 +0000 (10:45 +0100)]
Merge pull request #2231 from ceph/doc_update-bkp

fix the ansible version for the stable-3.0 branch

7 years agoMerge pull request #2222 from ceph/2221-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:44:43 +0000 (10:44 +0100)]
Merge pull request #2222 from ceph/2221-bkp

[skip ci] backport of 2221

7 years agoMerge pull request #2220 from squidboylan/bkp-2215
Guillaume Abrioux [Mon, 11 Dec 2017 09:44:09 +0000 (10:44 +0100)]
Merge pull request #2220 from squidboylan/bkp-2215

Backport of 2215

7 years agoMerge pull request #2218 from ceph/2202-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:43:44 +0000 (10:43 +0100)]
Merge pull request #2218 from ceph/2202-bkp

[skip ci] backport of 2202

7 years agoMerge pull request #2217 from ceph/2214-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:43:23 +0000 (10:43 +0100)]
Merge pull request #2217 from ceph/2214-bkp

[skip ci] backport of 2214

7 years agoMerge pull request #2216 from ceph/2212-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:42:56 +0000 (10:42 +0100)]
Merge pull request #2216 from ceph/2212-bkp

Openstack: replaced hardcoded pool names with variables for openstack…

7 years agoMerge pull request #2203 from ceph/fix_purge_cluster-bkp
Guillaume Abrioux [Mon, 11 Dec 2017 09:42:31 +0000 (10:42 +0100)]
Merge pull request #2203 from ceph/fix_purge_cluster-bkp

purge-cluster: remove usage of `with_fileglob`

7 years agoMerge pull request #2099 from andymcc/stable-3.0
Guillaume Abrioux [Mon, 11 Dec 2017 09:42:10 +0000 (10:42 +0100)]
Merge pull request #2099 from andymcc/stable-3.0

Typo fix for radosgw@ systemd file

7 years agoUse parted module instead of command 2243/head
Andy McCrae [Thu, 30 Nov 2017 17:46:55 +0000 (17:46 +0000)]
Use parted module instead of command

(cherry picked from commit 4f1e854c79d0aa3635f35441f84e126a185f21fa)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2242 from icamys/fix2235
Guillaume Abrioux [Mon, 11 Dec 2017 09:02:26 +0000 (10:02 +0100)]
Merge pull request #2242 from icamys/fix2235

Vagrantfile: Fixed repeated OSD controller creation

7 years agoVagrantfile: Fixed repeated OSD controller creation 2242/head
Prisacari Dmitrii [Fri, 8 Dec 2017 17:09:50 +0000 (19:09 +0200)]
Vagrantfile: Fixed repeated OSD controller creation

7 years agoSet tighter permissions on keyrings when containerized 2237/head
John Fulton [Wed, 22 Nov 2017 21:38:30 +0000 (16:38 -0500)]
Set tighter permissions on keyrings when containerized

During a containerized deployment, set the permissions
of ceph.client.admin.keyring and other keyrings to
chmod 600 and chown it to ceph.

(cherry picked from commit ffae294288c3f4d1570094bc7cec2abd35fc67c3)

7 years agofix the ansible version for the stable-3.0 branch 2231/head
Yixing Yan [Mon, 6 Nov 2017 08:15:47 +0000 (16:15 +0800)]
fix the ansible version for the stable-3.0 branch

(cherry picked from commit 7d239b69082146305349666d6fd8125549b64feb)

7 years agopurge: fix bug on 'wait_for' task 2222/head
Guillaume Abrioux [Wed, 29 Nov 2017 10:10:56 +0000 (11:10 +0100)]
purge: fix bug on 'wait_for' task

this task hangs because `{{ inventory_hostname }}` doesn't resolv to an
actual ip address.
Using `hostvars[inventory_hostname]['ansible_default_ipv4']['address']`
should fix this because it will reach the node with its actual IP
address.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit aaaf980140832de694ef0ffe3282dabbf0b90081)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoBackport of 2215 2220/head
Caleb Boylan [Tue, 28 Nov 2017 19:49:09 +0000 (11:49 -0800)]
Backport of 2215

7 years agoosd: remove leftover and fix a typo 2218/head
Guillaume Abrioux [Tue, 21 Nov 2017 10:11:34 +0000 (11:11 +0100)]
osd: remove leftover and fix a typo

This task was originally needed to fix a docker installation issue
(see: #1030). This has been fixed, therefore it can be removed.

Fixes: #2199
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 1cba626484806f830e9ff03c48739292ce9fe6dc)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agohandlers: restart daemons only if docker is running 2217/head
Guillaume Abrioux [Mon, 27 Nov 2017 13:59:30 +0000 (14:59 +0100)]
handlers: restart daemons only if docker is running

In case where docker CLI is available but docker is not running, we
don't want to trigger the restart of the daemons.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1510555
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b26a840002c548dcbddf71a04229c16cff3699c6)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoOpenstack: replaced hardcoded pool names with variables for openstack (nova) user 2216/head
wintamute [Mon, 27 Nov 2017 10:21:05 +0000 (11:21 +0100)]
Openstack: replaced hardcoded pool names with variables for openstack (nova) user

(cherry picked from commit ebe0e60235f8dd8a9e4febec4de757b033f5d36a)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
7 years agoMerge pull request #2208 from ceph/2207-bkp v3.0.15
Sébastien Han [Wed, 22 Nov 2017 16:46:20 +0000 (17:46 +0100)]
Merge pull request #2208 from ceph/2207-bkp

[skip ci] backport of 2207

7 years agocommon: install ceph-common on all the machines 2208/head
Sébastien Han [Wed, 22 Nov 2017 16:11:50 +0000 (17:11 +0100)]
common: install ceph-common on all the machines

Since some daemons now install their own packages the task checking the
ceph version fails on Debian systems. So the 'ceph-common' package must
be installed on all the machines.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit bb7b29a9fcc33e7316bbe7dad3dc3cd5395ef8ab)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agopurge-cluster: remove usage of `with_fileglob` 2203/head
Guillaume Abrioux [Thu, 16 Nov 2017 10:49:18 +0000 (11:49 +0100)]
purge-cluster: remove usage of `with_fileglob`

`with_fileglob` loops over files on the machine where ansible-playbook
is being run.

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

7 years agoMerge pull request #2200 from ceph/2197-bkp v3.0.14
Guillaume Abrioux [Mon, 20 Nov 2017 13:03:05 +0000 (14:03 +0100)]
Merge pull request #2200 from ceph/2197-bkp

backport of 2197

7 years agoosd: ensure a gpt label is set on device 2200/head
Guillaume Abrioux [Fri, 17 Nov 2017 16:32:23 +0000 (17:32 +0100)]
osd: ensure a gpt label is set on device

ceph-disk prepare will fail on jewel if a GPT label is not present on
device.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit efe06be10ff6215fcc8a42919014650287b99ab7)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2188 from ceph/2182-bkp v3.0.13
Guillaume Abrioux [Thu, 16 Nov 2017 20:37:14 +0000 (21:37 +0100)]
Merge pull request #2188 from ceph/2182-bkp

[skip ci] 2182-bkp

7 years agorbd: enable ceph-rbd-mirror.target for releases <= luminous 2188/head
Guillaume Abrioux [Thu, 16 Nov 2017 09:50:30 +0000 (10:50 +0100)]
rbd: enable ceph-rbd-mirror.target for releases <= luminous

when `ceph-rbd-mirror.target` is not enabled, the service won't start
after a reboot because there is a dependency between these two units.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit ccad0ebf26c60e5856530aab1f6f7c2b1e6eae84)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2191 from ceph/empty-acl-bkp
Guillaume Abrioux [Thu, 16 Nov 2017 19:48:46 +0000 (20:48 +0100)]
Merge pull request #2191 from ceph/empty-acl-bkp

Make openstack_keys param support no acls list

7 years agoMerge pull request #2190 from ceph/fix_wildcard_remove-bkp
Guillaume Abrioux [Thu, 16 Nov 2017 18:57:55 +0000 (19:57 +0100)]
Merge pull request #2190 from ceph/fix_wildcard_remove-bkp

purge-docker: remove osd disk prepare logs

7 years agoMake openstack_keys param support no acls list 2191/head
John Fulton [Thu, 16 Nov 2017 16:29:59 +0000 (11:29 -0500)]
Make openstack_keys param support no acls list

A recent change [1] required that the openstack_keys
param always containe an acls list. However, it's
possible it might not contain that list. Thus, this
param sets a default for that list to be empty if it
is not in the structure as defined by the user.

[1] d65cbaa53952269ec9a2e76fca8203ce7ad22c2b

(cherry picked from commit d73f751b6372cbd60ddd6a24ae53232307b32fac)

7 years agoMerge pull request #2187 from ceph/fix_dmcrypt-bkp
Guillaume Abrioux [Thu, 16 Nov 2017 17:07:02 +0000 (18:07 +0100)]
Merge pull request #2187 from ceph/fix_dmcrypt-bkp

[backport][stable-3.0] Fix dmcrypt bkp

7 years agopurge-docker: remove osd disk prepare logs 2190/head
Guillaume Abrioux [Thu, 16 Nov 2017 10:36:17 +0000 (11:36 +0100)]
purge-docker: remove osd disk prepare logs

`with_fileglob` loops over files on the machine that runs the playbook.

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

7 years agoosd: remove leftover from osd partition 2187/head
Sébastien Han [Thu, 16 Nov 2017 13:58:40 +0000 (14:58 +0100)]
osd: remove leftover from osd partition

We used to support osds that are a partition. This is long gone so
removing this task.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 932345ab2acaeb4467572266b050551db41ce3b7)

7 years agoosd: remove failed_when on activation
Sébastien Han [Thu, 16 Nov 2017 13:57:49 +0000 (14:57 +0100)]
osd: remove failed_when on activation

There is no need to continue if the activation fails.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit b1c13223579a034db5a4ab47460a4eac0a38b1e2)

7 years agoosd: fix bad activation for dmcrypt
Sébastien Han [Thu, 16 Nov 2017 13:55:08 +0000 (14:55 +0100)]
osd: fix bad activation for dmcrypt

We were activating dmcrypt devices with the wrong command. Basically the
first task execute the wrong activate command. The task fails but
continues because of the 'failed_when: false'. Then the right activation
sequence is being done by the next task.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 80d3a242d0134de5790a015b40c8af1e37a2322b)

7 years agoMerge pull request #2183 from ceph/fix_nfs_pkg-bkp
Guillaume Abrioux [Thu, 16 Nov 2017 12:33:03 +0000 (13:33 +0100)]
Merge pull request #2183 from ceph/fix_nfs_pkg-bkp

fix: remove the duplicated code

7 years agofix: remove the duplicated code 2183/head
Yixing Yan [Thu, 16 Nov 2017 08:45:03 +0000 (16:45 +0800)]
fix: remove the duplicated code

(cherry picked from commit 097249371f0baae2b97367c219ac5973c57d60d3)

7 years agoMerge pull request #2179 from ceph/chmod-facl-on-all-mon-bkp v3.0.12
Guillaume Abrioux [Wed, 15 Nov 2017 18:40:03 +0000 (19:40 +0100)]
Merge pull request #2179 from ceph/chmod-facl-on-all-mon-bkp

Set permissions and ACLs of OpenStack keys on all ceph-mons

7 years agoSet permissions and ACLs of OpenStack keys on all ceph-mons 2179/head
John Fulton [Mon, 6 Nov 2017 22:24:48 +0000 (17:24 -0500)]
Set permissions and ACLs of OpenStack keys on all ceph-mons

If ceph-ansible deploys a Ceph cluster with "openstack_config: true"
and sets the openstack_keys map to have certain ACLs or permissions,
the requested ACLs or permissions are only set on one of the monitor
nodes [2] when they should be set on all of them.

This patch solves [3] the above issue by having the chmod and setfacl
tasks iterate the list of mon nodes (including the mon node that the
task was delegated to) to apply the chmod of setfacl to the keys in
openstack_keys.

[1]
```
openstack_keys:
  - { name: client.openstack, key: "$(ceph-authtool --gen-print-key)", mon_cap: "allow r", osd_cap: "allow class-read object_prefix rbd_children, allow rwx pool=images, allow rwx pool=vms, allow rwx pool=volumes, allow rwx pool=backups", mode: "0600", acls: ["u:nova:r--", "u:cinder:r--", "u:glance:r--", "u:gnocchi:r--"] }
```
[2]
```
$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.26 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

192.168.1.23 | SUCCESS | rc=0 >>
-rw-r--r--. 1 root root 253 Nov  3 20:30 /etc/ceph/ceph.client.openstack.keyring
user::rw-
group::r--
other::r--getfacl: Removing leading '/' from absolute path names

$
```
[3]
```
(undercloud) [stack@hci-director ceph-ansible]$ ansible mons -m shell -b -a "ls -l /etc/ceph/ceph.client.openstack.keyring ; getfacl /etc/ceph/ceph.client.openstack.keyring"
192.168.1.25 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.29 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

192.168.1.27 | SUCCESS | rc=0 >>
-rw-r-----+ 1 root root 253 Nov 14 01:12 /etc/ceph/ceph.client.openstack.keyring
user::rw-
user:glance:r--
user:nova:r--
user:cinder:r--
user:gnocchi:r--
group::---
mask::r--
other::---getfacl: Removing leading '/' from absolute path names

(undercloud) [stack@hci-director ceph-ansible]$
```

(cherry picked from commit d65cbaa53952269ec9a2e76fca8203ce7ad22c2b)

7 years agoMerge pull request #2173 from ceph/remove_osd_zap-bkp
Guillaume Abrioux [Wed, 15 Nov 2017 06:36:07 +0000 (07:36 +0100)]
Merge pull request #2173 from ceph/remove_osd_zap-bkp

[backport][stable-3.0] tests: remove OSD_FORCE_ZAP variable from tests

7 years agotests: remove OSD_FORCE_ZAP variable from tests 2173/head
Guillaume Abrioux [Tue, 14 Nov 2017 10:58:38 +0000 (11:58 +0100)]
tests: remove OSD_FORCE_ZAP variable from tests

according to ceph/ceph-container#840, this variable is no longer needed.

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

7 years agoMerge pull request #2171 from ceph/2165-bkp
Sébastien Han [Tue, 14 Nov 2017 13:47:28 +0000 (14:47 +0100)]
Merge pull request #2171 from ceph/2165-bkp

[skip ci] backport of 2165

7 years agotests: set CEPH_STABLE_RELEASE in ceph-build 2171/head
Guillaume Abrioux [Fri, 10 Nov 2017 17:25:25 +0000 (18:25 +0100)]
tests: set CEPH_STABLE_RELEASE in ceph-build

`CEPH_STABLE_RELEASE` needs to bet set in ceph-build according
to ceph/ceph-ansible#2165

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 7a1d7d92ff4d6f38be9f11f4c26909b361b58f99)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2169 from ceph/2167-bkp v3.0.11
Sébastien Han [Mon, 13 Nov 2017 16:40:12 +0000 (03:40 +1100)]
Merge pull request #2169 from ceph/2167-bkp

[skip ci] backport of 2167

7 years agodefaults: fix rgw restart script in handlers 2169/head
Guillaume Abrioux [Mon, 13 Nov 2017 15:27:51 +0000 (16:27 +0100)]
defaults: fix rgw restart script in handlers

Like 80d32dec, the path to the fact is not correct.
In any case, we will retrieve the IP address in hostvars, the variable
is the way we get the interface name according where it has been set
(eg.: inventory host file vs. group_vars/)

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1510906
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 44df3f9102773c10011c82b5c1a20e7ae46e0001)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2168 from ceph/fix_lvm-bkp
Sébastien Han [Mon, 13 Nov 2017 15:42:29 +0000 (02:42 +1100)]
Merge pull request #2168 from ceph/fix_lvm-bkp

[skip ci] osd: skip some set_fact when osd_scenario=lvm

7 years agoosd: skip some set_fact when osd_scenario=lvm 2168/head
Guillaume Abrioux [Tue, 7 Nov 2017 14:30:08 +0000 (15:30 +0100)]
osd: skip some set_fact when osd_scenario=lvm

these tasks are not needed when using `osd_scenario: lvm`

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1509230
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 238754a8446f5ae3d2eefea9420e6d61f4426481)

7 years agoMerge pull request #2164 from ceph/ansible-2.4.1.0-bkp
Guillaume Abrioux [Fri, 10 Nov 2017 17:58:55 +0000 (18:58 +0100)]
Merge pull request #2164 from ceph/ansible-2.4.1.0-bkp

[skip ci] backport of ansible-2.4.1.0

7 years agorpm: require ansible 2.4.1.0 2164/head
Ken Dreyer [Fri, 10 Nov 2017 17:11:31 +0000 (10:11 -0700)]
rpm: require ansible 2.4.1.0

2.4.0.0 has some bugs, and we're going to ship with v2.4.1.0.

(cherry picked from commit 3c999b3191678ff38d90bf1b1e718871ac3357d1)
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
7 years agoMerge pull request #2160 from ceph/bz-1510470-bkp v3.0.10
Guillaume Abrioux [Fri, 10 Nov 2017 14:19:43 +0000 (15:19 +0100)]
Merge pull request #2160 from ceph/bz-1510470-bkp

purge-docker-cluster: ensure old logs are removed

7 years agoMerge pull request #2161 from ceph/update_test-bkp
Guillaume Abrioux [Fri, 10 Nov 2017 13:12:29 +0000 (14:12 +0100)]
Merge pull request #2161 from ceph/update_test-bkp

[Backport][stable-3.0] Update test bkp

7 years agopurge: containers are not stopped 2161/head
Guillaume Abrioux [Wed, 25 Oct 2017 05:48:42 +0000 (07:48 +0200)]
purge: containers are not stopped

During purge osd, the containers are not stopped because of a typo, as a
result, all the devices can't be unmounted later.

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

7 years agotests: sync with ceph/ceph-build for ceph-ansible-nightlies
Guillaume Abrioux [Fri, 27 Oct 2017 11:22:28 +0000 (13:22 +0200)]
tests: sync with ceph/ceph-build for ceph-ansible-nightlies

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

7 years agotests: split purge_cluster, followup on a53aa9e
Guillaume Abrioux [Fri, 20 Oct 2017 15:18:39 +0000 (17:18 +0200)]
tests: split purge_cluster, followup on a53aa9e

- split purge_cluster because we need to test filestore and bluestore
scenarios.
- clean some leftover.

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

7 years agotests: followup on testing against ansible2.4
Guillaume Abrioux [Mon, 30 Oct 2017 13:45:59 +0000 (14:45 +0100)]
tests: followup on testing against ansible2.4

ceph-ansible is now being testing against ansible2.2 and ansible2.4. We
need to update tox.ini so we use the right version of testinfra
regarding which ansible version we are using.

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

7 years agopurge-docker-cluster: ensure old logs are removed 2160/head
Guillaume Abrioux [Thu, 9 Nov 2017 09:42:14 +0000 (10:42 +0100)]
purge-docker-cluster: ensure old logs are removed

purge-docker-cluster must remove all osd_disk_prepare logs in
`{{ ceph_osd_docker_run_script_path }}`, otherwise if you purge your
cluster and try to redeploy it, osds will fail to start since because it
will try to retrieve find a partition uuid which doesn't exist.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1510470
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit fa675f2ead6216daec60048e7087122ef287bb0f)

7 years agoMerge pull request #2159 from ceph/fix_autodiscover-bkp
Guillaume Abrioux [Fri, 10 Nov 2017 05:53:11 +0000 (06:53 +0100)]
Merge pull request #2159 from ceph/fix_autodiscover-bkp

osd: avoid using non desired loop device in autodiscovery

7 years agoosd: avoid using non desired loop device in autodiscovery 2159/head
Guillaume Abrioux [Thu, 9 Nov 2017 09:26:24 +0000 (10:26 +0100)]
osd: avoid using non desired loop device in autodiscovery

This will prevent ceph-ansible from using a loop device while it
shouldn't in auto_discovery mode.

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

7 years agoMerge pull request #2158 from ceph/fix_disk_list_test-bkp
Guillaume Abrioux [Thu, 9 Nov 2017 22:55:51 +0000 (23:55 +0100)]
Merge pull request #2158 from ceph/fix_disk_list_test-bkp

[skip ci] osd: always run disk_list test

7 years agoosd: always run disk_list test 2158/head
Guillaume Abrioux [Thu, 9 Nov 2017 10:05:59 +0000 (11:05 +0100)]
osd: always run disk_list test

there is no need to have a condition on this task, this test should be
always run since the result will be interpreted later.

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

7 years agoMerge pull request #2155 from ceph/bz-1510906-bkp
Guillaume Abrioux [Thu, 9 Nov 2017 12:29:51 +0000 (13:29 +0100)]
Merge pull request #2155 from ceph/bz-1510906-bkp

[backport][stable-3.0] config: fix config generation

7 years agoconfig: fix config generation 2155/head
Guillaume Abrioux [Wed, 8 Nov 2017 23:03:00 +0000 (00:03 +0100)]
config: fix config generation

The path to the fact is not correct.
In any case, we will retrieve the IP address in hostvars, the variable
is the way we get the interface name according where it has been set
(eg.: inventory host file vs. group_vars/)

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1510906
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 80d32decd3e5c58c732eb06017be886b0f5d75e4)

7 years agoMerge pull request #2149 from ceph/update_tests-bkp
Guillaume Abrioux [Wed, 8 Nov 2017 20:13:29 +0000 (21:13 +0100)]
Merge pull request #2149 from ceph/update_tests-bkp

[backport][stable-3.0] Update tests bkp

7 years agotests: add missing test for rbd 2149/head
Guillaume Abrioux [Mon, 30 Oct 2017 18:44:56 +0000 (19:44 +0100)]
tests: add missing test for rbd

Add a missing test `test_rbd_mirror_service_is_running_from_luminous()`.
Also using bash -c "<cmd>" to make testinfra aware that later in
the upgrade process we are now running `luminous` ceph release so we
must skip the rbd tests related to `jewel` ceph release.

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

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>
(cherry picked from commit a2880e6345214b209036ddf28fd230a68ff34c24)

7 years agoMerge pull request #2147 from ceph/fix-autodiscover-bkp
Guillaume Abrioux [Wed, 8 Nov 2017 16:33:02 +0000 (17:33 +0100)]
Merge pull request #2147 from ceph/fix-autodiscover-bkp

[backport][stable-3.0]: Fix autodiscover bkp

7 years agoMerge pull request #2148 from ceph/fix_tox-bkp
Guillaume Abrioux [Wed, 8 Nov 2017 15:40:59 +0000 (16:40 +0100)]
Merge pull request #2148 from ceph/fix_tox-bkp

tests: re-add missing param in tox

7 years agotests: add missing override for collocation scenario 2148/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>
(cherry picked from commit a179e312fdb02bbe9bf852637f4cbc2655f9b0dd)

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>
(cherry picked from commit 93f0856770ca1cee7628f906c06f94ee77c8be7e)

7 years agoosd: fix automatic prepare when auto_discover 2147/head
Guillaume Abrioux [Wed, 8 Nov 2017 07:47:39 +0000 (08:47 +0100)]
osd: fix automatic prepare when auto_discover

Use `devices` variable instead of `ansible_devices`, otherwise it means
we are not using the devices which have been 'auto discovered'

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

7 years agoosd: do not use dm when osd_auto_discovery
Sébastien Han [Wed, 8 Nov 2017 00:33:10 +0000 (11:33 +1100)]
osd: do not use dm when osd_auto_discovery

The current code will also return lvm devices such as /dev/dm-2, this
kind of device type is not supported by ceph-disk at the moment. Now we
just ignore them.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 0930f149154151e19dfc85917b1d8acf19234d33)

7 years agoMerge pull request #2130 from ceph/2128-bkp v3.0.9
Sébastien Han [Fri, 3 Nov 2017 12:19:15 +0000 (13:19 +0100)]
Merge pull request #2130 from ceph/2128-bkp

[skip ci] 2128-bkp

7 years agoosd: enhance backward compatibility 2130/head
Sébastien Han [Thu, 2 Nov 2017 15:17:38 +0000 (16:17 +0100)]
osd: enhance backward compatibility

During the initial implementation of this 'old' thing we were falling
into this issue without noticing
https://github.com/moby/moby/issues/30341 and where blindly using --rm,
now this is fixed the prepare container disappears and thus activation
fail.
I'm fixing this for old jewel images.

Also this fixes the machine reboot case where the docker logs are
purgend. In the old scenario, we now store the log locally in the same
directory as the ceph-osd-run.sh script.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit d4ed9a2064e503ac4a4fe978cb9e196ca9150272)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoconfig: fix monitor_interface when not passed in the inventory file
Sébastien Han [Thu, 2 Nov 2017 13:53:46 +0000 (14:53 +0100)]
config: fix monitor_interface when not passed in the inventory file

Setting monitor_interface in group_vars/all.yml makes the
hostvars[host]['monitor_interface'] non-existing.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1507922
(cherry picked from commit ab7eb79212f90edbfe29faf40dac5d209c7a70a9)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2125 from ceph/2000-bkp v3.0.8
Sébastien Han [Tue, 31 Oct 2017 13:44:54 +0000 (14:44 +0100)]
Merge pull request #2125 from ceph/2000-bkp

[skip ci] backport of 2000

7 years agoci: new osd scenarios 2125/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>
(cherry picked from commit a53aa9e8b41606e2ff996f036a7a86679126cd92)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2120 from ceph/2090-bkp
Sébastien Han [Fri, 27 Oct 2017 15:44:11 +0000 (17:44 +0200)]
Merge pull request #2120 from ceph/2090-bkp

[skip ci] 2090-bkp

7 years agoTest ansible 2.4.1 2120/head
Sébastien Han [Mon, 23 Oct 2017 10:03:01 +0000 (12:03 +0200)]
Test ansible 2.4.1

We now test with Ansible 2.4. We had to change testinfra's version since
only recent versions work with 2.4. See:
https://github.com/philpep/testinfra/issues/249

Closes: https://github.com/ceph/ceph-ansible/issues/2087
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit c4ad2477188c2d226a4ea2e0fa6693967d5b103c)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2119 from ceph/2117-bkp v3.0.7
Sébastien Han [Fri, 27 Oct 2017 11:51:07 +0000 (13:51 +0200)]
Merge pull request #2119 from ceph/2117-bkp

[skip ci] 2117-bkp

7 years agodefault: remove dup variable 2119/head
Sébastien Han [Fri, 27 Oct 2017 09:46:15 +0000 (11:46 +0200)]
default: remove dup variable

ceph_repository_type was declared multiple times. This commit fixes
this.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit d2575c7f5e5520f6ee65c5007853b3248d2c7a10)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2116 from ceph/2110-bkp
Sébastien Han [Fri, 27 Oct 2017 07:56:55 +0000 (09:56 +0200)]
Merge pull request #2116 from ceph/2110-bkp

[skip ci] 2110-bkp

7 years agoMake acls and mode parameters of opentack_keys optional 2116/head
John Fulton [Wed, 25 Oct 2017 23:46:02 +0000 (23:46 +0000)]
Make acls and mode parameters of opentack_keys optional

Only chmod or setfacl the requested keyring(s) in the
opentack_keys data structure when the mode or acls keys
of that data structure exist.

User may specify four permission combinations for the
keyring file(s): 1. only set ACL, 2. only set mode,
3. set neither mode nor ACL, 4. set mode and then ACL.

Fixes: #2092
(cherry picked from commit ae156e9f34ed9083382bedf53d8f451360ce978a)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2113 from ceph/2112-bkp v3.0.6
Sébastien Han [Thu, 26 Oct 2017 12:23:54 +0000 (14:23 +0200)]
Merge pull request #2113 from ceph/2112-bkp

[skip ci] 2112-bkp

7 years agopurge: do not reboot by default 2113/head
Sébastien Han [Thu, 26 Oct 2017 12:18:38 +0000 (14:18 +0200)]
purge: do not reboot by default

Rebooting servers is really intrusive and perhaps this is not what the
operator wants. So we disable the reboot by default now. Note that the
reboot might not happen all the time.
It can be enabled by default by running the purge playbook with -e
reboot_osd_node=True

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1505011
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 2837d0a22e258cee583f14e402a99d89c9a16cd6)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2108 from ceph/2103-bkp v3.0.5
Sébastien Han [Wed, 25 Oct 2017 15:36:39 +0000 (17:36 +0200)]
Merge pull request #2108 from ceph/2103-bkp

[skip ci] 2103-bkp

7 years agoOption to set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES 2108/head
Andy McCrae [Mon, 23 Oct 2017 13:57:24 +0000 (14:57 +0100)]
Option to set TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES

Use "ceph_tcmalloc_max_total_thread_cache" to set the
TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES value inside /etc/default/ceph for
Debian installs, or /etc/sysconfig/ceph for Red Hat/CentOS installs.

By default this is set to 0, so the default package value will be used,
if specified this value will be changed to match the variable, and ceph
osd services will be restarted.

(cherry picked from commit 7f6c39102d4fc1c9ec987fe3dd06693a94ad56fb)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2107 from ceph/2104-bkp
Sébastien Han [Wed, 25 Oct 2017 15:35:43 +0000 (17:35 +0200)]
Merge pull request #2107 from ceph/2104-bkp

[skip ci] 2104-bkp

7 years agorgw/nfs: fix section duplication 2107/head
Sébastien Han [Wed, 25 Oct 2017 13:45:37 +0000 (15:45 +0200)]
rgw/nfs: fix section duplication

Once and for all, hopefully...

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 8670b45ef2cfcf35bac5d7f83b93099bfa1d9f9e)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoMerge pull request #2106 from ceph/2084-bkp
Sébastien Han [Wed, 25 Oct 2017 15:34:39 +0000 (17:34 +0200)]
Merge pull request #2106 from ceph/2084-bkp

[skip ci] 2084-bkp

7 years agoosd: bring backward compatibility with old Jewel images 2106/head
Sébastien Han [Fri, 20 Oct 2017 13:15:38 +0000 (15:15 +0200)]
osd: bring backward compatibility with old Jewel images

There was a huge resync from luminous to jewel in ceph-docker:
https://github.com/ceph/ceph-docker/pull/797

This change brought a new handy function to discover partitions tight to
an OSD. This function doesn't exist in the old image so the
ceph-osd-run.sh script breaks when trying to deploy Jewel OSD with that
old Jewel image version.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 968ef04324e9064fcecfe88bc5464ad9c2673a13)
Signed-off-by: Sébastien Han <seb@redhat.com>
7 years agoTypo fix for radosgw@ systemd file 2099/head
Andy McCrae [Mon, 23 Oct 2017 13:07:23 +0000 (14:07 +0100)]
Typo fix for radosgw@ systemd file

systemd script for radosgw is radosgw@ not rgw@, the directory needs to
match the path.

(cherry picked from commit 05a1f965c8dd342e2643286d0228b5352f5afd36)

7 years agoMerge pull request #2083 from ceph/2.4-3.0-backward-bkp v3.0.4
Sébastien Han [Fri, 20 Oct 2017 12:01:45 +0000 (14:01 +0200)]
Merge pull request #2083 from ceph/2.4-3.0-backward-bkp

[skip ci] 2.4-3.0-backward-bkp

7 years agoall: backward compatibility between stable-2.2 and 3.0 2083/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>
(cherry picked from commit 4413511b6619e22007b7988ab9929d618e0dcd01)
Signed-off-by: Sébastien Han <seb@redhat.com>
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>
(cherry picked from commit 982326373b9474231015639eac8fc52a3b0878a3)
Signed-off-by: Sébastien Han <seb@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)
(cherry picked from commit 70034451e98e630605bcc618dfebd8629a97af9a)
Signed-off-by: Sébastien Han <seb@redhat.com>