Description of problem: Run the following playbook to deploy CFME on ocp-3.11, but it fails as below: ansible-playbook -i host/311 /usr/share/ansible/openshift-ansible/playbooks/openshift-management/config.yml -v ... TASK [openshift_management : Ensure the Management 'openshift-management' namespace exists] ********************************************************************************* fatal: [ec2-52-54-255-18.compute-1.amazonaws.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'openshift_hosted_infra_selector' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_management/tasks/main.yml': line 14, 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: \"Ensure the Management '{{ openshift_management_project }}' namespace exists\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"} to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/openshift-management/config.retry This should be a regression issue introduced by https://github.com/openshift/openshift-ansible/pull/8640 openshift_management_nodeselector doesn't have a default value when openshift_hosted_infra_selector not defined. Version-Release number of the following components: openshift-ansible-3.11.0-0.11.0.git.0.3c66516None.noarch ansible-2.6.2-1.el7ae.noarch How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Please include the entire output from the last TASK line through the end of output if an error is generated Expected results: Additional info: Please attach logs from ansible-playbook with the -vvv flag
Looks like this has been cherrypicked back into 3.10 and 3.9 too so we need to fix it there.
Created PR to master: https://github.com/openshift/openshift-ansible/pull/9521
Fix is available in openshift-ansible-3.11.0-0.16.0
Test with openshift-ansible-3.11.0-0.16.0.git.0.e82689aNone.noarch, still failed. TASK [openshift_management : Ensure the Management 'openshift-management' namespace exists] ********************************************************************************* task path: /usr/share/ansible/openshift-ansible/roles/openshift_management/tasks/main.yml:14 The full traceback is: File "/tmp/ansible_c5HJPA/ansible_modlib.zip/ansible/module_utils/basic.py", line 2111, in _check_argument_types param[k] = type_checker(value) File "/tmp/ansible_c5HJPA/ansible_modlib.zip/ansible/module_utils/basic.py", line 1913, in _check_type_list raise TypeError('%s cannot be converted to a list' % type(value)) fatal: [ec2-52-205-199-158.compute-1.amazonaws.com]: FAILED! => { "changed": false, "invocation": { "module_args": { "admin_role": "admin", "debug": false, "display_name": "CloudForms Management Engine", "kubeconfig": "/etc/origin/master/admin.kubeconfig", "name": "openshift-management", "node_selector": { "node-role.kubernetes.io/infra": "true" }, "state": "present" } }, "msg": "argument node_selector is of type <type 'dict'> and we were unable to convert to list: <type 'dict'> cannot be converted to a list" }
Ah, right, this nodeselector is used in oc_project, which requires a different format Created https://github.com/openshift/openshift-ansible/pull/9625 to fix it
Fix is available in openshift-ansible-3.11.0-0.17.0
Verify this bug with openshift-ansible-3.11.0-0.17.0.git.0.d3888d7None.noarch. With default options, playbooks/openshift-management/config.yml could run without error. TASK [openshift_management : Ensure the Management 'openshift-management' namespace exists] ********************************************************************************* changed: [ec2-52-206-170-73.compute-1.amazonaws.com] => {"changed": true, "results": {"cmd": "/usr/bin/oc get namespace openshift-management -o json", "results": {"apiVersion": "v1", "kind": "Namespace", "metadata": {"annotations": {"openshift.io/description": "", "openshift.io/display-name": "CloudForms Management Engine", "openshift.io/node-selector": "node-role.kubernetes.io/infra=true", "openshift.io/sa.scc.mcs": "s0:c17,c4", "openshift.io/sa.scc.supplemental-groups": "1000280000/10000", "openshift.io/sa.scc.uid-range": "1000280000/10000"}, "creationTimestamp": "2018-08-20T03:17:33Z", "name": "openshift-management", "resourceVersion": "14178", "selfLink": "/api/v1/namespaces/openshift-management", "uid": "9430f2af-a427-11e8-9ab9-0e6cea204162"}, "spec": {"finalizers": ["kubernetes"]}, "status": {"phase": "Active"}}, "returncode": 0}, "state": "present"}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2652