Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1414707

Summary: [3.4] failed to evacuate node due to unknown flag drain used in upgrade_nodes.yml
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.1CC: aos-bugs, jialiu, jokerman, mifiedle, mmccomas
Target Milestone: ---Keywords: Regression
Target Release: 3.4.z   
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: 2017-01-31 21:11:12 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 liujia 2017-01-19 10:26:28 UTC
Description of problem:
When upgrade 3.3.1 to 3.4.1, upgrade failed at task [Evacuate Node for Kubelet upgrade] for an unsupported command used.
<--snip-->
fatal: [x.x.x.x -> x.x.x.x]: FAILED! => {
    "changed": true, 
    "cmd": [
        "oc", 
        "adm", 
        "manage-node", 
        "192.168.2.107", 
        "--drain", 
        "--force"
    ], 
    "delta": "0:00:00.247350", 
    "end": "2017-01-16 21:28:09.299543", 
    "failed": true, 
    "invocation": {
        "module_args": {
            "_raw_params": "oc adm manage-node 192.168.2.107 --drain --force", 
            "_uses_shell": false, 
            "chdir": null, 
            "creates": null, 
            "executable": null, 
            "removes": null, 
            "warn": true
        }, 
        "module_name": "command"
    }, 
    "rc": 1, 
    "start": "2017-01-16 21:28:09.052193", 
    "warnings": []
}

STDERR:

Error: unknown flag: --drain


Usage:
  oc adm manage-node [options]
<--snip-->

# grep -r "drain"
playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml:      {{ hostvars[groups.oo_first_master.0].openshift.common.client_binary }} adm manage-node {{ openshift.common.hostname | lower }} --drain --force


Version-Release number of selected component (if applicable):
openshift-ansible-playbooks-3.4.55-1.git.0.9cb1f40.el7.noarch
openshift-ansible-roles-3.4.55-1.git.0.9cb1f40.el7.noarch

How reproducible:
always

Steps to Reproduce:
1.install ocp3.3.1 on aws.
2.upgrade to 3.4.1.
3.

Actual results:
Failed to evacuate node with command "oc adm manage-node x.x.x.x --drain --force"

Expected results:
Evacuating node should be successful.

Additional info:

# oadm manage-node --evacuate
Flag --evacuate has been deprecated, use 'oadm manage-node drain NODE' instead
error: must provide --selector=<node_selector> or nodes
See 'oadm manage-node -h' for help and examples.

Comment 3 liujia 2017-01-23 05:57:55 UTC
This bug has been found on 3.4.55-1, which is the build version of linked errata in comment 2. And I checked again, those changes in pr 3122 were not included in latest errata puddle.
openshift-ansible-playbooks-3.4.55-1.git.0.9cb1f40.el7.noarch

Change status back to assigned.

Comment 5 liujia 2017-01-24 05:07:27 UTC
Version:
atomic-openshift-utils-3.4.56-1.git.0.7ba9968.el7.noarch

Steps:
1. install ocp 3.3.1
2. upgrade to 3.4.1

Result:
upgrade successfully.
# openshift version
openshift v3.4.0.40
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

Comment 7 errata-xmlrpc 2017-01-31 21:11:12 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/RHBA-2017:0224