Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph.ceph-common : generate ceph configuration file fails with python TypeError #667

Closed
glitchcrab opened this issue Mar 30, 2016 · 9 comments

Comments

@glitchcrab
Copy link

TASK [ceph.ceph-common : generate ceph configuration file] *********************
task path: /root/ceph-02/ceph-ansible/roles/ceph-common/tasks/main.yml:178
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/root/ansible/lib/ansible/executor/task_executor.py", line 124, in run
    res = self._execute()
  File "/root/ansible/lib/ansible/executor/task_executor.py", line 426, in _execute
    result = self._handler.run(task_vars=variables)
  File "/root/ceph-02/ceph-ansible/plugins/actions/config_template.py", line 261, in run
    tmp = self._make_tmp_path()
TypeError: _make_tmp_path() takes exactly 2 arguments (1 given)

fatal: [mon01-c02-rd]: FAILED! => {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}

I'm running ansible v2.1.0 and the following modules installed through pip:

Jinja2==2.8
PyYAML==3.11
httplib2==0.9.2
paramiko==1.16.0
six==1.10.0

OS is Trusty and I can provide my relevant group_vars if necessary.

@leseb
Copy link
Member

leseb commented Mar 30, 2016

@cloudnull would you mind having a look at this?
I noticed you released another version for OpenStack, is this version compatible with 1.9.4 and 2.x.x?
I didn't have the time to update it yet.

Thanks!

@cloudnull
Copy link
Contributor

looking now. more soon. :)

@cloudnull
Copy link
Contributor

our current module only supports v1 and we have a PR to upstream Ansible to get a V2 module in for broader community consumption which can be found here: [ https://github.com/ansible/ansible/pull/12555 ]. We are working on making the module we're carrying v2 compatible however not completed that work yet; I'll work on that some more today. Once we have a solid v1 / v2 compatible action plugin I'll post back here and or PR the change into the main repo.

@cloudnull
Copy link
Contributor

If anyone has time to review the plugin within upstream Ansible it'd be much appreciated. I'm hopeful we'll be able to get it in for 2.1 though I have no confirmation on that at this point.

@cloudnull
Copy link
Contributor

@leseb I've posted a review to our main plugins repo -- https://review.openstack.org/#/c/299598 -- Once that change set has a few reviews and assuming it merges I'll pull the change in here.

@cloudnull
Copy link
Contributor

@leseb @analbeard I've submitted a PR here which adds Ansible 2.x support when using the config_template action plugin. If you have a chance to review #668 It'd be appreciated.

@glitchcrab
Copy link
Author

@cloudnull thanks for that, it now makes it further, but unfortunately it still dies during the config generation:

TASK [ceph.ceph-common : generate ceph configuration file] *********************
task path: /root/ceph-02/ceph-ansible-cloudnull/roles/ceph-common/tasks/main.yml:178
<mon01-c02-rd> ESTABLISH SSH CONNECTION FOR USER: None
<mon01-c02-rd> SSH: EXEC ssh -C -q -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r -tt mon01-c02-rd '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1459409006.79-142331915204165 `" && echo "` echo $HOME/.ansible/tmp/ansible-tmp-1459409006.79-142331915204165 `" )'"'"''
fatal: [mon01-c02-rd]: FAILED! => {"failed": true, "msg": "{{ cluster_uuid.stdout }}: 'dict object' has no attribute 'stdout'"}

I was able to work around this by removing the fsid I had manually specified and letting the play generate a UUID instead.

@cloudnull
Copy link
Contributor

@analbeard do you have a a sample of the config override options that your using? I'd be happy to put it through some more tests and if there's a deficiency I'll work on getting it resolved.

@leseb
Copy link
Member

leseb commented Apr 1, 2016

@analbeard I don't think it's a config_template issue here since the error says 'dict object' has no attribute 'stdout', I just mean that the variable has no stdout property.
It's probably a bug in ceph-ansible itself, I will have a look. In the meantime, I'll open another issue for this and we will continue from there.

I'm closing this for now since the original issue has been resolved.
Thanks again @cloudnull for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants