Upgrade from 3.10 to 3.11 failing "Delete OpenShift SDN/OVS pods prior to upgrade": "unknown flag: --field-selector"

Solution Verified - Updated -

Issue

  • Upgrading from 3.10 to 3.11 is failing with the error:

    fatal: [master.example.com -> master.example.com]: FAILED! => {
        "changed": true,
        "cmd": "oc delete pods --config=/etc/origin/master/admin.kubeconfig --field-selector=spec.nodeName=master.example.com -n openshift-sdn --force --grace-period=0\n",
        "delta": "0:00:00.477759",
        "end": "2020-06-29 15:41:29.652942",
        "invocation": {
            "module_args": {
                "_raw_params": "oc delete pods --config=/etc/origin/master/admin.kubeconfig --field-selector=spec.nodeName=master.example.com -n openshift-sdn --force --grace-period=0\n",
                "_uses_shell": true,
                "argv": null,
                "chdir": null,
                "creates": null,
                "executable": null,
                "removes": null,
                "stdin": null,
                "stdin_add_newline": true,
                "strip_empty_ends": true,
                "warn": true
            }
        },
        "msg": "non-zero return code",
        "rc": 1,
        "start": "2020-06-29 15:41:29.175183",
        "stderr": "Error: unknown flag: --field-selector\n\n\nUsage:\n  oc delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) [flags]\n\nExamples:\n  # Delete a pod using the type and ID specified in pod.json.\n  oc delete -f pod.json\n  \n  # Delete a pod based on the type and ID in the JSON passed into stdin.\n  cat pod.json | oc delete -f -\n  \n  # Delete pods and services with label name=myLabel.\n  oc delete pods,services -l name=myLabel\n  \n  # Delete a pod with name node-1-vsjnm.\n  oc delete pod node-1-vsjnm\n  \n  # Delete all resources associated with a running app, includes\n  # buildconfig,deploymentconfig,service,imagestream,route and pod,\n  # where 'appName' is listed in 'Labels' of 'oc describe [resource] [resource name]' output.\n  oc delete all -l app=appName\n  \n  # Delete all pods\n  oc delete pods --all\n\nOptions:\n      --all=false: Delete all resources, including uninitialized ones, in the namespace of the specified resource types.\n      --cascade=true: If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController).  Default true.\n  -f, --filename=[]: Filename, directory, or URL to files containing the resource to delete.\n      --force=false: Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.\n      --grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).\n      --ignore-not-found=false: Treat \"resource not found\" as a successful delete. Defaults to \"true\" when --all is specified.\n      --include-extended-apis=true: If true, include definitions of new APIs via calls to the API server. [default true]\n      --include-uninitialized=false: If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., \"--all\". Objects with empty metadata.initializers are regarded as initialized.\n      --now=false: If true, resources are signaled for immediate shutdown (same as --grace-period=1).\n  -o, --output='': Output mode. Use \"-o name\" for shorter output (resource/name).\n  -R, --recursive=false: Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.\n  -l, --selector='': Selector (label query) to filter on, not including uninitialized ones.\n      --timeout=0s: The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object\n\nUse \"oc options\" for a list of global command-line options (applies to all commands).",
        "stderr_lines": [
            "Error: unknown flag: --field-selector",
            "",
    ...
    Failure summary:
    
      1. Hosts:    master.example.com
        Play:     Update master nodes
        Task:     Delete OpenShift SDN/OVS pods prior to upgrade
        Message:  non-zero return code
    

Environment

  • OpenShift Container Platform 3.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In