Bug 1464010 - etcd migrate fail on atomic hosts when access by cloud-user
etcd migrate fail on atomic hosts when access by cloud-user
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Steve Milner
Anping Li
Depends On:
  Show dependency treegraph
Reported: 2017-06-22 05:27 EDT by Anping Li
Modified: 2017-08-16 15 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-10 01:28:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Anping Li 2017-06-22 05:27:39 EDT
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:

Steps to Reproduce:
1. install OCP v3.5 on atomic. and use cloud-user to access instances.
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 --ttl-keys-prefix /kubernetes.io/events --lease-duration 1h", 
    "failed": true, 
    "item": "/kubernetes.io/events", 
    "rc": 2


[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 --ttl-keys-prefix /kubernetes.io/masterleases --lease-duration 1h", 
    "failed": true, 
    "item": "/kubernetes.io/masterleases", 
    "rc": 2


[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 09:18:12 EDT
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 12:09:00 EDT
Hmm, shouldn't /usr/local/bin be in the path by default?  Is ansible doing some filtering?
Comment 5 Steve Milner 2017-06-28 11:44:10 EDT
Possible fix: https://github.com/openshift/openshift-ansible/pull/4633
Comment 8 errata-xmlrpc 2017-08-10 01:28:56 EDT
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.