Bug 1414625 - [IntService_public_295] add mandatory check 'httpd-tools' is installed on master
Summary: [IntService_public_295] add mandatory check 'httpd-tools' is installed on master
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.5.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
: ---
Assignee: Jeff Cantrill
QA Contact: Peng Li
Depends On: 1418911
TreeView+ depends on / blocked
Reported: 2017-01-19 03:26 UTC by Peng Li
Modified: 2017-07-24 14:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2017-04-12 18:48:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0903 0 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-04-12 22:45:42 UTC

Description Peng Li 2017-01-19 03:26:35 UTC
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:

Steps to Reproduce:
1. prepare the inventory file

$MASTER ansible_user=root ansible_ssh_user=root ansible_ssh_private_key_file="/home/penli/.ssh/libra.pem" openshift_public_hostname=$MASTER




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.
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.

Comment 2 Jeff Cantrill 2017-01-23 19:11:17 UTC
Provided check in https://github.com/openshift/openshift-ansible/pull/3151

Comment 3 Peng Li 2017-01-26 09:11:40 UTC
@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.

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

Comment 4 Jeff Cantrill 2017-01-26 17:59:34 UTC
Added another PR to address #3 https://github.com/openshift/openshift-ansible/pull/3195

Comment 5 Peng Li 2017-02-03 03:28:42 UTC
There is a typo here


should check keytool 
 local_action: command which htpasswd

Comment 6 Peng Li 2017-02-03 03:30:18 UTC
other parts looks good, after install htpasswd and jdk on Ansible control node, the job can proceed.

Comment 7 Jeff Cantrill 2017-02-03 13:46:01 UTC
fixed check for keytool in https://github.com/openshift/openshift-ansible/pull/3258

Comment 8 Peng Li 2017-02-04 07:41:01 UTC
will verify this once https://bugzilla.redhat.com/show_bug.cgi?id=1418911 is fixed.

Comment 9 Peng Li 2017-02-07 06:31:48 UTC
verified with master branch, a hint is there when java is not installed on ansible control node.

Comment 11 errata-xmlrpc 2017-04-12 18:48:57 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.