Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1381833 - issue with multi-container pods and triggers[].imageChangeParams.containerNames[]
issue with multi-container pods and triggers[].imageChangeParams.containerNam...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Deployments (Show other bugs)
3.3.0
x86_64 Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michail Kargakis
zhou ying
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-05 03:35 EDT by Guillaume Coré
Modified: 2017-03-08 13 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A deployment config with multiple containers using the same ImageChangeTrigger wouldn't be updated by the image change controller. After https://github.com/openshift/origin/pull/9349 we redesigned the triggering mechanism and got rid of the image change controller. This bug was fixed as part of that work.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:41:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Guillaume Coré 2016-10-05 03:35:45 EDT
Description of problem:

When the DeploymentConfig has multi-container pods, the image is not updated after the build is finished. 

Version-Release number of selected component (if applicable):
$ oc version
oc v3.3.0.30
kubernetes v1.3.0+52492b4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://master.manage.bm.chmouel.com:8443
openshift v3.3.0.30
kubernetes v1.3.0+52492b4

How reproducible:
everytime

Steps to Reproduce:
oc new-project test-multicontainer
oc new-app
centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git -o yaml
> 1.yaml

vim 1.yaml

# add a new container to the pod :

       containers:
        - image: ruby-ex:latest
          name: ruby-ex
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
        - image: ruby-ex:latest
          name: ruby-ex2
          ports:
          - containerPort: 8081
            protocol: TCP
          resources: {}

# and also add ruby-ex2 to  containerNames:

    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - ruby-ex
        - ruby-ex2


Complete file after modification :
https://gist.github.com/fridim/92e6a0e8039e68ad6fad3d66f1d8419a


oc create -f 1.yaml

The deployment fails :

$ oc get pods
NAME               READY     STATUS      RESTARTS   AGE
ruby-ex-1-build    0/1       Completed   0          15m
ruby-ex-1-deploy   0/1       Error       0          13m


Actual results:
whole dc after build is finished: https://gist.github.com/fridim/aa3491eac28ee0ad7c4fd3b87da10641

Expected results:
both image for containers should be updated with something like :
        - image:
172.30.87.209:5000/test-multicontainer/ruby-ex@sha256:9fb754049d4f97df32572baccddcbfa34fecbcc559efa7bf16441e4437acb25a


Additional info:
WORKAROUND:
 Create one triggers[].imageChangeParams  by container with only one
name in containerNames[]  then it's OK
example: this one works:
https://gist.github.com/fridim/f11357de190ec969cdb7eb41d95341b0

DC shows image updated for both containers:
https://gist.github.com/fridim/d3c0caa0b6b8b20dd6029d8d4a3faa5e
Comment 1 Michail Kargakis 2016-10-05 07:18:54 EDT
This should be fixed in master already by https://github.com/openshift/origin/pull/9349. I am adding a test to verify the fix in https://github.com/openshift/origin/pull/11221
Comment 4 zhou ying 2016-10-17 22:14:51 EDT
 Michail Kargakis :
 Thanks, my DC is wrong, now the issue has fixed:
openshift version
openshift v3.4.0.12
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1

      containers:
      - command:
        - /bin/sleep
        - "100"
        image: 172.30.191.97:5000/testzy/ruby-ex@sha256:9983aefce7d3a1a687de4a3350a1d829a23457353a6d2a209ffa38a86785740e
        imagePullPolicy: Always
        name: ruby-ex
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
      - command:
        - /bin/sleep
        - "100"
        image: 172.30.191.97:5000/testzy/ruby-ex@sha256:9983aefce7d3a1a687de4a3350a1d829a23457353a6d2a209ffa38a86785740e
        imagePullPolicy: Always
        name: ruby-ex2
        ports:
        - containerPort: 8081
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
Comment 6 errata-xmlrpc 2017-01-18 07:41:57 EST
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:0066

Note You need to log in before you can comment on or make changes to this bug.