Bug 1585139 - osp13 deployment fails - 'dict object' has no attribute 'caps' in roles/ceph-osd/tasks/openstack_config.yml
Summary: osp13 deployment fails - 'dict object' has no attribute 'caps' in roles/ceph-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 3.1
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: 3.1
Assignee: Guillaume Abrioux
QA Contact: Rachana Patel
URL:
Whiteboard:
Depends On:
Blocks: 1548353
TreeView+ depends on / blocked
 
Reported: 2018-06-01 10:42 UTC by Pavel Sedlák
Modified: 2018-09-26 18:22 UTC (History)
10 users (show)

Fixed In Version: RHEL: ceph-ansible-3.1.0-0.1.rc6.el7cp Ubuntu: ceph-ansible_3.1.0~rc6-2redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-26 18:21:13 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 2679 0 None None None 2018-06-01 13:38:34 UTC
Red Hat Product Errata RHBA-2018:2819 0 None None None 2018-09-26 18:22:05 UTC

Description Pavel Sedlák 2018-06-01 10:42:53 UTC
OSP 13 director deployment of overcloud fails on

> 2018-05-31 17:38:07,165 p=31809 u=mistral |  fatal: [192.168.24.13]: FAILED! => {
>   "msg": "The task includes an option with an undefined variable.
>     The error was: 'dict object' has no attribute 'caps'
>
>     The error appears to have been in '/usr/share/ceph-ansible/roles/ceph-osd/tasks/openstack_config.yml': line 40, column 3, but may
>     be elsewhere in the file depending on the exact syntax problem.
>
>     The offending line appears to be:
>
>     - name: create openstack cephx key(s)
>       ^ here
>
>     exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
>     exception: 'dict object' has no attribute 'caps'
>   "}


Section around that line 40 looks like:
> - name: assign application to pool(s)
>   command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"
>   with_items: "{{ openstack_pools | unique }}"
>   changed_when: false
>   delegate_to: "{{ groups[mon_group_name][0] }}"
>   when:
>     - ceph_release_num[ceph_release] >= ceph_release_num['luminous']
>     - item.application is defined
> 
> - name: create openstack cephx key(s)
>   ceph_key:
>     state: present
>     name: "{{ item.name }}"
>     caps: "{{ item.caps }}"        ################## <- THIS CAPS MISSING ???????
>     secret: "{{ item.key | default('') }}"
>     containerized: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }}"
>     cluster: "{{ cluster }}"
>     mode: "{{ item.mode|default(omit) }}"
>   with_items: "{{ openstack_keys }}"
>   delegate_to: "{{ groups[mon_group_name][0] }}"
>   when: cephx
> 
> - name: fetch openstack cephx key(s)
>   fetch:
>     src: "/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
>     dest: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.{{ item.name }}.keyring"
>     flat: yes
>   delegate_to: "{{ groups[mon_group_name][0] }}"
>   with_items: "{{ openstack_keys }}"

Not sure if caps are expected to be visible here or not,
noticed that in roles/ceph-mon/tasks/main.yml that openstack_keys structure gets regenerated
and injects the caps property into these dicts (as also in ceph-client create_user_keys),
maybe issue of facts visibility, order of execution, or also needed in ceph-osd role?




ceph-ansible-3.1.0-0.1.rc5.el7cp.noarch

openstack-tripleo-common-8.6.1-18.el7ost.noarch
openstack-tripleo-ui-8.3.1-2.el7ost.noarch
python-tripleoclient-9.2.1-12.el7ost.noarch
puppet-tripleo-8.3.2-6.el7ost.noarch
openstack-tripleo-common-containers-8.6.1-18.el7ost.noarch
openstack-tripleo-heat-templates-8.0.2-29.el7ost.noarch
openstack-tripleo-puppet-elements-8.0.0-2.el7ost.noarch
ansible-tripleo-ipsec-8.1.1-0.20180308133440.8f5369a.el7ost.noarch
openstack-tripleo-validations-8.4.1-5.el7ost.noarch
openstack-tripleo-image-elements-8.0.1-1.el7ost.noarch

Comment 3 Guillaume Abrioux 2018-06-01 13:38:34 UTC
ceph/ceph-ansible/pull/2679

Comment 4 Guillaume Abrioux 2018-06-01 13:40:21 UTC
will be fixed in v3.1.0rc6

Comment 9 Rachana Patel 2018-06-05 03:16:49 UTC
Verified on RHEL and works for me hence moving to verified

Comment 11 errata-xmlrpc 2018-09-26 18:21:13 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.

https://access.redhat.com/errata/RHBA-2018:2819


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