ceph-ansible: AttributeError: 'list' object has no attribute 'endswith
deploying luminous with ceph-ansible v3.0.0rc14
root@icadmin004:~# ansible-playbook --version
ansible-playbook 2.4.0.0
config file = /root/git/ceph-ansible-luminous/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
root@icadmin004:~# git branch
* (detached from v3.0.0rc14)
master
ceph-ansible config : cluster-luminous.zip full ceph ansible log : ceph-ansible-luminous.log.zip
TASK [ceph-config : generate ceph configuration file: luminous.conf] ****************************************************************************************************************************************************************************************************************************************************
task path: /root/git/ceph-ansible-luminous/roles/ceph-config/tasks/main.yml:30
<iccluster007.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster007.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster007.iccluster.epfl.ch '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<iccluster015.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster015.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster015.iccluster.epfl.ch '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<iccluster019.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster019.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster019.iccluster.epfl.ch '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<iccluster007.iccluster.epfl.ch> (0, '/root\n', '')
<iccluster007.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster007.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster007.iccluster.epfl.ch '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1507105083.09-124081123181006 `" && echo ansible-tmp-1507105083.09-124081123181006="` echo /root/.ansible/tmp/ansible-tmp-1507105083.09-124081123181006 `" ) && sleep 0'"'"''
<iccluster015.iccluster.epfl.ch> (0, '/root\n', '')
<iccluster015.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster015.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster015.iccluster.epfl.ch '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1507105083.09-167559818295305 `" && echo ansible-tmp-1507105083.09-167559818295305="` echo /root/.ansible/tmp/ansible-tmp-1507105083.09-167559818295305 `" ) && sleep 0'"'"''
<iccluster019.iccluster.epfl.ch> (0, '/root\n', '')
<iccluster019.iccluster.epfl.ch> ESTABLISH SSH CONNECTION FOR USER: None
<iccluster019.iccluster.epfl.ch> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=30 -o ControlPath=/root/.ansible/cp/%h-%r-%p iccluster019.iccluster.epfl.ch '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1507105083.11-161751728823348 `" && echo ansible-tmp-1507105083.11-161751728823348="` echo /root/.ansible/tmp/ansible-tmp-1507105083.11-161751728823348 `" ) && sleep 0'"'"''
<iccluster015.iccluster.epfl.ch> (0, 'ansible-tmp-1507105083.09-167559818295305=/root/.ansible/tmp/ansible-tmp-1507105083.09-167559818295305\n', '')
<iccluster007.iccluster.epfl.ch> (0, 'ansible-tmp-1507105083.09-124081123181006=/root/.ansible/tmp/ansible-tmp-1507105083.09-124081123181006\n', '')
[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_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_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.
<iccluster019.iccluster.epfl.ch> (0, 'ansible-tmp-1507105083.11-161751728823348=/root/.ansible/tmp/ansible-tmp-1507105083.11-161751728823348\n', '')
[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.
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 125, in run
res = self._execute()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 528, in _execute
result = self._handler.run(task_vars=variables)
File "/root/git/ceph-ansible-luminous/plugins/actions/_v2_config_template.py", line 521, in run
convert_data=False
File "/usr/lib/python2.7/dist-packages/ansible/template/__init__.py", line 450, in template
disable_lookups=disable_lookups,
File "/usr/lib/python2.7/dist-packages/ansible/template/__init__.py", line 672, in do_template
res = j2_concat(rf)
File "<template>", line 467, in root
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 791, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 765, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/lib/python2.7/dist-packages/jinja2/loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "/usr/lib/python2.7/dist-packages/jinja2/loaders.py", line 162, in get_source
filename = path.join(searchpath, *pieces)
File "/usr/lib/python2.7/posixpath.py", line 77, in join
elif path == '' or path.endswith('/'):
AttributeError: 'list' object has no attribute 'endswith'
fatal: [iccluster007.iccluster.epfl.ch]: FAILED! => {
"failed": true,
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
fatal: [iccluster015.iccluster.epfl.ch]: FAILED! => {
"failed": true,
"msg": "'dict object' has no attribute u'ansible_localhost'"
}
fatal: [iccluster019.iccluster.epfl.ch]: FAILED! => {
"failed": true,
"msg": "'dict object' has no attribute u'ansible_localhost'"
}
PLAY RECAP **************************************************************************************************************************************************************************************************************************************************************************************************************
iccluster007.iccluster.epfl.ch : ok=54 changed=3 unreachable=0 failed=1
iccluster015.iccluster.epfl.ch : ok=52 changed=1 unreachable=0 failed=1
iccluster019.iccluster.epfl.ch : ok=58 changed=1 unreachable=0 failed=1
iccluster023.iccluster.epfl.ch : ok=2 changed=0 unreachable=0 failed=0
Yoann Moulin
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (10 by maintainers)
Commits related to this issue
- common: move restapi template to config Closes: github.com/ceph/ceph-ansible/issues/1981 Signed-off-by: Sébastien Han <seb@redhat.com> — committed to guits/ceph-ansible by leseb 7 years ago
- common: move restapi template to config Closes: github.com/ceph/ceph-ansible/issues/1981 Signed-off-by: Sébastien Han <seb@redhat.com> (cherry picked from commit ba5c6e66f03314d1b7263225e75f0f56c438d... — committed to fgal/ceph-ansible by leseb 7 years ago
@mistur Thank you! It worked.
the patch seems to not be applied on this branch, to fix this issue, you just have to do this :
Yoann
I notice that error seems not to occur if I haven’t restapis servers.