Bug 1970313 - cephadm-adopt playbook fails to update the mgr placement when no mgr group is defined in inventory
Summary: cephadm-adopt playbook fails to update the mgr placement when no mgr group is...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.0
Assignee: Guillaume Abrioux
QA Contact: Ameena Suhani S H
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-10 08:45 UTC by Guillaume Abrioux
Modified: 2021-08-30 08:31 UTC (History)
8 users (show)

Fixed In Version: ceph-ansible-6.0.9-1.el8cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-30 08:31:13 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 6575 0 None open cephadm-adopt: fix mgr placement hosts task 2021-06-10 13:16:29 UTC
Red Hat Product Errata RHBA-2021:3294 0 None None None 2021-08-30 08:31:21 UTC

Description Guillaume Abrioux 2021-06-10 08:45:35 UTC
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.

Comment 9 errata-xmlrpc 2021-08-30 08:31:13 UTC
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


Note You need to log in before you can comment on or make changes to this bug.