Bug 1467799

Summary: etcdctl v2 is using v3 options when migrate etcd on atomic host etcd
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: DocumentationAssignee: Kathryn Alexander <kalexand>
Status: CLOSED NOTABUG QA Contact: Vikram Goyal <vigoyal>
Severity: high Docs Contact: Vikram Goyal <vigoyal>
Priority: high    
Version: 3.6.0CC: anli, aos-bugs, jokerman, kalexand, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-15 14:31:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anping Li 2017-07-05 08:04:38 UTC
Description of problem:
The migrate failed on atomic hosts.  the etcdctl v2 is using v3 options.



Version-Release number of selected component (if applicable):
openshift-ansible-3.6.133
Red Hat Enterprise Linux Atomic Host release 7.3
etcdctl version 2.3.7

#atomic host status
● rhel-atomic-host:rhel-atomic-host/7/x86_64/standard
       Version: 7.3.1 (2016-11-14 22:41:32)
        Commit: 42798872035ae14de03b9b7697080daf00e17dac9b1aa0f5b05457f77c8eeefd
        OSName: rhel-atomic-host

How reproducible:
always

Steps to Reproduce:
1. install OCP v3.5 on atomic hosts
2. upgrade to OCP 3.6
   ansible-playbook -i /root/workdir/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-etcd/migrate.yml -v

Actual results:
TASK [etcd_migrate : Check if there are any v3 data] ***************************
changed: [qe-anli-master-etcd-3.0705-ut1.qe.rhcloud.com] => {
    "changed": true, 
    "cmd": [
        "etcdctl", 
        "--cert", 
        "/etc/etcd/peer.crt", 
        "--key", 
        "/etc/etcd/peer.key", 
        "--cacert", 
        "/etc/etcd/ca.crt", 
        "--endpoints", 
        "https://10.240.0.44:2379", 
        "get", 
        "", 
        "--from-key", 
        "--keys-only", 
        "-w", 
        "json", 
        "--limit", 
        "1"
    ], 
    "delta": "0:00:00.021005", 
    "end": "2017-07-05 07:16:27.737026", 
    "rc": 0, 
    "start": "2017-07-05 07:16:27.716021", 
    "warnings": []
}

STDOUT:

Incorrect Usage.

NAME:
   etcdctl - A simple command line client for etcd.

USAGE:
   etcdctl [global options] command [command options] [arguments...]
   
VERSION:
   2.3.7
   
COMMANDS:
   backup        backup an etcd directory
   cluster-health    check the health of the etcd cluster
   mk            make a new key with a given value
   mkdir        make a new directory
   rm            remove a key or a directory
   rmdir        removes the key if it is an empty directory or a key-value pair
   get            retrieve the value of a key
   ls            retrieve a directory
   set            set the value of a key
   setdir        create a new directory or update an existing directory TTL
   update        update an existing key with a given value
   updatedir        update an existing directory
   watch        watch a key for changes
   exec-watch        watch a key for changes and exec an executable
   member        member add, remove and list subcommands
   import        import a snapshot to a cluster
   user            user add, grant and revoke subcommands
   role            role add, grant and revoke subcommands
   auth            overall auth controls
   help, h        Shows a list of commands or help for one command
   
GLOBAL OPTIONS:
   --debug            output cURL commands which can be used to reproduce the request
   --no-sync            don't synchronize cluster information before sending request
   --output, -o "simple"    output response in the given format (`simple`, `extended` or `json`)
   --discovery-srv, -D         domain name to query for SRV records describing cluster endpoints
   --peers, -C             DEPRECATED - "--endpoints" should be used instead
   --endpoint             DEPRECATED - "--endpoints" should be used instead
   --endpoints             a comma-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:2379,http://127.0.0.1:4001")
   --cert-file             identify HTTPS client using this SSL certificate file
   --key-file             identify HTTPS client using this SSL key file
   --ca-file             verify certificates of HTTPS-enabled servers using this CA bundle
   --username, -u         provide username[:password] and prompt if password is not supplied.
   --timeout "1s"        connection timeout per request
   --total-timeout "5s"        timeout for the command execution (except watch)
   --help, -h            show help
   --version, -v        print the version
   

<---skip--->
<---skip--->

TASK [etcd_migrate : fail] *****************************************************
skipping: [qe-anli-master-etcd-1.0705-ut1.qe.rhcloud.com] => {
    "changed": false, 
    "skip_reason": "Conditional check failed", 
    "skipped": true
}

Expected results:


Additional info:

Comment 1 Scott Dodson 2017-07-05 16:03:54 UTC
We should just document that you must be running Atomic Host 7.3.5 or later before upgrading to OCP 3.6 and performing a migration.

Comment 2 Anping Li 2017-07-10 07:05:15 UTC
Just confirm. No such issue with Atomic Host 7.3.5 and later.

Comment 4 Anping Li 2018-05-14 01:50:35 UTC
It is in the requirement. Could you move to on_qa?

Base OS: RHEL 7.3 or 7.4 with the "Minimal" installation option and the latest packages from the Extras channel, or RHEL Atomic Host 7.3.6 or later.

Comment 5 Kathryn Alexander 2018-05-14 13:51:58 UTC
Both the manual and automatic upgrade docs do call out the requirement to meet the install prereqs, so I don't think a doc change is required.

https://docs.openshift.com/container-platform/3.6/install_config/upgrading/automated_upgrades.html
https://docs.openshift.com/container-platform/3.6/install_config/upgrading/manual_upgrades.html