Bug 2103673

Summary: [RFE] Restrict `ceph_orch_host` mudules `labels` parameter to list
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vaibhav Mahajan <vamahaja>
Component: CephadmAssignee: Adam King <adking>
Status: CLOSED ERRATA QA Contact: Vaibhav Mahajan <vamahaja>
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 5.2CC: adking, akraj, cephqe-warriors, gabrioux, tserlin, vereddy
Target Milestone: ---Keywords: FutureFeature
Target Release: 5.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cephadm-ansible-1.8.0-1.el8cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-09 17:39:24 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: 2102272    

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