Description of problem: Try the new Metrics install way using Ansible, failed at step task TASK [openshift_metrics : generate htpasswd file for hawkular metrics] ********* task path: openshift-ansible/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml:31 Form the log we can see it's caused by command 'htpasswd' is not available on master. We should check it and install package 'httpd-tools' or in the document let user to install this package as prerequisite. Version-Release number of selected component (if applicable): openshift v3.5.0.5+8f2840d How reproducible: always Steps to Reproduce: 1. prepare the inventory file [oo_first_master] $MASTER ansible_user=root ansible_ssh_user=root ansible_ssh_private_key_file="/home/penli/.ssh/libra.pem" openshift_public_hostname=$MASTER [oo_first_master:vars] deployment_type=openshift-enterprise openshift_release=v3.5.0 openshift_metrics_install_metrics=true openshift_metrics_hostname=hawkular-metrics.$SUBDOMAIN openshift_metrics_project=openshift-infra openshift_metrics_image_prefix=registry.ops.openshift.com/openshift3/ openshift_metrics_image_version=3.5.0 2. git clone https://github.com/openshift/openshift-ansible.git 3. ansible-playbook -vvv -i ~/inventory playbooks/common/openshift-cluster/openshift_metrics.yml 4. task fail and abort. message fatal: [$MASTER]: FAILED! => { "changed": true, "cmd": "htpasswd -ci '/etc/origin/master/metrics/hawkular-metrics.htpasswd' hawkular < '/etc/origin/master/metrics/hawkular-metrics.pwd'", "delta": "0:00:00.003536", "end": "2017-01-18 21:02:16.384476", "failed": true, "invocation": { "module_args": { "_raw_params": "htpasswd -ci '/etc/origin/master/metrics/hawkular-metrics.htpasswd' hawkular < '/etc/origin/master/metrics/hawkular-metrics.pwd'", "_uses_shell": true, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true }, "module_name": "command" }, "rc": 127, "start": "2017-01-18 21:02:16.380940", "stderr": "/bin/sh: htpasswd: command not found", "stdout": "", "stdout_lines": [], "warnings": [] } Expected results: install successfully. Additional info: Ansible execution log attached.
Provided check in https://github.com/openshift/openshift-ansible/pull/3151
@jcantril, I tried on a env which both master and ansible control node(not the master) don't have httpd-tools installed, and run ansible, it generate below error[1]. Then I installed httpd-tools on ansible control node, it passed this task but return the same error what I report at https://bugzilla.redhat.com/show_bug.cgi?id=1414625#c0 So things come back to https://bugzilla.redhat.com/show_bug.cgi?id=1414477#c6, will we restrict this ansible task should only be run on master? If this is the design, I can set this bug to 'verified' and document this. Though from QE's test, most our ansible jobs run on control node but not the master. [1] TASK [openshift_metrics : fail] ************************************************ task path: /root/openshift-ansible/roles/openshift_metrics/tasks/install_support.yaml:8 fatal: [ec2-54-90-212-109.compute-1.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "invocation": { "module_args": { "msg": "'htpasswd' is unavailable. Please install httpd-tools on the control node" }, "module_name": "fail" }, "msg": "'htpasswd' is unavailable. Please install httpd-tools on the control node" } to retry, use: --limit @/root/openshift-ansible/playbooks/common/openshift-cluster/openshift_metrics.retry
Added another PR to address #3 https://github.com/openshift/openshift-ansible/pull/3195
There is a typo here https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_metrics/tasks/install_support.yaml#L12 should check keytool local_action: command which htpasswd
other parts looks good, after install htpasswd and jdk on Ansible control node, the job can proceed.
fixed check for keytool in https://github.com/openshift/openshift-ansible/pull/3258
will verify this once https://bugzilla.redhat.com/show_bug.cgi?id=1418911 is fixed.
verified with master branch, a hint is there when java is not installed on ansible control node.
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-2017:0903