{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5718","repository_url":"https://api.github.com/repos/openshift/openshift-ansible","labels_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5718/labels{/name}","comments_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5718/comments","events_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5718/events","html_url":"https://github.com/openshift/openshift-ansible/issues/5718","id":264363064,"number":5718,"title":"Metrics playbook fails with multiple errors","user":{"login":"jsanda","id":168121,"avatar_url":"https://avatars1.githubusercontent.com/u/168121?v=4","gravatar_id":"","url":"https://api.github.com/users/jsanda","html_url":"https://github.com/jsanda","followers_url":"https://api.github.com/users/jsanda/followers","following_url":"https://api.github.com/users/jsanda/following{/other_user}","gists_url":"https://api.github.com/users/jsanda/gists{/gist_id}","starred_url":"https://api.github.com/users/jsanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsanda/subscriptions","organizations_url":"https://api.github.com/users/jsanda/orgs","repos_url":"https://api.github.com/users/jsanda/repos","events_url":"https://api.github.com/users/jsanda/events{/privacy}","received_events_url":"https://api.github.com/users/jsanda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-10T20:21:12Z","updated_at":"2017-10-11T14:28:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"#### Description\r\n\r\nProvide a brief description of your issue here. For example:\r\n\r\n> On a multi master install, if the first master goes down we can no\r\n> longer scaleup the cluster with new nodes or masters.\r\n\r\nI am running OpenShift locally via,\r\n\r\n```\r\noc cluster up --host-config-dir=/home/jsanda/.oc/config \\\r\n              --host-data-dir=/home/jsanda/.oc/data \\\r\n              --use-existing-config\r\n```\r\n\r\nI am trying to deploy metrics by running the playbooks/byo/openshift-cluster/openshift-metrics.yml playbook. I am using inventory/byo/hosts.example as my inventory file. I have encountered several, different errors and am unable to get metrics deployed. I am running on Fedora 26.\r\n\r\n##### Version\r\n\r\nPlease put the following version information in the code block\r\nindicated below.\r\n\r\n* Your ansible version per `ansible --version`\r\n\r\nIf you're operating from a **git clone**:\r\n\r\n* The output of `git describe`\r\n\r\nIf you're running from playbooks installed via RPM or\r\n`atomic-openshift-utils`\r\n\r\n* The output of `rpm -q atomic-openshift-utils openshift-ansible`\r\n\r\nPlace the output between the code block below:\r\n\r\n```\r\n$ ansible --version\r\nansible 2.3.2.0\r\n  config file = /home/jsanda/Development/redhat/openshift/openshift-ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n  python version = 2.7.13 (default, May 31 2017, 17:58:17) [GCC 7.1.1 20170503 (Red Hat 7.1.1-1)]\r\n\r\n$ git describe\r\nopenshift-ansible-3.7.0-0.147.0\r\n\r\n$ oc version\r\noc v3.7.0-alpha.1+fdbd3dc\r\nkubernetes v1.7.0+695f48a16f\r\nfeatures: Basic-Auth GSSAPI Kerberos SPNEGO\r\n\r\nServer https://127.0.0.1:8443\r\nopenshift v3.7.0-alpha.1+fdbd3dc\r\nkubernetes v1.7.0+695f48a16f\r\n\r\n```\r\n\r\n##### Steps To Reproduce\r\n1. Run metrics playbook with this command line:\r\n\r\n```\r\nsudo ansible-playbook playbooks/byo/openshift-cluster/openshift-metrics.yml \\\r\n-e openshift_metrics_hawkular_hostname=hawkular-metrics.example.com \\\r\n-vvv -c local -i inventory/byo/hosts.example -e openshift_metrics_install_metrics=false \\\r\n-e openshift_master_unsupported_all_in_one=true -e \\\r\nopenshift_master_unsupported_embedded_etcd=true\r\n```\r\nThis fails with:\r\n\r\n> ERROR! Attempted to read \"inventory/byo/hosts.example\" as ini file: inventory/byo/hosts.example:9: Section [OSEv3:children] includes undefined group: nfs`\r\n\r\n2. Comment out nfs line (line 9) in inventory/byo/hosts.example and rerun cmd line from step 1. It then fails with a message saying python3 is required for Fedora.\r\n\r\n3. Edit inventory/byo/hosts.example to include the python3 property, e.g.,\r\n\r\n```\r\n[OSEv3:vars]\r\nansible_python_interpreter=/usr/bin/python3\r\n```\r\nRerun cmd line from step 1. It still fails with similar errors which can be viewed in [this gist](https://gist.github.com/jsanda/50de29af3489e3e68f03124619b3653f).\r\n\r\n\r\n4. Edit playbooks/common/openshift-cluster/initialize_facts.yml to effectively disable python3 validation check and rerun cmd line from step 1. \r\n\r\nI canged line 53 from ```ansible_distribution == 'Fedora'``` to ```ansible_distribution == 'FedoraX'```. It now fails with:\r\n\r\n```\r\nTASK [openshift_version : For an RPM install, abort when the release requested does not match the available version.] *******************************\r\ntask path: /home/jsanda/Development/redhat/openshift/openshift-ansible/roles/openshift_version/tasks/main.yml:200\r\nTuesday 10 October 2017  16:09:34 -0400 (0:00:00.025)       0:02:23.737 ******* \r\nfatal: [ose3-master1-ansible.test.example.com]: FAILED! => {\r\n    \"assertion\": \"openshift_version.startswith(openshift_release) | bool\", \r\n    \"changed\": false, \r\n    \"evaluated_to\": false, \r\n    \"failed\": true, \r\n    \"msg\": \"You requested openshift_release 3.7, which is not matched by\\nthe latest OpenShift RPM we detected as origin-3.6.0\\non host ose3-master1-ansible.test.example.com.\\nWe will only install the latest RPMs, so please ensure you are getting the release\\nyou expect. You may need to adjust your Ansible inventory, modify the repositories\\navailable on the host, or run the appropriate OpenShift upgrade playbook.\"\r\n}\r\n```\r\n\r\n5. Since I am not too concerned about  running 3.7, I set openshift_release=3.6 in hosts.example and reran cmd line from step 1. Now it fails with:\r\n\r\n```\r\nRUNNING HANDLER [openshift_metrics : restart master api] ********************************************************************************************\r\nTuesday 10 October 2017  16:16:08 -0400 (0:00:00.382)       0:02:33.339 ******* \r\nfatal: [ose3-master2-ansible.test.example.com]: FAILED! => {\r\n    \"failed\": true, \r\n    \"msg\": \"The conditional check '(not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'' failed. The error was: error while evaluating conditional ((not (master_api_service_status_changed | default(false) | bool)) and openshift.master.cluster_method == 'native'): 'dict object' has no attribute 'master'\\n\\nThe error appears to have been in '/home/jsanda/Development/redhat/openshift/openshift-ansible/roles/openshift_metrics/handlers/main.yml': line 2, 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: restart master api\\n  ^ here\\n\"\r\n}\r\n```\r\nAt this point I was not sure what to do and decided best to file a ticket.\r\n\r\n##### Expected Results\r\nI expect the metrics playbook to run so that metrics components, i.e., hawkular-metrics, heapster, and cassandra get deployed.\r\n\r\n```\r\nPlease see above\r\n```\r\n\r\n##### Observed Results\r\nPlease see above\r\n\r\n```\r\nExample command and output or error messages\r\n```\r\n\r\nFor long output or logs, consider using a [gist](https://gist.github.com/)\r\n\r\n\r\n##### Additional Information\r\n\r\nProvide any additional information which may help us diagnose the\r\nissue.\r\n\r\n* Fedora 26\r\n\r\n\r\n```\r\nEXTRA INFORMATION GOES HERE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/openshift/openshift-ansible/issues/comments/335829212","html_url":"https://github.com/openshift/openshift-ansible/issues/5718#issuecomment-335829212","issue_url":"https://api.github.com/repos/openshift/openshift-ansible/issues/5718","id":335829212,"user":{"login":"mwringe","id":691166,"avatar_url":"https://avatars0.githubusercontent.com/u/691166?v=4","gravatar_id":"","url":"https://api.github.com/users/mwringe","html_url":"https://github.com/mwringe","followers_url":"https://api.github.com/users/mwringe/followers","following_url":"https://api.github.com/users/mwringe/following{/other_user}","gists_url":"https://api.github.com/users/mwringe/gists{/gist_id}","starred_url":"https://api.github.com/users/mwringe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwringe/subscriptions","organizations_url":"https://api.github.com/users/mwringe/orgs","repos_url":"https://api.github.com/users/mwringe/repos","events_url":"https://api.github.com/users/mwringe/events{/privacy}","received_events_url":"https://api.github.com/users/mwringe/received_events","type":"User","site_admin":false},"created_at":"2017-10-11T14:28:12Z","updated_at":"2017-10-11T14:28:12Z","author_association":"CONTRIBUTOR","body":"@ewolinetz can you also help us out here? We used to be able to get metrics deployed using our simple inventory files (which only contained metrics related parameters) but something has changed and we are no longer able to deploy metrics using the metrics playbook.\r\n\r\nDo you have an example of a simple inventory file that we should now be using to deploy metrics in our environments? The last time I tried to look into getting metrics running using the playbook I ran into multiple bugs in the ansible setup."}}
{"actor":{"display_login":"mwringe"}}