You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
creating from template or console causes a build to occur......... a long time later #1738
I've noticed that a few releases back we started automatically starting to run builds, which is awesome.
But, within the last few drops, I've noticed that those builds will start....... eventually. It seems to take at least 60-90 seconds before the build starts. And there's no indication in the UI or CLI that a build is GOING to start. It just seems to happen, but later.
Which might result in someone starting a build accidentally and then OpenShift starting its own build.
Hi, when I go through the "wiring" example in beta3 training doc, I found the build was not started automatically after run "osc create -f frontend-config.json". Couldn't get any build running even wait for several minutes.
And after database pod created, coudn't connect to mysql. This should work well when testing with db-template.json in beta2.
[alice@master beta3]$ osc get services | grep database | awk '{print $4}'
172.30.17.32
[root@node ~]# curl 172.30.17.32:5434
curl: (56) Recv failure: Connection reset by peer
@smarterclayton my first guess would be that this relates to the import of the images not happening (or taking a long time), since that's what's really required to trigger a build here.
@gpei and @thoraxe can you dump osc get imagestreams -o json for your namespace while you're waiting for the build to show up?
also @thoraxe i have a request to @mnagy and @jhadvig to significantly enhance the log traceability of the build flow (when verbose logs are enabled) as part of some other work they are doing this sprint, so hopefully that will address your concern there.
Specifically look for the annotation about image import and the timestamp it provides there relative to the creation timestamp of the image stream.
----- Original Message -----
@smarterclayton my first guess would be that this relates to the import of
the images not happening (or taking a long time), since that's what's really
required to trigger a build here.
@gpei and @thoraxe can you dump osc get imagestreams -o json for your
namespace while you're waiting for the build to show up?
also @thoraxe i have a request to @mnagy and @jhadvig to significantly
enhance the log traceability of the build flow (when verbose logs are
enabled) as part of some other work they are doing this sprint, so hopefully
that will address your concern there.
Reply to this email directly or view it on GitHub: #1738 (comment)
your ruby-20-centos7 imagestream does not look right, it should be coming from dockerup and not your local registry. What does your ImageSTream look like in your template? It should be:
@gpei that seems like a problem with the template definition, since it's ImageRepository does not point to a registry, it's going to use the default registry. Not sure if that's the intent of the sample or not, @thoraxe ?
if it is the intent, you won't get a build until you manually trigger one, or you push an image tagged as 172.30.17.59:5000/wiring/ruby-20-centos7
This is just the sample app template cut into two pieces. This is the frontend portion by itself.
Processing and creating this does not seem to auto generate a build. I think it's because it uses ImageRepository and not ImageStream. Let me try re-cutting the existing sample app template and doing it again.
Activity
thoraxe commentedon Apr 14, 2015
I was watching logs but I don't think controller or image_change are telling me when the build starts:
I'm not sure what to grep for to see when the resources were defined (via adding from console) and when the build started.
thoraxe commentedon Apr 14, 2015
creation of template:
start of build:
OK, that's less than 60 seconds, but even 20 seconds is still confusing to the user, I would think.
gpei commentedon Apr 16, 2015
Hi, when I go through the "wiring" example in beta3 training doc, I found the build was not started automatically after run "osc create -f frontend-config.json". Couldn't get any build running even wait for several minutes.
And after database pod created, coudn't connect to mysql. This should work well when testing with db-template.json in beta2.
[alice@master beta3]$ osc get services | grep database | awk '{print $4}'
172.30.17.32
[root@node ~]# curl 172.30.17.32:5434
curl: (56) Recv failure: Connection reset by peer
smarterclayton commentedon Apr 16, 2015
@bparees or @soltysh
thoraxe commentedon Apr 16, 2015
@gpei your problems with mysql are because of #1740
We have to fix the db template still. The current iteration of the db template has some old workarounds for selinux+docker 1.4
See: #1740 (comment)
bparees commentedon Apr 16, 2015
@smarterclayton my first guess would be that this relates to the import of the images not happening (or taking a long time), since that's what's really required to trigger a build here.
@gpei and @thoraxe can you dump osc get imagestreams -o json for your namespace while you're waiting for the build to show up?
also @thoraxe i have a request to @mnagy and @jhadvig to significantly enhance the log traceability of the build flow (when verbose logs are enabled) as part of some other work they are doing this sprint, so hopefully that will address your concern there.
smarterclayton commentedon Apr 16, 2015
Specifically look for the annotation about image import and the timestamp it provides there relative to the creation timestamp of the image stream.
----- Original Message -----
gpei commentedon Apr 17, 2015
@bparees Just like this.
[alice@master beta3]$ osc get imagestreams -o json -n wiring
{
"kind": "List",
"creationTimestamp": null,
"resourceVersion": 36539,
"apiVersion": "v1beta1",
"items": [
{
"kind": "ImageStream",
"apiVersion": "v1beta1",
"metadata": {
"name": "origin-ruby-sample",
"namespace": "wiring",
"selfLink": "/osapi/v1beta1/imageStreams/origin-ruby-sample?namespace=wiring",
"uid": "115e476c-e4ab-11e4-b4f9-fa163e7a8db3",
"resourceVersion": "36531",
"creationTimestamp": "2015-04-17T02:40:10Z",
"labels": {
"template": "application-template-stibuild"
}
},
"spec": {},
"status": {
"dockerImageRepository": "172.30.17.59:5000/wiring/origin-ruby-sample"
}
},
{
"kind": "ImageStream",
"apiVersion": "v1beta1",
"metadata": {
"name": "ruby-20-centos7",
"namespace": "wiring",
"selfLink": "/osapi/v1beta1/imageStreams/ruby-20-centos7?namespace=wiring",
"uid": "1160cb97-e4ab-11e4-b4f9-fa163e7a8db3",
"resourceVersion": "36532",
"creationTimestamp": "2015-04-17T02:40:11Z",
"labels": {
"template": "application-template-stibuild"
}
},
"spec": {},
"status": {
"dockerImageRepository": "172.30.17.59:5000/wiring/ruby-20-centos7"
}
}
]
}
bparees commentedon Apr 17, 2015
your ruby-20-centos7 imagestream does not look right, it should be coming from dockerup and not your local registry. What does your ImageSTream look like in your template? It should be:
{
"apiVersion": "v1beta1",
"kind": "ImageStream",
"metadata": {
"name": "ruby-20-centos7"
},
"spec": {
"dockerImageRepository": "openshift/ruby-20-centos7"
}
},
gpei commentedon Apr 20, 2015
I was using this template https://github.com/openshift/training/blob/beta3/beta3/frontend-template.json
No such block defined in the template.
bparees commentedon Apr 20, 2015
@gpei that seems like a problem with the template definition, since it's ImageRepository does not point to a registry, it's going to use the default registry. Not sure if that's the intent of the sample or not, @thoraxe ?
if it is the intent, you won't get a build until you manually trigger one, or you push an image tagged as 172.30.17.59:5000/wiring/ruby-20-centos7
thoraxe commentedon Apr 21, 2015
{ "apiVersion": "v1beta1", "items": [ { "apiVersion": "v1beta1", "containerPort": 8080, "id": "frontend", "kind": "Service", "port": 5432, "selector": { "name": "frontend" } }, { "apiVersion": "v1beta1", "host": "wiring.cloudapps.example.com", "id": "sample-app-secure", "kind": "Route", "metadata": { "name": "route-edge" }, "serviceName": "frontend" }, { "apiVersion": "v1beta1", "kind": "ImageRepository", "metadata": { "name": "origin-ruby-sample" } }, { "apiVersion": "v1beta1", "kind": "ImageRepository", "metadata": { "name": "ruby-20-centos7" } }, { "apiVersion": "v1beta1", "kind": "BuildConfig", "labels": { "name": "ruby-sample-build" }, "metadata": { "name": "ruby-sample-build" }, "parameters": { "output": { "to": { "name": "origin-ruby-sample" } }, "source": { "git": { "uri": "git://github.com/openshift/ruby-hello-world.git", "ref": "beta2" }, "type": "Git" }, "strategy": { "stiStrategy": { "image": "openshift/ruby-20-centos7" }, "type": "STI" } }, "triggers": [ { "github": { "secret": "secret101" }, "type": "github" }, { "generic": { "secret": "secret101" }, "type": "generic" }, { "imageChange": { "from": { "name": "ruby-20-centos7" }, "image": "openshift/ruby-20-centos7", "tag": "latest" }, "type": "imageChange" } ] }, { "apiVersion": "v1beta1", "kind": "DeploymentConfig", "metadata": { "name": "frontend" }, "template": { "controllerTemplate": { "podTemplate": { "desiredState": { "manifest": { "containers": [ { "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "image": "origin-ruby-sample", "name": "ruby-helloworld", "ports": [ { "containerPort": 8080 } ] } ], "version": "v1beta1" } }, "labels": { "name": "frontend" } }, "replicaSelector": { "name": "frontend" }, "replicas": 1 }, "strategy": { "type": "Recreate" } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "name": "origin-ruby-sample" }, "tag": "latest" }, "type": "ImageChange" } ] } ], "kind": "Template", "metadata": { "annotations": { "description": "This frontend template will be used to demonstrate parameters" }, "name": "frontend-app-template" }, "parameters": [ { "description": "administrator username", "from": "admin[A-Z0-9]{3}", "generate": "expression", "name": "ADMIN_USERNAME" }, { "description": "administrator password", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "name": "ADMIN_PASSWORD" }, { "description": "database password", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "name": "MYSQL_PASSWORD" }, { "description": "database name", "name": "MYSQL_DATABASE", "value": "example" }, { "description": "database user", "name": "MYSQL_USER", "value": "example" } ], "labels": { "template": "application-template-stibuild" } }This is just the sample app template cut into two pieces. This is the frontend portion by itself.
Processing and creating this does not seem to auto generate a build. I think it's because it uses
ImageRepositoryand notImageStream. Let me try re-cutting the existing sample app template and doing it again.ncdc commentedon Apr 21, 2015
Triggers should work with both ImageRepository and ImageStream. If not, let me know.
thoraxe commentedon Apr 21, 2015
With the above json based on IR and the old stuff, it doesn't trigger a build.
Updating to the following JSON results in a build being triggered immediately
{ "apiVersion": "v1beta1", "items": [ { "apiVersion": "v1beta1", "containerPort": 8080, "id": "frontend", "kind": "Service", "port": 5432, "selector": { "name": "frontend" } }, { "apiVersion": "v1beta1", "host": "integrated.cloudapps.example.com", "id": "sample-app-secure", "kind": "Route", "metadata": { "name": "route-edge" }, "serviceName": "frontend" }, { "apiVersion": "v1beta1", "kind": "ImageStream", "metadata": { "name": "origin-ruby-sample" } }, { "apiVersion": "v1beta1", "kind": "ImageStream", "metadata": { "name": "ruby-20-centos7" }, "spec": { "dockerImageRepository": "openshift/ruby-20-centos7" } }, { "apiVersion": "v1beta1", "kind": "BuildConfig", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" } }, "parameters": { "output": { "to": { "name": "origin-ruby-sample" } }, "source": { "git": { "uri": "git://github.com/openshift/ruby-hello-world.git", "ref": "beta3" }, "type": "Git" }, "strategy": { "stiStrategy": { "image": "openshift/ruby-20-centos7" }, "type": "STI" } }, "triggers": [ { "github": { "secret": "secret101" }, "type": "github" }, { "generic": { "secret": "secret101" }, "type": "generic" }, { "imageChange": { "from": { "name": "ruby-20-centos7" }, "image": "openshift/ruby-20-centos7", "tag": "latest" }, "type": "imageChange" } ] }, { "apiVersion": "v1beta1", "kind": "DeploymentConfig", "metadata": { "name": "frontend" }, "template": { "controllerTemplate": { "podTemplate": { "desiredState": { "manifest": { "containers": [ { "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "image": "origin-ruby-sample", "name": "ruby-helloworld", "ports": [ { "containerPort": 8080 } ] } ], "version": "v1beta1" } }, "labels": { "name": "frontend" } }, "replicaSelector": { "name": "frontend" }, "replicas": 1 }, "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "containerName": "ruby-helloworld", "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "containerName": "ruby-helloworld", "command": [ "/bin/false" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ] } } } } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "name": "origin-ruby-sample" }, "tag": "latest" }, "type": "ImageChange" } ] } ], "kind": "Template", "metadata": { "annotations": { "description": "This is a hand-wiring example for an application" }, "name": "wiring-frontend-example" }, "parameters": [ { "description": "administrator username", "from": "admin[A-Z0-9]{3}", "generate": "expression", "name": "ADMIN_USERNAME" }, { "description": "administrator password", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "name": "ADMIN_PASSWORD" }, { "description": "database username", "from": "user[A-Z0-9]{3}", "generate": "expression", "name": "MYSQL_USER" }, { "description": "database password", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "name": "MYSQL_PASSWORD" }, { "description": "database name", "name": "MYSQL_DATABASE", "value": "root" } ], "labels": { "template": "application-template-stibuild" } }ncdc commentedon Apr 21, 2015
@thoraxe what's the difference between the old and new json?
bparees commentedon Apr 21, 2015
imagestream vs imagerepository
bparees commentedon Apr 21, 2015
probably related to this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1213769
which is going to get totally refactored by this PR:
https://github.com/openshift/origin/pull/1693/commits
ncdc commentedon Apr 21, 2015
I think the key difference is setting the dockerImageRepository for ruby-20-centos7. It didn't look like that was set in the old version.
bparees commentedon Apr 22, 2015
I think @ncdc is right, when using ImageRepository it should look like:
{
"apiVersion": "v1beta1",
"kind": "ImageRepository",
"metadata": {
"name": "ruby-20-centos7"
},
"tags": {
"validtag": "buildsuccess"
},
"dockerImageRepository": "openshift/ruby-20-centos7"
},
thoraxe commentedon Apr 27, 2015
OK, this is related to IS vs IR so I will close.
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…