-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Manual deployment with ImageStream fails (sometimes) #16728
Comments
I did some further investigation. Here is a diff of two DCs diff -u /tmp/fca_after.yml /tmp/hsv_before.yml
--- /tmp/fca_after.yml 2017-10-06 20:35:31.000000000 +0200
+++ /tmp/hsv_before.yml 2017-10-06 20:18:28.000000000 +0200
@@ -3,19 +3,19 @@
metadata:
annotations:
USERNAME: developer
- creationTimestamp: 2017-10-06T18:33:40Z
- generation: 2
+ creationTimestamp: 2017-10-06T18:17:41Z
+ generation: 1
labels:
syndesis.io/revision-id: "2"
- name: fca
+ name: hsv
namespace: myproject
- resourceVersion: "7324"
- selfLink: /oapi/v1/namespaces/myproject/deploymentconfigs/fca
- uid: dff2ee69-aac4-11e7-80dd-9a3aa9bfc000
+ resourceVersion: "6928"
+ selfLink: /oapi/v1/namespaces/myproject/deploymentconfigs/hsv
+ uid: a4408707-aac2-11e7-80dd-9a3aa9bfc000
spec:
replicas: 1
selector:
- integration: fca
+ integration: hsv
strategy:
activeDeadlineSeconds: 21600
resources: {}
@@ -30,12 +30,12 @@
metadata:
creationTimestamp: null
labels:
- integration: fca
+ integration: hsv
spec:
containers:
- image: ' '
imagePullPolicy: Always
- name: fca
+ name: hsv
ports:
- containerPort: 8778
name: jolokia
@@ -55,35 +55,28 @@
- name: secret-volume
secret:
defaultMode: 420
- secretName: fca
+ secretName: hsv
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
containerNames:
- - fca
+ - hsv
from:
kind: ImageStreamTag
- name: fca:latest
+ name: hsv:latest
namespace: myproject
type: ImageChange
status:
availableReplicas: 0
conditions:
- - lastTransitionTime: 2017-10-06T18:33:40Z
- lastUpdateTime: 2017-10-06T18:33:40Z
+ - lastTransitionTime: 2017-10-06T18:17:41Z
+ lastUpdateTime: 2017-10-06T18:17:41Z
message: Deployment config does not have minimum availability.
status: "False"
type: Available
- - lastTransitionTime: 2017-10-06T18:35:15Z
- lastUpdateTime: 2017-10-06T18:35:15Z
- message: 'ReplicationController "fca-1" is invalid: spec.template.spec.containers[0].image:
- Required value'
- reason: ReplicationControllerCreateError
- status: "False"
- type: Progressing
- latestVersion: 1
- observedGeneration: 2
+ latestVersion: 0
+ observedGeneration: 1
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0 The only substantial difference is, that one is at For completeness sake, here are both DCs: fca (bad)apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
USERNAME: developer
creationTimestamp: 2017-10-06T18:33:40Z
generation: 2
labels:
syndesis.io/revision-id: "2"
name: fca
namespace: myproject
resourceVersion: "7324"
selfLink: /oapi/v1/namespaces/myproject/deploymentconfigs/fca
uid: dff2ee69-aac4-11e7-80dd-9a3aa9bfc000
spec:
replicas: 1
selector:
integration: fca
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
integration: fca
spec:
containers:
- image: ' '
imagePullPolicy: Always
name: fca
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /deployments/config
name: secret-volume
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: secret-volume
secret:
defaultMode: 420
secretName: fca
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
containerNames:
- fca
from:
kind: ImageStreamTag
name: fca:latest
namespace: myproject
type: ImageChange
status:
availableReplicas: 0
conditions:
- lastTransitionTime: 2017-10-06T18:33:40Z
lastUpdateTime: 2017-10-06T18:33:40Z
message: Deployment config does not have minimum availability.
status: "False"
type: Available
- lastTransitionTime: 2017-10-06T18:35:15Z
lastUpdateTime: 2017-10-06T18:35:15Z
message: 'ReplicationController "fca-1" is invalid: spec.template.spec.containers[0].image:
Required value'
reason: ReplicationControllerCreateError
status: "False"
type: Progressing
latestVersion: 1
observedGeneration: 2
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0 hsv (good)apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
USERNAME: developer
creationTimestamp: 2017-10-06T18:17:41Z
generation: 1
labels:
syndesis.io/revision-id: "2"
name: hsv
namespace: myproject
resourceVersion: "6928"
selfLink: /oapi/v1/namespaces/myproject/deploymentconfigs/hsv
uid: a4408707-aac2-11e7-80dd-9a3aa9bfc000
spec:
replicas: 1
selector:
integration: hsv
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
integration: hsv
spec:
containers:
- image: ' '
imagePullPolicy: Always
name: hsv
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /deployments/config
name: secret-volume
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: secret-volume
secret:
defaultMode: 420
secretName: hsv
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
containerNames:
- hsv
from:
kind: ImageStreamTag
name: hsv:latest
namespace: myproject
type: ImageChange
status:
availableReplicas: 0
conditions:
- lastTransitionTime: 2017-10-06T18:17:41Z
lastUpdateTime: 2017-10-06T18:17:41Z
message: Deployment config does not have minimum availability.
status: "False"
type: Available
latestVersion: 0
observedGeneration: 1
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0 |
It would help me also when I get to know the magic that |
FYI, I think I could now mimic the behaviour of But still, I think that |
quickly looking at this, |
Cool ! @tnozicka quick question: Which version of Origin / OCP will have this fix ? |
It will be part of 3.9.x |
backport to 3.7 #18524 |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
When using a manual deployment with
oc rollout latest ...
on a DC which has not been initialized (e.g. with its container's spec pointing to an emptyimage: ' '
and having image change triggers).This happens in the following situations:
auto
set tofalse
ortrue
(does not have any effect), it happens always when the manual deployment is firstVersion
Steps To Reproduce
auto
to false:Triggers look like:
ImageStream is
oc rollout latest fck
Current Result
The strange thing is, that it
oc rollout
sometimes work, sometimes not. E.g. when I runoc rollout
right after a build it seems to work. If I use another tool to do the deployment (like the fabric8 openshift Java client) which fails, thenoc rollout
fails, too, afterwards (with the error above). But the DC just looks the same (and has not changed)Expected Result
The text was updated successfully, but these errors were encountered: