ceph-ansible/roles
Sébastien Han 5132cc3de4 Do not search osd ids if ceph-volume
Description of problem: The 'get osd id' task goes through all the 10 times (and its respective timeouts) to make sure that the number of OSDs in the osd directory match the number of devices.

This happens always, regardless if the setup and deployment is correct.

Version-Release number of selected component (if applicable): Surely the latest. But any ceph-ansible version that contains ceph-volume support is affected.

How reproducible: 100%

Steps to Reproduce:
1. Use ceph-volume (LVM) to deploy OSDs
2. Avoid using anything in the 'devices' section
3. Deploy the cluster

Actual results:
TASK [ceph-osd : get osd id _uses_shell=True, _raw_params=ls /var/lib/ceph/osd/ | sed 's/.*-//'] **********************************************************************************************************************************************
task path: /Users/alfredo/python/upstream/ceph/src/ceph-volume/ceph_volume/tests/functional/lvm/.tox/xenial-filestore-dmcrypt/tmp/ceph-ansible/roles/ceph-osd/tasks/start_osds.yml:6
FAILED - RETRYING: get osd id (10 retries left).
FAILED - RETRYING: get osd id (9 retries left).
FAILED - RETRYING: get osd id (8 retries left).
FAILED - RETRYING: get osd id (7 retries left).
FAILED - RETRYING: get osd id (6 retries left).
FAILED - RETRYING: get osd id (5 retries left).
FAILED - RETRYING: get osd id (4 retries left).
FAILED - RETRYING: get osd id (3 retries left).
FAILED - RETRYING: get osd id (2 retries left).
FAILED - RETRYING: get osd id (1 retries left).
ok: [osd0] => {
    "attempts": 10,
    "changed": false,
    "cmd": "ls /var/lib/ceph/osd/ | sed 's/.*-//'",
    "delta": "0:00:00.002717",
    "end": "2018-01-21 18:10:31.237933",
    "failed": true,
    "failed_when_result": false,
    "rc": 0,
    "start": "2018-01-21 18:10:31.235216"
}

STDOUT:

0
1
2

Expected results:
There aren't any (or just a few) timeouts while the OSDs are found

Additional info:
This is happening because the check is mapping the number of "devices" defined for ceph-disk (in this case it would be 0) to match the number of OSDs found.

Basically this line:

    until: osd_id.stdout_lines|length == devices|unique|length

Means in this 2 OSD case it is trying to ensure the following incorrect condition:

    until: 2 == 0

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1537103
2018-01-30 14:44:38 +01:00
..
ceph-agent ceph-agent: Add support for the openSUSE Leap distributions 2017-11-14 10:51:23 +00:00
ceph-client client: don't make `osd_pool_default_pg_num` mandatory 2017-12-14 17:22:07 +01:00
ceph-common firewall: add mds, nfs, restapi and iscsi ports, remove 'configure_firewall' variable used for conditional execution. Include the task only on rpm-based systems. 2017-12-12 23:44:55 +01:00
ceph-common-coreos Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-config config: add host-specific ceph_conf_overrides evaluation and generation. 2018-01-26 10:15:03 +01:00
ceph-defaults Add default for radosgw_keystone_ssl 2018-01-30 11:30:23 +01:00
ceph-docker-common handlers: avoid duplicate handler 2018-01-10 16:46:42 +01:00
ceph-fetch-keys ceph-fetch-keys: Add support for openSUSE Leap distributions 2017-11-14 10:51:23 +00:00
ceph-iscsi-gw Use check_mode instead of always_run 2017-10-25 09:53:34 -05:00
ceph-mds container: trigger handlers on systemd file change 2018-01-10 16:46:42 +01:00
ceph-mgr container: trigger handlers on systemd file change 2018-01-10 16:46:42 +01:00
ceph-mon crush: create rack type buckets and build crush tree according to {{ osd_crush_location }}. 2018-01-11 17:42:18 +01:00
ceph-nfs container: trigger handlers on systemd file change 2018-01-10 16:46:42 +01:00
ceph-osd Do not search osd ids if ceph-volume 2018-01-30 14:44:38 +01:00
ceph-rbd-mirror container: trigger handlers on systemd file change 2018-01-10 16:46:42 +01:00
ceph-restapi ceph-restapi: Add support for openSUSE Leap distributions 2017-11-14 10:51:23 +00:00
ceph-rgw rgw: disable legacy unit 2018-01-18 14:12:18 +01:00
ceph.ceph-common rollback previous change for ceph-common change 2016-03-02 18:44:36 +01:00
ceph.ceph-docker-common ceph-docker-common: add symlink to ceph.ceph-docker-common 2017-01-16 10:42:42 -06:00