OSC / ood-ansible

An ansible role for Open Ondemand

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR! failed to combine variables, expected dicts but got a 'NoneType' and a 'AnsibleMapping'

xpillons opened this issue · comments

Trying to move from 1.8.1 to 2.0.2 I was unable to successfully run my playbook including the ood-ansible role.

The full error being

ERROR! failed to combine variables, expected dicts but got a 'NoneType' and a 'AnsibleMapping': 
null
{"install_from_src": false, "ood_source_repo": "https://github.com/OSC/ondemand.git", "ood_source_version": "v2.0.9", "ood_build_dir": "/tmp/ood-build", "ood_source_dir": "{{ ood_build_dir }}/ondemand", "ood_base_apache_dir": "/var/www/ood", "ood_base_dir": "/opt/ood", "ood_core_libs": ["mod_ood_proxy", "nginx_stage", "ood-portal-generator", "ood_auth_map"], "ood_base_apps": ["activejobs", "bc_desktop", "dashboard", "file-editor", "files", "myjobs", "shell"], "ruby_lib_dir": "/usr/lib64/ruby/", "passenger_version": "6.0.7", "nginx_version": "1.18.0", "nodejs_version": "12.x", "passenger_tar": "passenger-{{ passenger_version }}.tar.gz", "nginx_tar": "nginx-{{ nginx_version }}-x86_64-linux.tar.gz", "agent_tar": "agent-x86_64-linux.tar.gz", "passenger_base_url": "https://github.com/phusion/passenger/releases/download", "passenger_release_url": "{{ passenger_base_url }}/release-{{ passenger_version }}", "passenger_url": "{{ passenger_release_url }}/{{ passenger_tar }}", "passenger_nginx_url": "{{ passenger_release_url }}/{{ nginx_tar }}", "passenger_agent_url": "{{ passenger_release_url }}/{{ agent_tar }}", "passenger_remote_dl": true, "passenger_src_dir": "{{ ood_build_dir }}/passenger-src", "passenger_lib_dir": "{{ ood_base_dir }}/passenger-lib", "passenger_support_binaries_dir": "{{ passenger_lib_dir }}/support-binaries", "passenger_base_dir": "{{ ood_base_dir }}/passenger", "g_plus_plus": "g++", "sqlite_devel_package": "sqlite-devel", "ruby_devel_package": "ruby-devel", "ffi_devel_package": "libffi-devel", "libz_devel_package": "zlib-devel"}

this is using ansible 2.9.6 on ubuntu 20.4

this was finally fixed by renaming apps.yml and ondemand.yml in the defaults/main directory as they are empty, which was generating this combine error

Hey sorry for the error. What did you rename them to? That refactor wasn't supposed to break anything.

another workaround is to just uncomment one of the root object in these 2 files, like cluster in apps.yml and pinned_apps in ondemand.yml

Hey sorry for the error. What did you rename them to? That refactor wasn't supposed to break anything.

I renamed to .yml_

Thanks, do you happen to have hash_behaviour = merge in your ansible.cfg file?

no I don't. Should I ?

Apparently not, I guess they warn against it because it could cause issues like this. I just googled it to see.

ansible/ansible#43259

I think your solution could work, I'm just trying to replicate and see what else there could be.

OK -with 2.9.6 and even 2.9.25 I can replicate. I think I was running some version of 2.10.X initially. The CI doesn't fail, but I think that just pulles the latest from pip.

I'll submit a patch that fixes this. Thanks for the ticket!

Great. Once patched I will update our integration in az-hop https://github.com/Azure/az-hop

Hey sorry for the error. What did you rename them to? That refactor wasn't supposed to break anything.

This is the commit which break it ff47d41#diff-b1c30208e6f787fbea32fc69cf64d04054d0aac81275dc8da5b217a954072ccd splitting in many files the main one, ending into empty files (from an ansible variable view)

Yep. I just published v2.0.3. Let me know if there's anything else wrong with your upgrade.

Yep. I just published v2.0.3. Let me know if there's anything else wrong with your upgrade.

first deployments looks good