Bug 2103677 - [RFE] `address` parameter is mandatory when adding host using `ceph_orch_host` module
Summary: [RFE] `address` parameter is mandatory when adding host using `ceph_orch_host...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 5.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 5.3z1
Assignee: Guillaume Abrioux
QA Contact: Pranav Prakash
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-04 13:21 UTC by Vaibhav Mahajan
Modified: 2023-02-28 10:06 UTC (History)
6 users (show)

Fixed In Version: cephadm-ansible-1.10.0-1.el8cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-28 10:05:14 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-4665 0 None None None 2022-07-04 13:37:43 UTC
Red Hat Product Errata RHSA-2023:0980 0 None None None 2023-02-28 10:06:04 UTC

Description Vaibhav Mahajan 2022-07-04 13:21:35 UTC
Description of problem:
`ceph_orch_host` module require to pass both `address` and `name` to add host

How reproducible: Always


Steps to Reproduce:
Use below playbook 
```
---

- name: Test 'ceph_orch_host' module
  hosts: localhost
  gather_facts: false
  become: true
  any_errors_fatal: true
  tasks:
    - name: Add host node with valid IP address
      ceph_orch_host:
        name: rhceph5x-5node-1 

```

Actual results:
Fails to add host when address is not passed to playbook while adding cephadm host.

```
The full traceback is:
  File "/tmp/ansible_ceph_orch_host_payload_0hr7cz_d/ansible_ceph_orch_host_payload.zip/ansible/module_utils/basic.py", line 1677, in _check_required_if
    check_required_if(spec, param)
  File "/tmp/ansible_ceph_orch_host_payload_0hr7cz_d/ansible_ceph_orch_host_payload.zip/ansible/module_utils/common/validation.py", line 275, in check_required_if
    raise TypeError(to_native(msg))
fatal: [localhost]: FAILED! => changed=false 
  invocation:
    module_args:
      docker: false
      labels: []
      name: rhceph5x-5node-1
      set_admin_label: false
      state: present
  msg: 'state is present but all of the following are missing: address'

```

Expected results:

As cephadm command support to add host without passing host address, `ceph_orch_host` module should work without it. Refer below command
```
ceph orch host add rhceph5x-5node-1
```


Additional info:

Comment 1 RHEL Program Management 2022-07-04 13:21:43 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 17 errata-xmlrpc 2023-02-28 10:05:14 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 (Important: Red Hat Ceph Storage 5.3 Bug fix and security 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/RHSA-2023:0980


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