Upgrade fails during "oc replace" operation.

Solution Verified - Updated -

Issue

During cluster upgrade, the playbook fails as below:

FAILED - RETRYING: Import xPaas image streams (1 retries left).Result was: {
    "attempts": 3, 
    "changed": false, 
    "cmd": [
        "oc", 
        "replace", 
        "--config=/etc/origin/master/admin.kubeconfig", 
        "-n", 
        "openshift", 
        "-f", 
        "/usr/share/openshift/examples/xpaas-streams/"
    ], 
    "delta": "0:00:01.566475", 
    "end": "2020-07-07 16:03:08.143478", 
    "failed_when_result": true, 
    "invocation": {
        "module_args": {
            "_raw_params": "oc replace --config=/etc/origin/master/admin.kubeconfig -n openshift -f /usr/share/openshift/examples/xpaas-streams/\n", 
            "_uses_shell": false, 
            "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, 
    "retries": 4, 
    "start": "2020-07-07 16:03:06.577003", 
    "stderr": "Error from server (Conflict): Operation cannot be fulfilled on imagestreams.image.openshift.io \"rhpam-process-migration-rhel8\": the object has been modified; please apply your changes to the latest version and try again", 

The offending imagestream is not always the same and the issue is not always reproducible.

Environment

openshift-ansible 3.{9|10|11}

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content