Bug 1469406 - install failed when use default user root to run playbook
Summary: install failed when use default user root to run playbook
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Joan Hoyt
QA Contact: Anping Li
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks: 1759601
TreeView+ depends on / blocked
 
Reported: 2017-07-11 08:40 UTC by Anping Li
Modified: 2019-10-08 16:21 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-29 13:47:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
inventory file and logs (204.56 KB, application/x-gzip)
2017-07-11 08:40 UTC, Anping Li
no flags Details

Description Anping Li 2017-07-11 08:40:27 UTC
Created attachment 1296124 [details]
inventory file and logs

Description of problem:
Install failed when use the default user 'root' with --private-key to run playbook

Version-Release number of the following components:
openshift-ansible-3.6.140

How reproducible:
always

Steps to Reproduce:
1. prepare inventory file and don't specify ansibe_user and ansible_ssh_user.
2. install OCP 3.6 with the default user 'root' and --private-key
ansible-playbook --private-key=$HOME/.ssh/libra.pem -i hosts  /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml


Actual results:
TASK [openshift_master_certificates : Lookup default group for ansible_ssh_user] ***
task path: /usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml:166
fatal: [openshift-225.lab.eng.nay.redhat.com]: FAILED! => {
    "failed": true
}

MSG:

the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible_ssh_user' is undefined

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml': line 166, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Lookup default group for ansible_ssh_user
  ^ here


NO MORE HOSTS LEFT *************************************************************
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/config.retry

PLAY RECAP *********************************************************************
localhost                  : ok=12   changed=0    unreachable=0    failed=0   
openshift-208.lab.eng.nay.redhat.com : ok=138  changed=3    unreachable=0    failed=0   
openshift-225.lab.eng.nay.redhat.com : ok=413  changed=59   unreachable=0    failed=1   


Failure summary:

  1. Host:     openshift-225.lab.eng.nay.redhat.com
     Play:     Configure masters
     Task:     openshift_master_certificates : Lookup default group for ansible_ssh_user
     Message:  the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible_ssh_user' is undefined
               
               The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_certificates/tasks/main.yml': line 166, column 3, but may
               be elsewhere in the file depending on the exact syntax problem.
               
               The offending line appears to be:
               
               
               - name: Lookup default group for ansible_ssh_user
                 ^ here


Expected results:

Additional info:

You can add ansible_user=root in the inventory file

Comment 1 Scott Dodson 2017-07-11 13:06:16 UTC
Setting to low priority because as far as I know we always document the inventory with ansible_ssh_user being set.

Comment 2 Gilbert Kimetto 2018-10-19 17:09:34 UTC
I hit this issue as well in OpenShift 3.10 

The documentation does not mention that you have to add the "ansible_ssh_user" if you plan to use the "deploy_cluster.yml" playbook to deploy your cluster.

I ran the "prerequisites.yml" before and it did not catch it either or warn me.

Comment 3 Joan Hoyt 2018-11-12 14:52:49 UTC
Added my name as Docs contact, since I am writing the OED docs initiative documentation.

Comment 4 Joan Hoyt 2019-01-10 20:55:12 UTC
Changed Doc Contact back to Vikram, per his instructions.
Changed status to ASSIGNED; started research.

Comment 6 Scott Dodson 2019-01-24 17:36:45 UTC
These both mention the need to set ansible_ssh_user

https://docs.openshift.com/container-platform/3.11/install/example_inventories.html
https://docs.openshift.com/container-platform/3.11/install/configuring_inventory_file.html

Also, every example inventory we ship in the product sets this value.
I think we should CLOSED NOTABUG that bug unless Gilbert objects.

Comment 7 Joan Hoyt 2019-01-24 19:29:06 UTC
Changed status to MODIFIED since discussions are ongoing about whether this should even be documented. (See Comment 6 above.)

Comment 8 Joan Hoyt 2019-01-25 14:02:05 UTC
Changed status back to ASSIGNED, per Vikram's explanation that it should be MODIFIED only when it was out for review after modifications had actually been made in the docs.

Comment 10 Gilbert Kimetto 2019-01-25 16:13:54 UTC
Hi,

I used the OCP 3.10 Install Cluster doc in the downstream portal:

https://access.redhat.com/documentation/en-us/openshift_container_platform/3.7/pdf/installation_and_configuration/OpenShift_Container_Platform-3.7-Installation_and_Configuration-en-US.pdf


There is a table that describes it but does not tell you it's mandatory to set it if you plan to use the playbook.

Comment 14 Anping Li 2019-01-28 17:59:03 UTC
LGTM

Comment 15 Joan Hoyt 2019-01-29 13:47:30 UTC
Anping Li verified. 
Successfully merged. Therefore, changing status to Closed/Next Release.


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