Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageChange trigger won't work when ConfigChange trigger the deploymentconfig #18934

Closed
jeffrey4l opened this issue Mar 11, 2018 · 2 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2 sig/master

Comments

@jeffrey4l
Copy link

[provide a description of the issue]

Version
$ rpm -qa | egrep "openshift|origin"
origin-3.7.0-1.0.7ed6862.x86_64
tuned-profiles-origin-node-3.7.0-1.0.7ed6862.x86_64
openshift-ansible-docs-3.7.13-1.el7.noarch
openshift-ansible-roles-3.7.13-1.el7.noarch
centos-release-openshift-origin37-1-1.el7.centos.noarch
origin-clients-3.7.0-1.0.7ed6862.x86_64
origin-docker-excluder-3.7.0-1.0.7ed6862.noarch
origin-master-3.7.0-1.0.7ed6862.x86_64
origin-node-3.7.0-1.0.7ed6862.x86_64
origin-sdn-ovs-3.7.0-1.0.7ed6862.x86_64
openshift-ansible-lookup-plugins-3.7.13-1.el7.noarch
openshift-ansible-filter-plugins-3.7.13-1.el7.noarch
openshift-ansible-playbooks-3.7.13-1.el7.noarch
openshift-ansible-3.7.13-1.el7.noarch
origin-excluder-3.7.0-1.0.7ed6862.noarch
openshift-ansible-callback-plugins-3.7.13-1.el7.noarch
Steps To Reproduce
  1. Create a ImageStream and DeploymentConfig through
---
kind: ImageStream
apiVersion: v1
metadata:
  name: echo
  labels:
    app: echo
spec:
  tags:
    - name: "1.0"
      from:
        kind: DockerImage
        name: googlecontainer/echoserver:1.5
---
kind: DeploymentConfig
apiVersion: v1
metadata:
  name: echo
  labels:
    app: echo
spec:
  strategy:
    type: Recreate
  triggers:
    - type: ConfigChange
    - type: ImageChange
      imageChangeParams:
        automatic: true
        containerNames:
          - echo
        from:
          kind: ImageStreamTag
          name: "echo:1.0"
  replicas: 1
  selector:
    app: echo
  template:
    metadata:
      labels:
        app: echo
    spec:
      containers:
        - name: echo
          image: "echo"
          ports:
            - containerPort: 8080
  1. re-apply the above deploymentconfig
oc apply -f deploymentconfig.yml
Current Result

In step 2, the image will become "echo", the pod tries to pull this image from hub.docker.com with following logs

Failed to pull image "echo": rpc error: code = 2 desc = Error: image library/echo:latest not found
Expected Result

In step2, the image should be parsed to ImageStream like step 1, to pull the image from local registry.

@jwforres
Copy link
Member

@openshift/sig-master

@jwforres jwforres added kind/bug Categorizes issue or PR as related to a bug. priority/P2 labels Mar 20, 2018
@tnozicka
Copy link
Contributor

I does work, but with the apply you are saying replace the resolved image with "echo" and since that is a valid config change, DC deploys and you specified invalid image with all the consequences.

If you want to use just the IS trigger, set image to " ". Also update to newer 3.7 to pick up this #18524

This is already fixed in release-3.7 and master
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2 sig/master
Projects
None yet
Development

No branches or pull requests

5 participants