Bug 2103673 - [RFE] Restrict `ceph_orch_host` mudules `labels` parameter to list
Summary: [RFE] Restrict `ceph_orch_host` mudules `labels` parameter to list
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.2
Assignee: Adam King
QA Contact: Vaibhav Mahajan
Akash Raj
URL:
Whiteboard:
Depends On:
Blocks: 2102272
TreeView+ depends on / blocked
 
Reported: 2022-07-04 13:08 UTC by Vaibhav Mahajan
Modified: 2022-08-09 17:39 UTC (History)
6 users (show)

Fixed In Version: cephadm-ansible-1.8.0-1.el8cp
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-09 17:39:24 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph cephadm-ansible pull 138 0 None Merged ceph_orch_host: fix type for parameter 'labels' 2022-07-04 15:44:37 UTC
Red Hat Issue Tracker RHCEPH-4664 0 None None None 2022-07-04 13:12:15 UTC
Red Hat Product Errata RHSA-2022:5997 0 None None None 2022-08-09 17:39:54 UTC

Description Vaibhav Mahajan 2022-07-04 13:08:33 UTC
Description of problem:

`ceph_orch_host` module accepts string but apply labels as list of chars to hosts


How reproducible: Always

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

- name: Test 'ceph_orch_host' module
  hosts: localhost
  gather_facts: false
  become: true
  any_errors_fatal: true
  tasks:
    - name: Add host node with single label
      ceph_orch_host:
        name: rhceph5x-5node-2
        address: 192.168.x.x
        labels: osd.2


```

Actual results:
```
[root@rhceph5x-5node-0 cephadm-ansible]# cephadm shell -- ceph orch host ls
Inferring fsid 5f269370-fb73-11ec-9e1a-0050568aa418
Using recent ceph image registry-proxy.engineering.redhat.com/rh-osbs/rhceph@sha256:7ecd768f9cfb2d71b4b05346321f3fc3c50be1c0224f4d64a1057c4ac53d1643
HOST              ADDR          LABELS     STATUS  
rhceph5x-5node-0  192.168.46.140  _admin             
rhceph5x-5node-1  192.168.46.96   o 1 . s d          
rhceph5x-5node-2  192.168.46.68   . s o d 2          
rhceph5x-5node-3  192.168.47.184  osd.3              
rhceph5x-5node-4  192.168.46.41   osd.4              
5 hosts in cluster
```

Expected results:
1. It either throw error for string or use string as label to the host

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

Comment 11 errata-xmlrpc 2022-08-09 17:39:24 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 (Moderate: Red Hat Ceph Storage Security, Bug Fix, and Enhancement 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-2022:5997


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