Bug 1997083

Summary: [ceph-ansible] [Testathon] cephadm-adopt.yml fails on "TASK [manage nodes with cephadm]"
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Tomas Petr <tpetr>
Component: Ceph-AnsibleAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: high Docs Contact: Mary Frances Hull <mhull>
Priority: high    
Version: 5.0CC: adking, agunn, aoconnor, aschoen, asriram, ceph-eng-bugs, dsavinea, gabrioux, gmeno, gsitlani, khartsoe, lithomas, mhull, msaini, nthomas, rmandyam, sewagner, sostapov, sunnagar, tserlin, vashastr, vereddy, ykaul
Target Milestone: ---Flags: mhull: needinfo-
Target Release: 5.0z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-6.0.14-1.el8cp Doc Type: Bug Fix
Doc Text:
.The Ceph Ansible `cephadm-adopt.yml` playbook can add nodes with a host’s fully-qualified domain name Previously, the task that adds nodes in `cephadm` using the Ceph Ansible `cephadm-adopt.yml` playbook, was using the short host name, and was not matching the current fully-qualified domain name (FQDN) of a node. As a result, the adoption playbook failed because no match to the FQDN host name was found. With this release, the playbook uses the `ansible_nodename` fact instead of the `ansble_hostname` fact, allowing the adoption playbook to add nodes configured with a FQDN.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-02 16:39:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1959686    

Description Tomas Petr 2021-08-24 11:58:21 UTC
Description of problem:
# ansible-playbook infrastructure-playbooks/cephadm-adopt.yml

fails on TASK for all nodes:
TASK [manage nodes with cephadm] 
Tuesday 24 August 2021  07:48:38 -0400 (0:00:01.838)       0:00:59.454 ******** 
fatal: [mons-0.siterdub.lab.rdu2.cee.redhat.com -> mons-0.siterdub.lab.rdu2.cee.redhat.com]: FAILED! => changed=false 
  cmd:
  - podman
  - run
  - --rm
  - --net=host
  - -v
  - /etc/ceph:/etc/ceph:z
  - -v
  - /var/lib/ceph:/var/lib/ceph:z
  - -v
  - /var/run/ceph:/var/run/ceph:z
  - --entrypoint=ceph
  - docker-registry.upshift.redhat.com/ceph/ceph-5.0-rhel-8:latest
  - --cluster
  - ceph
  - orch
  - host
  - add
  - mons-0
  - 10.10.95.151
  - mgrs
  - mons
  delta: '0:00:06.332408'
  end: '2021-08-24 07:48:44.971645'
  msg: non-zero return code
  rc: 22
  start: '2021-08-24 07:48:38.639237'
  stderr: 'Error EINVAL: Host mons-0 (10.10.95.151) failed check(s): [''hostname "mons-0.siterdub.lab.rdu2.cee.redhat.com" does not match expected hostname "mons-0"'']'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
------

on node mons-0:
# hostname
mons-0.siterdub.lab.rdu2.cee.redhat.com

from ansible:
# ansible mons-0 -m setup | grep -e hostname -e mons-0
[WARNING]: While constructing a mapping from /usr/share/ceph-ansible/group_vars/all.yml, line 1, column 1, found a duplicate dict key (containerized_deployment). Using last defined value only.
mons-0 | SUCCESS => {
        "ansible_fqdn": "mons-0.siterdub.lab.rdu2.cee.redhat.com",
        "ansible_hostname": "mons-0",
        "ansible_nodename": "mons-0.siterdub.lab.rdu2.cee.redhat.com",


Version-Release number of selected component (if applicable):
# rpm -qa | grep ansible
ansible-2.9.25-1.el8ae.noarch
ceph-ansible-6.0.11.1-1.el8cp.noarch

ceph version 16.2.0-117.el8cp


How reproducible:
always

Steps to Reproduce:
1. following upgrade RHCS 4->5 upgrade path
2. in section CONVERTING THE STORAGE CLUSTER TO USING CEPHADM
3. ansible-playbook infrastructure-playbooks/cephadm-adopt.ym

Actual results:


Expected results:


Additional info:

Comment 15 Scott Ostapovicz 2021-08-30 13:35:29 UTC
This needs to be thoroughly tested.

Comment 33 errata-xmlrpc 2021-11-02 16:39:06 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 update), 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:4105