Skip to content

Make template work in 1.3.1

Alberto Rodriguez Peon requested to merge check_template into master

After the upgrade to 1.3.1, the cern-sso-proxy template stopped working. The issue seems to be that the second container never resolves the image from the ImageTrigger

2016-12-01T13:57:46+01:00   2016-12-01T13:57:46+01:00   1         cern-sso-proxy-1          ReplicationController                                 Normal    SuccessfulCreate    {replication-controller }        Created pod: cern-sso-proxy-1-2wgkt
2016-12-01T13:57:46+01:00   2016-12-01T13:57:46+01:00   1         cern-sso-proxy-1-2wgkt    Pod                                                   Normal    Scheduled           {default-scheduler }             Successfully assigned cern-sso-proxy-1-2wgkt to oonode108
2016-12-01T13:57:48+01:00   2016-12-01T13:57:48+01:00   1         cern-sso-proxy-1-2wgkt    Pod                     spec.containers{httpd}        Normal    Pulling             {kubelet oonode108}              pulling image "172.30.78.46:5000/openshift/cern-sso-proxy@sha256:6b1666457f9da89e660dfc086c746cc981f45e23918480ad01ef51738ea4a7be"
2016-12-01T13:57:48+01:00   2016-12-01T13:57:48+01:00   1         cern-sso-proxy-1-2wgkt    Pod                     spec.containers{httpd}        Normal    Pulled              {kubelet oonode108}              Successfully pulled image "172.30.78.46:5000/openshift/cern-sso-proxy@sha256:6b1666457f9da89e660dfc086c746cc981f45e23918480ad01ef51738ea4a7be"
2016-12-01T13:57:50+01:00   2016-12-01T13:57:50+01:00   1         cern-sso-proxy-1-2wgkt    Pod                     spec.containers{httpd}        Normal    Created             {kubelet oonode108}              Created container with docker id e5987f84b34e
2016-12-01T13:57:51+01:00   2016-12-01T13:57:51+01:00   1         cern-sso-proxy-1-2wgkt    Pod                     spec.containers{httpd}        Normal    Started             {kubelet oonode108}              Started container with docker id e5987f84b34e
2016-12-01T13:57:51+01:00   2016-12-01T13:57:51+01:00   1         cern-sso-proxy-1-2wgkt    Pod                     spec.containers{shibd}        Normal    Pulling             {kubelet oonode108}              pulling image "cern-sso-proxy:stable"
LASTSEEN                    FIRSTSEEN                   COUNT     NAME                     KIND      SUBOBJECT                TYPE      REASON    SOURCE                MESSAGE
2016-12-01T13:57:53+01:00   2016-12-01T13:57:53+01:00   1         cern-sso-proxy-1-2wgkt   Pod       spec.containers{shibd}   Warning   Failed    {kubelet oonode108}   Failed to pull image "cern-sso-proxy:stable": Error: image library/cern-sso-proxy not found
2016-12-01T13:57:53+01:00   2016-12-01T13:57:53+01:00   1         cern-sso-proxy-1-2wgkt   Pod                 Warning   FailedSync   {kubelet oonode108}   Error syncing pod, skipping: failed to "StartContainer" for "shibd" with ErrImagePull: "Error: image library/cern-sso-proxy not found"

While the first container in the list (by default httpd) resolves the image to the id, the second container (shibd) is not able to do it and tries to pull whatever it is in the .imageattribute in the container definition. I tried to swap the containers definition to have shibdbefore httpdand in any case the first container always manages to resolve the image while the second does not.

Therefore, it seems to be a bug in Origin more than an error in our configuration. I will create an issue upstream to track this. As a workaround, adding a second ImageChange trigger for the other container makes it work as expected.

I've also added a test to our CI script to validate the template, in order to avoid having a problem like this again.

Merge request reports