cephadm-adopt playbook fails at the following task when no [mgrs] is defined in inventory. TASK [update the placement of manager hosts] ********************************************************************************************************************************************** task path: /home/guits/debug_rbd-mirror/infrastructure-playbooks/cephadm-adopt.yml:1232 Thursday 10 June 2021 10:31:50 +0200 (0:00:03.879) 0:03:41.024 ********* fatal: [mon0]: FAILED! => changed=false cmd: - cephadm - shell - --fsid - dd92b433-8aea-404d-acbc-b37949222445 - -- - ceph - --cluster - ceph - orch - apply - mgr - --placement=0 label:mgrs delta: '0:00:03.034470' end: '2021-06-10 08:31:53.833946' msg: non-zero return code rc: 22 start: '2021-06-10 08:31:50.799476' stderr: |- Inferring config /var/lib/ceph/dd92b433-8aea-404d-acbc-b37949222445/mon.mon0/config Error EINVAL: num/count must be > 1 stderr_lines: <omitted> stdout: '' stdout_lines: <omitted> Not having this group defined in the inventory is supported since we automatically collocate an mgr daemon with a monitor node. In that case, the task updating the placement of manager daemons is failing because it's trying to set --placement=0 since it relies on {{ groups.get(mgr_group_name, []) | length }} which is obviously equal to 0 in the case no [mgrs] group is defined.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat Ceph Storage 5.0 bug fix and enhancement), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3294