diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-04-24 12:24:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 12:24:09 -0500 |
commit | c902a7f3343ed65791b8e54240f3538a165c5e5e (patch) | |
tree | de32ef8ecf484a6bd4a4457e67cf6e2f296a14cc /roles/lib_openshift/library/oc_obj.py | |
parent | e751716689385f0cfc8f4a1261bf6f8609197a83 (diff) | |
parent | 9034a202e4efe254d99cb1d11a206e3c848d95c6 (diff) | |
download | openshift-c902a7f3343ed65791b8e54240f3538a165c5e5e.tar.gz openshift-c902a7f3343ed65791b8e54240f3538a165c5e5e.tar.bz2 openshift-c902a7f3343ed65791b8e54240f3538a165c5e5e.tar.xz openshift-c902a7f3343ed65791b8e54240f3538a165c5e5e.zip |
Merge pull request #3973 from kwoodson/remove_resource_version
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift/library/oc_obj.py')
-rw-r--r-- | roles/lib_openshift/library/oc_obj.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py index 0b01670c6..706972de2 100644 --- a/roles/lib_openshift/library/oc_obj.py +++ b/roles/lib_openshift/library/oc_obj.py @@ -893,6 +893,13 @@ class OpenShiftCLI(object): def _replace(self, fname, force=False): '''replace the current object with oc replace''' + # We are removing the 'resourceVersion' to handle + # a race condition when modifying oc objects + yed = Yedit(fname) + results = yed.delete('metadata.resourceVersion') + if results[0]: + yed.write() + cmd = ['replace', '-f', fname] if force: cmd.append('--force') |