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

Failure to deploy Redis (Yes, I've read the FAQ) #33

Open
necr0n opened this issue Oct 22, 2018 · 2 comments
Open

Failure to deploy Redis (Yes, I've read the FAQ) #33

necr0n opened this issue Oct 22, 2018 · 2 comments

Comments

@necr0n
Copy link

necr0n commented Oct 22, 2018

TASK [install_contrail : create /etc/contrail/redis] **************************************************************************** task path: /root/contrail-ansible-deployer/playbooks/roles/install_contrail/tasks/create_redis.yml:2 fatal: [192.168.0.xx]: FAILED! => { "msg": "The conditional check 'roles[instance_name].webui is defined or roles[instance_name].analytics is defined' failed. The error was: error while evaluating conditional (roles[instance_name].webui is defined or roles[instance_name].analytics is defined): 'dict object' has no attribute u'bms1'\n\nThe error appears to have been in '/root/contrail-ansible-deployer/playbooks/roles/install_contrail/tasks/create_redis.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: create /etc/contrail/redis\n ^ here\n"

[user@somewhere]# ansible --version ansible 2.4.2.0 config file = /home/user/contrail-ansible-deployer/ansible.cfg configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Resolution: This is caused by code incompatible with 2.5.1.0 version of Ansible. Please stick to ansible-2.4.2.0 to avoid this issue for now until we fix the code to work with the latest version of Ansible.

Uhm, what version do you recommend now?

P.S Docker, K8S, Kolla, hundreds of states + Ansible bugs - this is gonna be fun.

@Andrey-mp
Copy link
Member

I would recommend to file bugs in launchpad https://bugs.launchpad.net/juniperopenstack/?orderby=-id&start=0 )
This tracker is not supported actively.

And it would be good to see your instances.yaml

@necr0n
Copy link
Author

necr0n commented Jan 6, 2019

I first tried the suggested "easy way"
ansible-playbook -i inventory/ -e orchestrator=kubernetes -e '{"instances":{"bms1":{"ip":"192.168.1.100","provider":"bms"}}}' playbooks/configure_instances.yml ansible-playbook -i inventory/ -e orchestrator=kubernetes -e '{"instances":{"bms1":{"ip":"192.168.1.100","provider":"bms"}}}' playbooks/install_contrail.yml ansible-playbook -i inventory/ -e orchestrator=kubernetes -e '{"instances":{"bms1":{"ip":"192.168.1.100","provider":"bms"}}}' playbooks/install_k8s.yml

By commenting out some conditionals, I progressed further until hitting docker-py/docker python incompatibility bug, which, as far as I remember was fixed by:

pip install --upgrade requests; pip install docker-compose; pip install --upgrade docker-compose;
but still could not complete it.

Then I went on with orchestrator=openstack and was able to successfully deploy Contrail (even with Ansible=2.7.5). There are a couple of takes:

  1. These plays are not idempotent. I was hitting an error trying to run install_openstack for the second time, and task Creating admin project, user, role, service, and endpoint for Keystone failed. Solved it by stopping and deleting all containers with storage.
  2. Do not upgrade pip - this will break dependencies for python-openstackclient.

So, the original issue is still there -
https://github.com/Juniper/contrail-ansible-deployer#quick-start-for-the-impatient-requires-a-centos7-instance

  • will not work out of the box even with recommended Ansible version installed.

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

2 participants