{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5375","repository_url":"https://api.github.com/repos/openshift/openshift-ansible","labels_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5375/labels{/name}","comments_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5375/comments","events_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5375/events","html_url":"https://github.com/openshift/openshift-ansible/pull/5375","id":257069854,"number":5375,"title":"3.5.x - Only empty 'env' builddefaults keys if the 'env' key exists","user":{"login":"tbielawa","id":33121,"avatar_url":"https://avatars3.githubusercontent.com/u/33121?v=4","gravatar_id":"","url":"https://api.github.com/users/tbielawa","html_url":"https://github.com/tbielawa","followers_url":"https://api.github.com/users/tbielawa/followers","following_url":"https://api.github.com/users/tbielawa/following{/other_user}","gists_url":"https://api.github.com/users/tbielawa/gists{/gist_id}","starred_url":"https://api.github.com/users/tbielawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbielawa/subscriptions","organizations_url":"https://api.github.com/users/tbielawa/orgs","repos_url":"https://api.github.com/users/tbielawa/repos","events_url":"https://api.github.com/users/tbielawa/events{/privacy}","received_events_url":"https://api.github.com/users/tbielawa/received_events","type":"User","site_admin":false},"labels":[{"id":629802454,"url":"https://api.github.com/repos/openshift/openshift-ansible/labels/affects_3.4","name":"affects_3.4","color":"0052cc","default":false},{"id":629802397,"url":"https://api.github.com/repos/openshift/openshift-ansible/labels/affects_3.5","name":"affects_3.5","color":"0052cc","default":false},{"id":129999522,"url":"https://api.github.com/repos/openshift/openshift-ansible/labels/kind/bug","name":"kind/bug","color":"d93f0b","default":false},{"id":681664198,"url":"https://api.github.com/repos/openshift/openshift-ansible/labels/size/XS","name":"size/XS","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-09-12T14:45:12Z","updated_at":"2017-09-12T19:34:18Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/openshift/openshift-ansible/pulls/5375","html_url":"https://github.com/openshift/openshift-ansible/pull/5375","diff_url":"https://github.com/openshift/openshift-ansible/pull/5375.diff","patch_url":"https://github.com/openshift/openshift-ansible/pull/5375.patch"},"body":"Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1469387\r\n\r\nCustomer using the `release-1.5` upgrade playbook to go from 3.4 to 3.5 is encountering an error when the builddefault facts are set. An attempt is made to reference a key which does not exist\r\n\r\n```\r\n2017-06-29 11:55:50,474 p=45692 u=ocpauto |  TASK [openshift_facts : Gather Cluster facts and set is_containerized if needed] ***\r\n2017-06-29 11:55:52,467 p=45692 u=ocpauto |  ok: [atom0010.]\r\n2017-06-29 11:55:52,475 p=45692 u=ocpauto |  ok: [atom0008.]\r\n2017-06-29 11:55:52,482 p=45692 u=ocpauto |  fatal: [atom0001.]: FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"module_stderr\": \"Shared connection to atom0001. closed.\\r\\n\",\r\n    \"module_stdout\": \"Traceback (most recent call last):\\r\\n  File \\\"/tmp/ansible_CHxjyW/ansible_module_openshift_facts.py\\\", line 2495, in <module>\\r\\n    main()\\r\\n  File \\\"/tmp/ansible_CHxjyW/ansible_module_openshift_facts.py\\\", line 2482, in main\\r\\n    protected_facts_to_overwrite)\\r\\n  File \\\"/tmp/ansible_CHxjyW/ansible_module_openshift_facts.py\\\", line 1913, in __init__\\r\\n    protected_facts_to_overwrite)\\r\\n  File \\\"/tmp/ansible_CHxjyW/ansible_module_openshift_facts.py\\\", line 1979, in generate_facts\\r\\n    facts = set_builddefaults_facts(facts)\\r\\n  File \\\"/tmp/ansible_CHxjyW/ansible_module_openshift_facts.py\\\", line 1686, in set_builddefaults_facts\\r\\n    delete_empty_keys(facts['master']['admission_plugin_config']['BuildDefaults']['configuration']['env'])\\r\\nKeyError: 'env'\\r\\n\"\r\n}\r\n\r\nMSG:\r\n\r\nMODULE FAILURE\r\n```\r\n\r\nPR checks to see if the key exists before attempting to pass it through the `delete_empty_keys` function."},"comment":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/comments/328960656","html_url":"https://github.com/openshift/openshift-ansible/pull/5375#issuecomment-328960656","issue_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5375","id":328960656,"user":{"login":"tbielawa","id":33121,"avatar_url":"https://avatars3.githubusercontent.com/u/33121?v=4","gravatar_id":"","url":"https://api.github.com/users/tbielawa","html_url":"https://github.com/tbielawa","followers_url":"https://api.github.com/users/tbielawa/followers","following_url":"https://api.github.com/users/tbielawa/following{/other_user}","gists_url":"https://api.github.com/users/tbielawa/gists{/gist_id}","starred_url":"https://api.github.com/users/tbielawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbielawa/subscriptions","organizations_url":"https://api.github.com/users/tbielawa/orgs","repos_url":"https://api.github.com/users/tbielawa/repos","events_url":"https://api.github.com/users/tbielawa/events{/privacy}","received_events_url":"https://api.github.com/users/tbielawa/received_events","type":"User","site_admin":false},"created_at":"2017-09-12T19:34:18Z","updated_at":"2017-09-12T19:34:18Z","author_association":"MEMBER","body":"Lint addressed"}}
{"actor":{"display_login":"tbielawa"}}