Bug 1464010 - etcd migrate fail on atomic hosts when access by cloud-user
Summary: etcd migrate fail on atomic hosts when access by cloud-user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Steve Milner
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-22 09:27 UTC by Anping Li
Modified: 2017-08-16 19:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 05:28:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description Anping Li 2017-06-22 09:27:39 UTC
Description of problem:
On atomic hosts, the oadm pathis /var/usrlocal/bin/oadm and /usr/local/bin/oadm.  But the path /usr/local/bin isn't in Environment PATH of root.  so we must use absolute path "/usr/local/bin/oadm" with root

On atomic, the oadm path is /var/usrlocal/bin/oadm or /usr/local/bin/oadm
On containerized Env on RHEL, the oadm path is  /usr/local/bin/oadm
On rpm Env on RHEL, the oadm path is  /usr/bin/oadm

Version-Release number of selected component (if applicable):
openshift/openshift-ansible: Pull Request 4492.


How reproducible:
always

Steps to Reproduce:
1. install OCP v3.5 on atomic. and use cloud-user to access instances.
   ansible_user=cloud-user 
   ansible_become=true
2. upgrade to v3.6
3. migrate etcd from v2 to v3
   anible-playbook openshift-ansible/playbooks/byo/openshift-etcd/migrate.yml

Actual results:
TASK [etcd_migrate : Enable etcd member] ***************************************
changed: [openshift-225.lab.eng.nay.redhat.com]

TASK [etcd_migrate : Re-introduce leases (as a replacement for key TTLs)] ******
failed: [openshift-225.lab.eng.nay.redhat.com] (item=/kubernetes.io/events) => {
    "cmd": "oadm migrate etcd-ttl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --etcd-address https://192.168.1.185:2379 --ttl-keys-prefix /kubernetes.io/events --lease-duration 1h", 
    "failed": true, 
    "item": "/kubernetes.io/events", 
    "rc": 2
}

MSG:

[Errno 2] No such file or directory

failed: [openshift-225.lab.eng.nay.redhat.com] (item=/kubernetes.io/masterleases) => {
    "cmd": "oadm migrate etcd-ttl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --etcd-address https://192.168.1.185:2379 --ttl-keys-prefix /kubernetes.io/masterleases --lease-duration 1h", 
    "failed": true, 
    "item": "/kubernetes.io/masterleases", 
    "rc": 2
}

MSG:

[Errno 2] No such file or directory

    to retry, use: --limit @/root/openshift-ansible/playbooks/byo/openshift-etcd/migrate.retry

PLAY RECAP *********************************************************************
localhost                  : ok=22   changed=0    unreachable=0    failed=0   
openshift-208.lab.eng.nay.redhat.com : ok=65   changed=1    unreachable=0    failed=0   
openshift-225.lab.eng.nay.redhat.com : ok=116  changed=9    unreachable=0    failed=1   

Expected results:


Additional info:

Comment 1 Scott Dodson 2017-06-22 13:18:12 UTC
need to either just alter the command for atomic host or alter the path environment to include /usr/local/bin

Comment 2 Colin Walters 2017-06-26 16:09:00 UTC
Hmm, shouldn't /usr/local/bin be in the path by default?  Is ansible doing some filtering?

Comment 5 Steve Milner 2017-06-28 15:44:10 UTC
Possible fix: https://github.com/openshift/openshift-ansible/pull/4633

Comment 8 errata-xmlrpc 2017-08-10 05:28:56 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.

https://access.redhat.com/errata/RHEA-2017:1716


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