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

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

Closed
xpillons opened this issue Aug 17, 2021 · 12 comments · Fixed by #122
Closed

Comments

@xpillons
Copy link
Contributor

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

@xpillons
Copy link
Contributor Author

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

@johrstrom
Copy link
Collaborator

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

@xpillons
Copy link
Contributor Author

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

@xpillons
Copy link
Contributor Author

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

I renamed to .yml_

@johrstrom
Copy link
Collaborator

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

@xpillons
Copy link
Contributor Author

xpillons commented Aug 17, 2021

no I don't. Should I ?

@johrstrom
Copy link
Collaborator

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.

@johrstrom
Copy link
Collaborator

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!

@xpillons
Copy link
Contributor Author

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

@xpillons
Copy link
Contributor Author

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)

@johrstrom
Copy link
Collaborator

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

@xpillons
Copy link
Contributor Author

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

first deployments looks good

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

Successfully merging a pull request may close this issue.

2 participants