Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1510906

Summary: [ceph-ansible] [ceph-container] : conf file generation failing - list object has no attribute u'ipv4'
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: Ceph-AnsibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Vasishta <vashastr>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.0CC: adeza, aschoen, ceph-eng-bugs, gmeno, hgurav, hnallurv, kdreyer, nthomas, sankarshan, tserlin, vimishra
Target Milestone: rc   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-ansible-3.0.11-1.el7cp Ubuntu: ceph-ansible_3.0.11-2redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-05 23:49:35 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:
Attachments:
Description Flags
File contains ansible-playbook log
none
File contains contents of inventory file, all.yml, ansible-playbook log none

Description Vasishta 2017-11-08 12:33:00 UTC
Created attachment 1349432 [details]
File contains ansible-playbook log

Description of problem:
Containerized cluster installation is failing while generating conf file saying list object has no attribute u'ipv4'

Version-Release number of selected component (if applicable):
$ rpm -qa|grep ansible
ceph-ansible-3.0.9-1.el7cp.noarch
ansible-2.4.1.0-1.el7ae.noarch


How reproducible:
Always (2/2)

Steps to Reproduce:
1. Configure ceph-ansible using container-guide
2. run ansible-playbook


Actual results:
fatal: [magna025]: FAILED! => {"failed": true, "msg": "'list object' has no attribute u'ipv4'"}

Expected results:
Cluster must get initialized without any errors

Additional info:
This issue was not observed while using ceph-ansible-3.0.9-1 and ansible-2.4.0.0-5

$ cat group_vars/all.yml | egrep -v ^# | grep -v ^$
---
dummy:
fetch_directory: ~/ceph-ansible-keys
cluster: ceph_3
ceph_origin: repository
ceph_repository: rhcs
monitor_interface: eno1
public_network: 10.8.128.0/21
ceph_docker_image: "rhceph"
ceph_docker_image_tag: "ceph-3.0-rhel-7-docker-candidate-23539-20171107221018"
ceph_docker_registry: "brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888"
containerized_deployment: true

Comment 5 Christina Meno 2017-11-08 15:02:22 UTC
Guillaume, it looks like the only change is to the ansible version. Would you please try to reproduce this today?

Comment 7 Guillaume Abrioux 2017-11-08 23:10:04 UTC
upstream PR: https://github.com/ceph/ceph-ansible/pull/2150

Comment 8 Guillaume Abrioux 2017-11-09 10:28:49 UTC
merged upstream in master.
backport PR in stable-3.0: https://github.com/ceph/ceph-ansible/pull/2155

will be in v3.0.10

Comment 9 Vidushi Mishra 2017-11-09 10:51:39 UTC
Observed same issue with a non-containerized cluster.

Got error for 'rgw' nodes in the below task:

TASK [ceph-config : generate ceph configuration file: ceph.conf] **************************************************************************************************************************************************
[DEPRECATION WARNING]: ansible.utils.unicode.to_bytes is deprecated.  Use ansible.module_utils._text.to_bytes instead. This feature will be removed in version 2.4. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: ansible.utils.unicode.to_unicode is deprecated.  Use ansible.module_utils._text.to_text instead. This feature will be removed in version 2.4. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: ansible.utils.unicode.to_bytes is deprecated.  Use ansible.module_utils._text.to_bytes instead. This feature will be removed in version 2.4. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: ansible.utils.unicode.to_unicode is deprecated.  Use ansible.module_utils._text.to_text instead. This feature will be removed in version 2.4. Deprecation warnings can be disabled by 
setting deprecation_warnings=False in ansible.cfg.
fatal: [magna045]: FAILED! => {"failed": true, "msg": "'list object' has no attribute u'ipv4'"}
fatal: [magna024]: FAILED! => {"failed": true, "msg": "'list object' has no attribute u'ipv4'"}

PLAY RECAP ********************************************************************************************************************************************************************************************************
magna021                   : ok=100  changed=5    unreachable=0    failed=0   
magna024                   : ok=30   changed=0    unreachable=0    failed=1   
magna045                   : ok=35   changed=2    unreachable=0    failed=1   
magna055                   : ok=57   changed=2    unreachable=0    failed=0   
magna060                   : ok=52   changed=0    unreachable=0    failed=0   
magna079                   : ok=52   changed=0    unreachable=0    failed=0   
[ubuntu@magna021 ceph-ansible]$ sudo ceph -s
  cluster:
    id:     89b3235e-019d-47bc-855b-80618b092bf2
    health: HEALTH_OK
 
  services:
    mon: 1 daemons, quorum magna021
    mgr: magna021(active)
    osd: 9 osds: 9 up, 9 in
 
  data:
    pools:   0 pools, 0 pgs
    objects: 0 objects, 0 bytes
    usage:   966 MB used, 8288 GB / 8289 GB avail
    pgs:     
 
[ubuntu@magna021 ceph-ansible]$ rpm -qa | grep ansible
ceph-ansible-3.0.9-1.el7cp.noarch
ansible-2.4.1.0-1.el7ae.noarch

Comment 10 Guillaume Abrioux 2017-11-09 10:54:47 UTC
Can I access your env?

Comment 11 Guillaume Abrioux 2017-11-09 10:59:30 UTC
Vidushi, ragosgw config generation part has been fixed in that same commit[1].

[1] https://github.com/ceph/ceph-ansible/commit/80d32decd3e5c58c732eb06017be886b0f5d75e4#diff-535f2327a9e3f01dd3ee37ba5fec518bR207

Comment 13 Guillaume Abrioux 2017-11-09 12:32:43 UTC
fix has been merged uptream in stable-3.0 branch, it will be in v3.0.10

Comment 19 Vasishta 2017-11-13 12:17:23 UTC
Created attachment 1351541 [details]
File contains contents of inventory file, all.yml, ansible-playbook log

Hi, 

Working fine with conf generating tasks but failed while running handler [ceph-defaults : copy rgw restart script] with same message.

fatal: [magna019]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleUndefinedVariable: 'list object' has no attribute u'ipv4'"}

Does the ceph-ansible/roles/ceph-defaults/templates/restart_rgw_daemon.sh.j2 needs same changes as in PRs mentioned here.

Moving back to ASSIGNED state.

Regards,
Vasishta

Comment 22 Vasishta 2017-11-14 11:45:45 UTC
Working fine on both containerized and non-containerized scenarios with ceph-ansible-3.0.11-1.el7cp.noarch, 

Ken, Can you please move BZ to ON_QA ? I'll move it to VERIFIED state.

Comment 26 errata-xmlrpc 2017-12-05 23:49:35 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-2017:3387