Bug 1482498

Summary: Unable to edit image
Product: OpenShift Container Platform Reporter: Jaspreet Kaur <jkaur>
Component: NodeAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: DeShuai Ma <dma>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: aos-bugs, jokerman, mfojtik, mmccomas
Target Milestone: ---   
Target Release: 3.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Differences in representation of image object between internal and versioned, specifically the docker image metadata field. Consequence: You can't oc edit image. Fix: ImageStreamTag allows editing only annotations, but that works only with oc annotate or oc patch command which specifically say what's edited. When oc edit is being invoked it trips over the internal Image object of an IST, due to differences between internal and external representations of this object. This approach allows setting patchStrategy on struct objects, so they can be ignored, here deleted. Result: oc edit image works without any problems.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-07 19:13:34 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 Jaspreet Kaur 2017-08-17 12:29:04 UTC
Description of problem: Getting an error while editing image annotation

> while editing image,
> oc annotate --overwrite image sha256:c48070e4d8ec99d81170664aa8938dc2152e3c2fe4297bc511131e24f3ad6489 images.openshift.io/deny-execution=false
> 
> i get error:
> Error from server: unable to find api field in struct RawExtension for the json field "Parent" or 
> Error from server: unable to find api field in struct RawExtension for the json field "Id" or
> Error from server: unable to find api field in struct RawExtension for the json field "config"


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results: It fails to edit the image


Expected results: It should suceed

Additional info:

Works in 3.5

Seems related to :

https://bugzilla.redhat.com/show_bug.cgi?id=1403134

and https://github.com/openshift/origin/issues/9232

Comment 4 DeShuai Ma 2017-08-30 09:43:52 UTC
Verify on openshift v3.4.1.44.17
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

Steps:

[root@host-8-241-64 ~]# oc get images sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd
NAME                                                                      DOCKER REF
sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd   registry.access.redhat.com/jboss-amq-6/amq63-openshift@sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd
[root@host-8-241-64 ~]# oc annotate --overwrite image sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd images.openshift.io/deny-execution=false
image "sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd" annotated

Comment 5 DeShuai Ma 2017-08-30 09:48:37 UTC
[root@openshift-135 ~]# oc version
oc v3.4.1.44.11
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://openshift-135.lab.sjc.redhat.com:8443
openshift v3.4.1.44.11
kubernetes v1.4.0+776c994
[root@openshift-135 ~]# oc get images sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd
NAME                                                                      DOCKER REF
sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd   registry.access.redhat.com/jboss-amq-6/amq63-openshift@sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd
[root@openshift-135 ~]# oc annotate --overwrite image sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd images.openshift.io/deny-execution=false
image "sha256:0119197c041e44c530b4dedaea4182a69b23426e0b8f7a0e87e340bf7bad25dd" annotated

Comment 7 errata-xmlrpc 2017-09-07 19:13:34 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:2670