[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: pipeline deployment keeps re-deploying over and over again



Hi,

I've opened an issue here: https://github.com/openshift/origin/issues/11519

Rehards,
Miklós

On Mon, Oct 24, 2016 at 11:55 AM, Michail Kargakis <mkargaki redhat com> wrote:
One more thing, I cannot see latestVersion in the status of your DC? Is that also 128? Can you also post some of the last RCs too? I am not familiar with what the Jenkins plugin is updating on the DC.
ccing Gabe and Ben who may know more.

On Mon, Oct 24, 2016 at 11:40 AM, Miklos Balazs <mbalazs gmail com> wrote:
Hi Michail,

Yes, that's how I have removed it. I wanted to remove it because I was suspecting that the continuous re-deployments occur because of the config change trigger (the jenkins sync plugin is continously updating the DC, and these updates are causing the deployment because of the trigger). And after removing it and exporting the DC I can see that the ConfigChange trigger has indeed been removed. But as soon as I start the pipeline and it reaches the deployment phase, the config change trigger is back. 

I will open an issue about this as you requested.

Regards,
Miklós

On Mon, Oct 24, 2016 at 11:31 AM, Michail Kargakis <mkargaki redhat com> wrote:
If you don't want to use a CC trigger, do not remove the field but set it as an empty array = [] (similar to the triggers field in the BC)

https://docs.openshift.org/latest/dev_guide/deployments.html#triggers

Can you open an issue on Github about the behavior you see? I will look at it later today. Thanks.

On Mon, Oct 24, 2016 at 11:05 AM, Miklos Balazs <mbalazs gmail com> wrote:
Hi Michail,

Sure. I'm running origin-1.3.0 from the CentOS RPMs. Here is my DC:

apiVersion: v1
kind: DeploymentConfig
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
  creationTimestamp: null
  generation: 128
  labels:
    app: myapp
  name: myapp
spec:
  replicas: 1
  selector:
    deploymentconfig: myapp
  strategy:
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
    type: Rolling
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: myapp
        deploymentconfig: myapp
    spec:
      containers:
        imagePullPolicy: Always
        name: myapp
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
      terminationGracePeriodSeconds: 30
  test: false
  triggers:
  - type: ConfigChange
status:
  availableReplicas: 1
  observedGeneration: 128
  replicas: 1
  updatedReplicas: 1

The funny thing is that if I remove the ConfigChange trigger, it gets added back as soon as I start the pipeline and it reaches the deploy phase (but not sooner). 

This is my pipeline BC:

apiVersion: v1
kind: BuildConfig
metadata:
  annotations:
    pipeline.alpha.openshift.io/uses: '[{"name": "myapp", "namespace": "", "kind":
      "DeploymentConfig"}]'
  creationTimestamp: null
  labels:
    name: myfirstpipeline
  name: myfirstpipeline
spec:
  output: {}
  postCommit: {}
  resources: {}
  runPolicy: Serial
  source:
    type: None
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
        node('maven') {
        stage 'build'
        openshiftBuild(buildConfig: 'myapp', showBuildLogs: 'true')
        stage 'deploy'
        openshiftDeploy(deploymentConfig: 'myapp')
        openshiftScale(deploymentConfig: 'myapp',replicaCount: '2')
        }
    type: JenkinsPipeline
  triggers: []
status:
  lastVersion: 0

Regards,
Miklos

On Mon, Oct 24, 2016 at 10:15 AM, Michail Kargakis <mkargaki redhat com> wrote:
What version of OpenShift are you running? Can you post your DC?

On Sat, Oct 22, 2016 at 6:33 PM, Miklos Balazs <mbalazs gmail com> wrote:
Hi Everyone,

I am trying to set up a build pipeline by following the tutorial on the OpenShift blog site  (https://blog.openshift.com/create-build-pipelines-openshift-3-3/), but I couldn't manage to set it up properly, not even the simple pipeline from Part 1.

The first problem is I encountered was that if I create the application by disabling the config change and image change triggers on the deployment (as shown in the video), then the deployment will fail, because the DC created by the web console has the value "myphp:latest" under "spec.template.spec.containers[0].image". Without an image change trigger, this value won't get updated to point to the specific image stream in the internal registry.

But I could overcome this by setting the proper value in the DC, so it points to the image stream. This way the deployment should work properly, but then I hit another problem: when I start the pipeline, the build phase succeeds, and then at the deployment phase it keeps on deploying the application over and over again. 10 minutes and about 30 deployments later the deployment phase of the pipeline times out, and the build pipeline stops with an error. At this point, the continous re-deployment stops and I end up with a working deployment of my app.

What I could figure out is that somehow a ConfigChange trigger got added to the DC. I think that this might have something to do with the continuous re-deployments: possibly something is updating the DC during the deployment phase of the pipeline, and this causes it to keep deploying over and over again (there is a "openshift.io/deployment.status-reason: caused by a config change" annotation on the RCs). If I remove the ConfigChange trigger from the DC, it gets added again as soon as I start the pipeline.

Could someone please help me with this? Am I doing something wrong or maybe something's broken with my setup?

Regards,
Miklos

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]