Bug 1259153 - Can't deploy application when there is no related imagestream
Can't deploy application when there is no related imagestream
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Deployments (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
Yan Du
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-02 02:06 EDT by DeShuai Ma
Modified: 2015-11-23 16:18 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:18:37 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)

  None (edit)
Description DeShuai Ma 2015-09-02 02:06:26 EDT
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 09:58:44 EDT
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 16:34:56 EDT
https://github.com/openshift/origin/pull/4514
Comment 3 DeShuai Ma 2015-09-08 22:46:29 EDT
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.