Bug 1416500 - podfying cfme: pod creation is not being triggered in OCP 3.4
Summary: podfying cfme: pod creation is not being triggered in OCP 3.4
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: cfme-openshift-app
Version: 5.7.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: GA
: 5.8.0
Assignee: Satoe Imaishi
QA Contact: Einat Pacifici
Red Hat CloudForms Documentation
URL:
Whiteboard: container:pod
Depends On:
Blocks: 1419688
TreeView+ depends on / blocked
 
Reported: 2017-01-25 16:06 UTC by Dafna Ron
Modified: 2020-07-16 09:08 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.1
Doc Type: Known Issue
Doc Text:
Due to a known issue, when deploying a CloudForms appliance on OpenShift Container Platform 3.4, images are not automatically downloaded and pods are not automatically created. To work around this, the "imageChangeParams: automatic: true" parameter was added to the CloudForms template to trigger deployment immediately. After you have successfully validated your deployment, disable the automatic image change trigger by manually setting this parameter to _false_ in the template. This prevents starting an unintended upgrade on a deployment if a newer image is found on the system.
Clone Of:
: 1419688 (view as bug list)
Environment:
Last Closed: 2017-06-12 17:08:25 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dafna Ron 2017-01-25 16:06:15 UTC
Description of problem:

cfme pods creation was not triggered automatically as it does on 3.3. 
seems something has changed in OSP and we no longer trigger the pod creation. 


Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:
1. deploy OCP 3.4
2. deploy pods using the template on brew
3. oc get pods - nothing comes up
4. oc status -v  - "waiting on image or update"
5. oc describe DC <name>  - no events show

Actual results:

deployment of pods is not triggered in DC as they used to be on 3.3

Expected results:

Image download and pod creation should be triggered on 3.4 

Additional info:


this might be a bug in OCP but since we are not sure if this is a bug or a behaviour change I am opening this issue on cfme docker.

Comment 1 Dafna Ron 2017-01-25 16:20:19 UTC
as you can see after IS tags are created, the images are waiting to be downloaded and there are no events in dc to indicate any failure: 

[root@dafna-xx-master-01 ~]# oc new-app --template=cloudforms DATABASE_VOLUME_CAPACITY=2Gi,MEMORY_POSTGRESQL_LIMIT=4Gi
--> Deploying template "dafna-test/cloudforms" to project dafna-test

     cloudforms
     ---------
     CloudForms appliance with persistent storage

     * With parameters:
        * Name=cloudforms
        * PostgreSQL Service Name=postgresql
        * PostgreSQL User=root
        * PostgreSQL Password=smartvm
        * PostgreSQL Database Name=vmdb_production
        * Application Database Region=0
        * Memcached Service Name=memcached
        * Memcached Max Memory=64
        * Memcached Max Connections=1024
        * Memcached Slab Page Size=1m
        * PostgreSQL Max Connections=100
        * PostgreSQL Shared Buffer Amount=64MB
        * Application Memory Minimum=4096Mi
        * PostgreSQL Memory Limit=2048Mi
        * Memcached Memory Limit=256Mi
        * PostgreSQL Image Tag=latest
        * Memcached Image Tag=latest
        * Application Image Tag=latest
        * Application Hostname=
        * Application Init Delay=30
        * Application Volume Capacity=1Gi
        * Database Volume Capacity=1Gi

--> Creating resources ...
    service "cloudforms" created
    route "cloudforms" created
    imagestream "cfme-openshift-app" created
    persistentvolumeclaim "postgresql" created
    persistentvolumeclaim "cloudforms" created
    deploymentconfig "cloudforms" created
    service "memcached" created
    imagestream "cfme-openshift-memcached" created
    deploymentconfig "memcached" created
    service "postgresql" created
    imagestream "cfme-openshift-postgresql" created
    deploymentconfig "postgresql" created
--> Success
    Run 'oc status' to view your app.
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# oc status
In project dafna-test on server https://dafna-xx-master-01.qa.lab.tlv.redhat.com:8443

https://cloudforms-dafna-test.openshift.qa.lab.tlv.redhat.com (passthrough) to pod port https (svc/cloudforms)
  dc/cloudforms deploys istag/cfme-openshift-app:latest 
    deployment #1 waiting on image or update

svc/memcached - 172.30.76.9:11211
  dc/memcached deploys istag/cfme-openshift-memcached:latest 
    deployment #1 waiting on image or update

svc/postgresql - 172.30.73.174:5432
  dc/postgresql deploys istag/cfme-openshift-postgresql:latest 
    deployment #1 waiting on image or update

3 warnings identified, use 'oc status -v' to see details.
[root@dafna-xx-master-01 ~]# oc status
In project dafna-test on server https://dafna-xx-master-01.qa.lab.tlv.redhat.com:8443

https://cloudforms-dafna-test.openshift.qa.lab.tlv.redhat.com (passthrough) to pod port https (svc/cloudforms)
  dc/cloudforms deploys istag/cfme-openshift-app:latest 
    deployment #1 waiting on image or update

svc/memcached - 172.30.76.9:11211
  dc/memcached deploys istag/cfme-openshift-memcached:latest 
    deployment #1 waiting on image or update

svc/postgresql - 172.30.73.174:5432
  dc/postgresql deploys istag/cfme-openshift-postgresql:latest 
    deployment #1 waiting on image or update

3 warnings identified, use 'oc status -v' to see details.
[root@dafna-xx-master-01 ~]# oc status -v
In project dafna-test on server https://dafna-xx-master-01.qa.lab.tlv.redhat.com:8443

https://cloudforms-dafna-test.openshift.qa.lab.tlv.redhat.com (passthrough) to pod port https (svc/cloudforms)
  dc/cloudforms deploys istag/cfme-openshift-app:latest 
    deployment #1 waiting on image or update

svc/memcached - 172.30.76.9:11211
  dc/memcached deploys istag/cfme-openshift-memcached:latest 
    deployment #1 waiting on image or update

svc/postgresql - 172.30.73.174:5432
  dc/postgresql deploys istag/cfme-openshift-postgresql:latest 
    deployment #1 waiting on image or update

Warnings:
  * The image trigger for dc/cloudforms will have no effect until istag/cfme-openshift-app:latest is imported or created by a build.
  * The image trigger for dc/memcached will have no effect until istag/cfme-openshift-memcached:latest is imported or created by a build.
  * The image trigger for dc/postgresql will have no effect until istag/cfme-openshift-postgresql:latest is imported or created by a build.

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.
[root@dafna-xx-master-01 ~]# oc status -v
In project dafna-test on server https://dafna-xx-master-01.qa.lab.tlv.redhat.com:8443

https://cloudforms-dafna-test.openshift.qa.lab.tlv.redhat.com (passthrough) to pod port https (svc/cloudforms)
  dc/cloudforms deploys istag/cfme-openshift-app:latest 
    deployment #1 waiting on image or update

svc/memcached - 172.30.76.9:11211
  dc/memcached deploys istag/cfme-openshift-memcached:latest 
    deployment #1 waiting on image or update

svc/postgresql - 172.30.73.174:5432
  dc/postgresql deploys istag/cfme-openshift-postgresql:latest 
    deployment #1 waiting on image or update

Warnings:
  * The image trigger for dc/cloudforms will have no effect until istag/cfme-openshift-app:latest is imported or created by a build.
  * The image trigger for dc/memcached will have no effect until istag/cfme-openshift-memcached:latest is imported or created by a build.
  * The image trigger for dc/postgresql will have no effect until istag/cfme-openshift-postgresql:latest is imported or created by a build.

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# oc status -v
In project dafna-test on server https://dafna-xx-master-01.qa.lab.tlv.redhat.com:8443

https://cloudforms-dafna-test.openshift.qa.lab.tlv.redhat.com (passthrough) to pod port https (svc/cloudforms)
  dc/cloudforms deploys istag/cfme-openshift-app:latest 
    deployment #1 waiting on image or update

svc/memcached - 172.30.76.9:11211
  dc/memcached deploys istag/cfme-openshift-memcached:latest 
    deployment #1 waiting on image or update

svc/postgresql - 172.30.73.174:5432
  dc/postgresql deploys istag/cfme-openshift-postgresql:latest 
    deployment #1 waiting on image or update

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# 
[root@dafna-xx-master-01 ~]# oc describe dc/cloudforms
Name:		cloudforms
Namespace:	dafna-test
Created:	11 minutes ago
Labels:		app=cloudforms
		template=cloudforms
Description:	Defines how to deploy the CloudForms appliance
Annotations:	openshift.io/generated-by=OpenShiftNewApp
Latest Version:	Not deployed
Selector:	name=cloudforms
Replicas:	1
Triggers:	Config, Image(cfme-openshift-app@latest, auto=false)
Strategy:	Recreate
Template:
  Labels:	app=cloudforms
		name=cloudforms
  Annotations:	openshift.io/generated-by=OpenShiftNewApp
  Containers:
   cloudforms:
    Image:	cloudforms/cfme-openshift-app:latest
    Ports:	80/TCP, 443/TCP
    Requests:
      memory:	4Gi
    Liveness:	http-get http://:80/ delay=480s timeout=3s period=10s #success=1 #failure=3
    Readiness:	http-get http://:80/ delay=200s timeout=3s period=10s #success=1 #failure=3
    Volume Mounts:
      /persistent from cfme-app-volume (rw)
    Environment Variables:
      APPLICATION_INIT_DELAY:		30
      DATABASE_SERVICE_NAME:		postgresql
      DATABASE_REGION:			0
      MEMCACHED_SERVICE_NAME:		memcached
      POSTGRESQL_USER:			root
      POSTGRESQL_PASSWORD:		smartvm
      POSTGRESQL_DATABASE:		vmdb_production
      POSTGRESQL_MAX_CONNECTIONS:	100
      POSTGRESQL_SHARED_BUFFERS:	64MB
  Volumes:
   cfme-app-volume:
    Type:	PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:	cloudforms
    ReadOnly:	false

Latest Deployment:	<none>

No events.
[root@dafna-xx-master-01 ~]# 


after we change trigger to enabled we can see the pods being created: 

[root@dafna-xx-master-01 ~]# oc deploy --enable-triggers memcached
Enabled image triggers: cfme-openshift-memcached:latest
[root@dafna-xx-master-01 ~]# oc deploy --enable-triggers postgresql
Enabled image triggers: cfme-openshift-postgresql:latest
[root@dafna-xx-master-01 ~]# oc deploy --enable-triggers cloudforms
Enabled image triggers: cfme-openshift-app:latest


[root@dafna-xx-master-01 ~]# oc get pods
NAME                  READY     STATUS              RESTARTS   AGE
cloudforms-1-3qspb    0/1       Pending             0          2s
cloudforms-1-deploy   1/1       Running             0          7s
memcached-1-uni3u     1/1       Running             0          42s
postgresql-1-deploy   1/1       Running             0          37s
postgresql-1-nkrv4    0/1       ContainerCreating   0          31s

Comment 4 Barak 2017-01-30 10:37:30 UTC
After discussing with Loic,

We need to change the template to "imageChangeParams: automatic: true" so it will deploy immidiately.
And add to the documentation the step to move it back to false after deployment is done.

Comment 5 Franco Bladilo 2017-01-30 14:30:27 UTC
I will be working on the issue and upstream PR today, as noted we will need to change the image change trigger auto to true, and update the docs accordingly.

Comment 6 Franco Bladilo 2017-01-31 21:50:37 UTC
Please see upstream PR here :

https://github.com/ManageIQ/manageiq-pods/pull/88

Comment 10 Dafna Ron 2017-02-16 14:08:46 UTC
verified on cfme-5.8.0.1-1.el7cf.x86_64

Comment 11 Andrew Dahms 2017-05-25 00:27:53 UTC
Moving the 'requires_doc_text' to '-' so that this known issue is not included in the release notes for 5.8.0.


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