hortonworks / ansible-hortonworks

Ansible playbooks for deploying Hortonworks Data Platform and DataFlow using Ambari Blueprints
Apache License 2.0
248 stars 253 forks source link

ambari-blueprint: fail t generate cluster blueprint #52

Closed madiot closed 6 years ago

madiot commented 6 years ago

Hi,

I'm trying to configure a cluster, with 2 NN and 4 DN. i derived the clsuter from the example-hdp-ha-3-masters i added in the playbooks/group_vars/all, the host_group definition for (hdp-management, hdp-masternode-01/02 and hdp-worker)

the prepare_nodes.yml, install_ambari.yml, configure_ambari.yml went on apparently fine. but when i execute the ansible script to appy the blueprint.yml

I'm facing an issue what looks like a apparent jinja2 template based blueprint generation error. I'm not all that familiar yet with jinja and the blueprints, and I'm seeking help here to find possible root causes.

TASK

[ambari-blueprint : Generate the cluster blueprint] ***** task path: /home/pm/github.com/ansible-hortonworks/playbooks/roles/ambari-blueprint/tasks/main.yml:57 fatal: [manager]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: expected token '=', got '.'. String: {\n \"configurations\" : ....

I was hoping i could test from ipython the template playbooks/roles/ambari-blueprint/templates/blueprint_dynamic.j2

but i'm getting nowhere close to the ansible blueprint generating error above.

looking forward your help to figure this out.

actually found that there's similar issue already on the same subject https://github.com/hortonworks/ansible-hortonworks/issues/38.

alexandruanghel commented 6 years ago

Hi, looks similar with https://github.com/hortonworks/ansible-hortonworks/issues/29 https://github.com/hortonworks/ansible-hortonworks/issues/38 and https://github.com/hortonworks/ansible-hortonworks/issues/43.

In short, upgrade your jinja2 and ansible first (pip install ansible Jinja2 --upgrade) as I'm using a feature available only in Jinja2.10. Although this version has been released couple of years ago, if you use the OS packages (which are very slowly upgraded) instead of a virtualenv, you'll get those templating issues.

Please do let me know if you have the same issue after upgrading jinja.

madiot commented 6 years ago

acutally, had some issue with our pip setup. After fixing it pip install ansible jinja2 setuptools --upgrade from within the ansible virtual env, i got passed this point.

but now it's failing further. I'll log another issue for that

Thanks

alexandruanghel commented 6 years ago

Great! I'll close this issue then.