Bug 1259153 - Can't deploy application when there is no related imagestream
Summary: Can't deploy application when there is no related imagestream
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Deployments
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: Yan Du
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-02 06:06 UTC by DeShuai Ma
Modified: 2015-11-23 21:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:18:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description DeShuai Ma 2015-09-02 06:06:26 UTC
Description of problem:
When deploymentConfig using a ImageStreamTag, but there is no related imagestream, deploy the app, it always failed with error: "error: couldn't find deployment "mysql-0""

Version-Release number of selected component (if applicable):
openshift v1.0.5-134-g01b410a
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
Always

Steps to Reproduce:
1.Create a project
$ oc new-project dma2

2.Confirm there is no related imagestream in openshift project

3.Create app from mysql-ephemeral-template.json
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mysql-ephemeral-template.json -n dma2

4.Check the dc and deploy
[fedora@ip-172-18-1-231 sample-app]$ oc get dc -n dma2
NAME      TRIGGERS                    LATEST VERSION
mysql     ConfigChange, ImageChange   0

5.Deploy the db app by manual
$ oc deploy mysql --latest -n dma2

Actual results:
[fedora@ip-172-18-1-231 sample-app]$ oc deploy mysql --latest -n dma2
error: couldn't find deployment "mysql-0"

Expected results:
5.Should tip can't find related imagestream error.

Additional info:

Comment 1 Dan Mace 2015-09-02 13:58:44 UTC
To clarify: the expected result here right now should be that a deployment is started (even though it'll fail due to the lack of an image stream tag).

If you use `oc describe dc/mysql` you can see the failure of the initial deployment, and `oc deploy mysql` shows that we're awaiting an event to try again.

Comment 2 Dan Mace 2015-09-03 20:34:56 UTC
https://github.com/openshift/origin/pull/4514

Comment 3 DeShuai Ma 2015-09-09 02:46:29 UTC
openshift version:
openshift v1.0.5-290-g1ba18e6
kubernetes v1.1.0-alpha.0-1605-g44c91b1

[fedora@ip-172-18-4-140 sample-app]$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mysql-ephemeral-template.json -n dma
services/mysql
deploymentconfigs/mysql
Service "mysql" created at 172.30.116.185 with port mappings 3306.
Run 'oc status' to view your app.
[fedora@ip-172-18-4-140 sample-app]$ oc get dc -n dma
NAME      TRIGGERS                    LATEST VERSION
mysql     ConfigChange, ImageChange   0
[fedora@ip-172-18-4-140 sample-app]$ oc deploy mysql --latest -n dma
Started deployment #1

[fedora@ip-172-18-4-140 sample-app]$ oc describe dc/mysql -n dma
Name:		mysql
Created:	About a minute ago
Labels:		template=mysql-ephemeral-template
Latest Version:	1
Triggers:	Image(mysql@latest, auto=true), Config
Strategy:	Recreate
Template:
  Selector:	name=mysql
  Replicas:	1
  Containers:
  NAME	IMAGE	ENV
  mysql	mysql	MYSQL_DATABASE=sampledb,MYSQL_PASSWORD=08WLiQKryhDFKXsb,MYSQL_USER=userCMT
Deployment #1 (latest):
	Name:		mysql-1
	Created:	59 seconds ago
	Status:		Complete
	Replicas:	1 current / 1 desired
	Selector:	deployment=mysql-1,deploymentconfig=mysql,name=mysql
	Labels:		openshift.io/deployment-config.name=mysql,template=mysql-ephemeral-template
	Pods Status:	1 Running / 0 Waiting / 0 Succeeded / 0 Failed
Events:
  FirstSeen	LastSeen	Count	From		SubobjectPath	Reason		Message
  1m		1m		1	{deployer }			failedCreate	Couldn't create initial deployment: DeploymentConfig "mysql" is invalid: triggers[0].imageChange.from: invalid value 'mysql', Details: imageStream "mysql" not found


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