Skip to content

oc env doesn't handle update error #5816

Closed

Description

@mnagy

I've seen this flake in our extended tests:

Nov 10 02:40:07.612: INFO: Running 'oc env --namespace=extended-test-s2i-ruby-q51wr --config=/tmp/openshift-extended-tests/core/extended-test-s2i-ruby-q51wr-user.kubeconfig rc rails-postgresql-example-1 RAILS_ENV=development'
Nov 10 02:40:07.715: INFO: Error running &{/data/src/github.com/openshift/origin/_output/local/bin/linux/amd64/oc [oc env --namespace=extended-test-s2i-ruby-q51wr --config=/tmp/openshift-extended-tests/core/extended-test-s2i-ruby-q51wr-user.kubeconfig rc rails-postgresql-example-1 RAILS_ENV=development] []   error: replicationControllers "rails-postgresql-example-1" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
 error: replicationControllers "rails-postgresql-example-1" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
 [] <nil> 0xc2088d71a0 exit status 1 <nil> true [0xc2082aeff0 0xc2082af038 0xc2082af038] [0xc2082aeff0 0xc2082af038] [0xc2082aeff8 0xc2082af030] [0x7d0d20 0x7d0e40] 0xc2089b1da0}:
error: replicationControllers "rails-postgresql-example-1" cannot be updated: the object has been modified; please apply your changes to the latest version and try again

I think oc env should handle this by itself, since this is not a user error and can be handled by just refreshing the object and attempt the update again.

Activity

  1. mfojtik commented on Nov 10, 2015

    @mfojtik
    Contributor

    @mnagy the error is correct (should be better formatted ;-) we should check what is modifying the rails RC on behalf and wait till that modification is done. Then do oc env.

  2. 0xmichalis commented on Nov 10, 2015

    @0xmichalis
    Contributor

    Should be fixed by #5819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions