Bug 1343806 - dev preview builds are not using forcepull
Summary: dev preview builds are not using forcepull
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Stefanie Forrester
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-08 03:18 UTC by Ben Parees
Modified: 2016-06-23 17:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-23 17:31:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ben Parees 2016-06-08 03:18:54 UTC
Description of problem:
dev preview should be configured to use forcePull=true for builds, as discussed here:
https://github.com/openshift/online/issues/111#issuecomment-221022804

but it appears the builds being run in dev preview do not get forcePull set to true.

How reproducible:
always

Steps to Reproduce:
1. define a buildconfig (oc new-app nodejs-mongodb-example)
2. get the pod for the build (oc get pod nodejs-mongodb-example-1-build -o yaml)
3. the BUILD env variable for the pod, the value of which includes the active build definition, should include a forcePull field with a value of true, but it does not.

Either the build override feature is not configured properly in dev preview (likely) or the build override feature is broken (less likely).

Comment 1 Stefanie Forrester 2016-06-08 14:33:25 UTC
There was a duplicate pluginConfig line in master-config.yaml. After removing that, the builds work as expected ('"forcePull":true' appears in the 'BUILD' env variable, and 'imagePullPolicy: Always' is present in the build pod).

[root@dev-preview-int-master-00887 ~]# oadm new-project dakinitest2
Created project dakinitest2
[root@dev-preview-int-master-00887 ~]# oc new-app nodejs-mongodb-example -n dakinitest2
--> Deploying template "nodejs-mongodb-example" in project "openshift" for "nodejs-mongodb-example"
     With parameters:
      Memory Limit=512Mi
      Memory Limit (MongoDB)=512Mi
      Volume Capacity=1Gi
      Git Repository URL=https://github.com/openshift/nodejs-ex.git
      Git Reference=
      Context Directory=
      Application Hostname=
      GitHub Webhook Secret=7pQ20wEiHTrrHA2wArfX6EwGt0c6WBwAxKgpR5IL # generated
      Generic Webhook Secret=oiMLaWlAJQMYD050TuTmASQaf3FGME3BGlBTHT8P # generated
      Database Service Name=mongodb
      MongoDB Username=userPET # generated
      MongoDB Password=IHpOUGX5JFcEW8eE # generated
      Database Name=sampledb
      Database Administrator Password=HCTQoQ8hqwHbOSKd # generated
--> Creating resources with label app=nodejs-mongodb-example ...
    service "nodejs-mongodb-example" created
    route "nodejs-mongodb-example" created
    imagestream "nodejs-mongodb-example" created
    buildconfig "nodejs-mongodb-example" created
    deploymentconfig "nodejs-mongodb-example" created
    persistentvolumeclaim "mongodb" created
    service "mongodb" created
    deploymentconfig "mongodb" created
--> Success
    Build scheduled, use 'oc logs -f bc/nodejs-mongodb-example' to track its progress.
    Run 'oc status' to view your app.
[root@dev-preview-int-master-00887 ~]# oc get pod nodejs-mongodb-example-1-build -o yaml -n dakinitest2
apiVersion: v1
kind: Pod
metadata:
  annotations:
    openshift.io/build.name: nodejs-mongodb-example-1
    openshift.io/scc: privileged
  creationTimestamp: 2016-06-08T14:28:11Z
  labels:
    openshift.io/build.name: nodejs-mongodb-example-1
  name: nodejs-mongodb-example-1-build
  namespace: dakinitest2
  resourceVersion: "16328091"
  selfLink: /api/v1/namespaces/dakinitest2/pods/nodejs-mongodb-example-1-build
  uid: 3a2b281e-2d85-11e6-94e9-0a1d348c34bb
spec:
  containers:
  - args:
    - --loglevel=2
    env:
    - name: BUILD
      value: |
        {"kind":"Build","apiVersion":"v1","metadata":{"name":"nodejs-mongodb-example-1","namespace":"dakinitest2","selfLink":"/oapi/v1/namespaces/dakinitest2/builds/nodejs-mongodb-example-1","uid":"3a1eb6c1-2d85-11e6-94e9-0a1d348c34bb","resourceVersion":"16328078","creationTimestamp":"2016-06-08T14:28:11Z","labels":{"app":"nodejs-mongodb-example","buildconfig":"nodejs-mongodb-example","openshift.io/build-config.name":"nodejs-mongodb-example","template":"nodejs-mongodb-example"},"annotations":{"openshift.io/build.number":"1"}},"spec":{"serviceAccount":"builder","source":{"type":"Git","git":{"uri":"https://github.com/openshift/nodejs-ex.git"},"secrets":null},"strategy":{"type":"Source","sourceStrategy":{"from":{"kind":"DockerImage","name":"registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest"},"forcePull":true}},"output":{"to":{"kind":"DockerImage","name":"172.30.94.234:5000/dakinitest2/nodejs-mongodb-example:latest"},"pushSecret":{"name":"builder-dockercfg-v2tau"}},"resources":{},"postCommit":{}},"status":{"phase":"New","outputDockerImageReference":"172.30.94.234:5000/dakinitest2/nodejs-mongodb-example:latest","config":{"kind":"BuildConfig","namespace":"dakinitest2","name":"nodejs-mongodb-example"}}}
    - name: BUILD_LOGLEVEL
      value: "2"
    - name: SOURCE_REPOSITORY
      value: https://github.com/openshift/nodejs-ex.git
    - name: SOURCE_URI
      value: https://github.com/openshift/nodejs-ex.git
    - name: ORIGIN_VERSION
      value: v3.2.0.44
    - name: ALLOWED_UIDS
      value: 1-
    - name: DROP_CAPS
      value: KILL,MKNOD,SETGID,SETUID,SYS_CHROOT
    - name: PUSH_DOCKERCFG_PATH
      value: /var/run/secrets/openshift.io/push
    image: registry.qe.openshift.com/openshift3/ose-sti-builder:v3.2.0.44
    imagePullPolicy: Always
    name: sti-build
    resources: {}
    securityContext:
      privileged: true
    terminationMessagePath: /dev/termination-log
    volumeMounts:
    - mountPath: /var/run/docker.sock
      name: docker-socket
    - mountPath: /var/run/secrets/openshift.io/push
      name: builder-dockercfg-v2tau-push
      readOnly: true
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: builder-token-2q6hw
      readOnly: true
  dnsPolicy: ClusterFirst
  host: ip-172-31-4-148.ec2.internal
  imagePullSecrets:
  - name: builder-dockercfg-v2tau
  nodeName: ip-172-31-4-148.ec2.internal
  nodeSelector:
    type: compute
  restartPolicy: Never
  securityContext: {}
  serviceAccount: builder
  serviceAccountName: builder
  terminationGracePeriodSeconds: 30
  volumes:
  - hostPath:
      path: /var/run/docker.sock
    name: docker-socket
  - name: builder-dockercfg-v2tau-push
    secret:
      secretName: builder-dockercfg-v2tau
  - name: builder-token-2q6hw
    secret:
      secretName: builder-token-2q6hw
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: 2016-06-08T14:28:11Z
    message: 'containers with unready status: [sti-build]'
    reason: ContainersNotReady
    status: "False"
    type: Ready
  containerStatuses:
  - image: registry.qe.openshift.com/openshift3/ose-sti-builder:v3.2.0.44
    imageID: ""
    lastState: {}
    name: sti-build
    ready: false
    restartCount: 0
    state:
      waiting:
        message: 'Image: registry.qe.openshift.com/openshift3/ose-sti-builder:v3.2.0.44
          is ready, container is creating'
        reason: ContainerCreating
  hostIP: 172.31.4.148
  phase: Pending
  startTime: 2016-06-08T14:28:11Z

Comment 2 Ben Parees 2016-06-08 14:51:00 UTC
thanks Stefanie, Cesar.

Comment 3 Bing Li 2016-06-17 03:33:45 UTC
verified on dev-previe-int and dev-preview-stg:
"BUILD" env include:  "forcePull":true
and imagePullPolicy: Always


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