Bug 1798781

Summary: The ceph client role does not support --limit
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: John Fulton <johfulto>
Component: Ceph-AnsibleAssignee: Dimitri Savineau <dsavinea>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: amsyedha, aschoen, ceph-eng-bugs, ceph-qe-bugs, gabrioux, gfidente, gmeno, hyelloji, knortema, lshort, nthomas, pasik, tserlin, ykaul
Target Milestone: rcFlags: hyelloji: needinfo-
Target Release: 4.1   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: ceph-ansible-4.0.15-1.el8, ceph-ansible-4.0.15-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-19 17:32:27 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:
Bug Depends On:    
Bug Blocks: 1760354    

Description John Fulton 2020-02-06 00:25:11 UTC
While using v4.0.14 with `ansible-playbook ... --limit host200,host201,...` where host200,host201... are in the inventory under the [clients] role, the ceph-ansible playbook run failed with the error below as if it had missing facts. 

It's very useful for the ceph-client role to support '--limit' because re-running the client role on ~250 clients takes 2.5 hours. In this case I was trying to help someone add just 10 more clients to a deployment which already had about 250 of them. Users shouldn't have to wait to reconfigure the all clients when we only need 10 configured.

2020-02-05 18:38:53,814 p=370999 u=root |  fatal: [overcloud-ms5039compute-148]: FAILED! =>
  msg: |-
    The conditional check '(hostvars[item]['ansible_architecture'] == 'x86_64') or (not containerized_deployment | bool)' failed. The error was: error while evaluating conditional ((hostvars[item]['ansible_architecture'] == 'x86_64') or (not containerized_deployment | bool)): 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_architecture'                 

    The error appears to be in '/usr/share/ceph-ansible/roles/ceph-client/tasks/create_users_keys.yml': line 18, column 3, but may                                                          
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    # will add all client hosts to the group (and not filter).
    - name: create filtered clients group
      ^ here

Comment 1 RHEL Program Management 2020-02-06 00:25:17 UTC
Please specify the severity of this bug. Severity is defined here:

Comment 9 errata-xmlrpc 2020-05-19 17:32:27 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.