Bug 1259153 - Can't deploy application when there is no related imagestream
Can't deploy application when there is no related imagestream
Product: OpenShift Origin
Classification: Red Hat
Component: Deployments (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
Yan Du
Depends On:
  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:
Last Closed: 2015-11-23 16:18:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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:

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
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
Service "mysql" created at 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
  Selector:	name=mysql
  Replicas:	1
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
  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.