Fedora Atomic does not have PyYAML
Trying to install a Multi-Master Openshift Origin cluster on a bunch of Vagrant machines using the official Fedora Atomic Vagrant Box.
The error output is this (for each node it's own copy):
failed: [10.0.0.16] => {"failed": true, "parsed": false}
/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
BECOME-SUCCESS-qxbiuzvjwefjxfypwkdiyefjgorcblqz
/bin/sh: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
Traceback (most recent call last):
File "/home/vagrant/.ansible/tmp/ansible-tmp-1454077118.51-30675912262171/openshift_facts", line 24, in <module>
import yaml
ImportError: No module named yaml
OpenSSH_6.9p1, LibreSSL 2.1.8
sudo atomic host status outputs:
TIMESTAMP (UTC) VERSION ID OSNAME REFSPEC
* 2016-01-28 23:57:06 23.55 7fccf10226 fedora-atomic fedora-atomic:fedora-atomic/f23/x86_64/docker-host
2016-01-05 21:40:09 23.45 98be0ae0f9 fedora-atomic fedora-atomic:fedora-atomic/f23/x86_64/docker-host
From IRC discussions in #openshift-dev
Python 2 in Fedora Atomic Host lacks PyYAML however Python 3 has it. Not sure how to determine which interpreter to run our facts through and we'd also need to make sure that our code is compatible with Python 3.
@sdodson we have some known issues with python3 currently. do you know if a transitional library like python-six is available on both RHEL Atomic and Fedora Atomic?
Is this also an issue on RHEL Atomic with OpenShift Enterprise?
No, RHEL Atomic is fine in this regard. That's where we've done all of our development work. I know RHEL Atomic inherits many things from Fedora Atomic but I don't think they'll pick up switching default python to python 3 anytime soon.
On Mon, Feb 1, 2016 at 1:10 AM, Richard Weber [email protected] wrote:
Is this also an issue on RHEL Atomic with OpenShift Enterprise?
— Reply to this email directly or view it on GitHub https://github.com/openshift/openshift-ansible/issues/1306#issuecomment-177787167 .
Would be great if we could get this working on Fedora Atomic Host.
@allen13 unfortunately, I can't say this is a high priority for us right now.
Possible fixes I see for this issue:
- Get Fedora Atomic Host to add the python2 version of PyYAML (probably not likely considering they are trying to slim down the Atomic Host images more)
- Get the openshift_facts module to run under python3. Besides making sure openshift_facts is forward/backward compatible with python 2 and 3, the included python libraries used will also need to be python3 compatible, which I'm relatively sure isn't the case for Ansible 1.9.4 (which we currently support), and may still be incompatible in the latest Ansible 2.x releases (which we still have outstanding work to do in order to support).
- Build a custom execution plugin, or otherwise wrap the openshift_facts execution inside of a docker container running on the remote host that would be able to install the python2 version of PyYAML prior to running.
So, https://github.com/openshift/openshift-ansible/pull/2600 could help regarding that.
And now, it seems ansible 2.X is supported by ansible-openshift.
We no longer support vagrant in openshift-ansible. The vagrant file was removed in https://github.com/openshift/openshift-ansible/pull/2654 Please see https://github.com/openshift/openshift-ansible-contrib for vagrant support.